X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=service%2Fsimulator%2Fjava%2Feclipse-plugin%2FServiceProviderPlugin%2Fsrc%2Foic%2Fsimulator%2Fserviceprovider%2Fview%2Fdialogs%2FMainPage.java;h=2ea42cf236434f0b14814e36dcd6c32ecb74c2f8;hb=b2b47c415c84402c1289ff0cae28cae46a72a55f;hp=bd90dfd3a96b2704ca9a9e88368314d09305eede;hpb=902a16943ce382dcbd2a7aeb52592fa1e525e576;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/simulator/java/eclipse-plugin/ServiceProviderPlugin/src/oic/simulator/serviceprovider/view/dialogs/MainPage.java b/service/simulator/java/eclipse-plugin/ServiceProviderPlugin/src/oic/simulator/serviceprovider/view/dialogs/MainPage.java index bd90dfd..2ea42cf 100644 --- a/service/simulator/java/eclipse-plugin/ServiceProviderPlugin/src/oic/simulator/serviceprovider/view/dialogs/MainPage.java +++ b/service/simulator/java/eclipse-plugin/ServiceProviderPlugin/src/oic/simulator/serviceprovider/view/dialogs/MainPage.java @@ -1,6 +1,20 @@ -package oic.simulator.serviceprovider.view.dialogs; +/* + * Copyright 2015 Samsung Electronics All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ -import oic.simulator.serviceprovider.utils.Constants; +package oic.simulator.serviceprovider.view.dialogs; import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.jface.wizard.WizardPage; @@ -13,19 +27,19 @@ import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; + import org.oic.simulator.server.SimulatorResource.Type; +import oic.simulator.serviceprovider.utils.Constants; + public class MainPage extends WizardPage { private Button simpleBtn; - private Button collectionBtn; private Button simpleFromRamlBtn; - private Button collectionFromRamlBtn; - private Button deviceBtn; private Text description; public enum Option { - SIMPLE, SIMPLE_FROM_RAML, COLLECTION, COLLECTION_FROM_RAML, DEVICE, NONE + SIMPLE, SIMPLE_FROM_RAML } private Option option; @@ -51,15 +65,6 @@ public class MainPage extends WizardPage { simpleFromRamlBtn = new Button(compContent, SWT.RADIO); simpleFromRamlBtn.setText("Simple resource(From RAML)"); - collectionBtn = new Button(compContent, SWT.RADIO); - collectionBtn.setText("Collection resource"); - - collectionFromRamlBtn = new Button(compContent, SWT.RADIO); - collectionFromRamlBtn.setText("Collection resource(From RAML)"); - - deviceBtn = new Button(compContent, SWT.RADIO); - deviceBtn.setText("Device"); - Label lbl = new Label(compContent, SWT.NULL); lbl.setText("Details:"); gd = new GridData(); @@ -105,53 +110,11 @@ public class MainPage extends WizardPage { getWizard().getContainer().updateButtons(); } }); - - collectionBtn.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - description - .setText("Create a collection resource by manually entering all the details given below.\n" - + "\t1. Basic resource details: URI, Name, Resource Types, etc.\n" - + "\t2. Start/stop the resource.\n" - + "\t3. Adding existing simple resources to this collection."); - option = Option.COLLECTION; - getWizard().getContainer().updateButtons(); - } - }); - - collectionFromRamlBtn.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - description - .setText("Create a collection resource from RAML configuration file.\n" - + "\t1. Resource details, attributes, and other properties will be read from RAML.\n" - + "\t2. Supports multi-instance creation.\n" - + "\t3. For single instance creation, allows editing the URI and Name of the resource.\n" - + "\t4. Allows to start or stop the resource(s)."); - option = Option.COLLECTION_FROM_RAML; - getWizard().getContainer().updateButtons(); - } - }); - - deviceBtn.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - description - .setText("Create a logical device that acts as a top-level logical classification.\n" - + "\t1. Takes a device name for identication.\n" - + "\t2. One or more simple and collection resources can be added to it."); - option = Option.DEVICE; - getWizard().getContainer().updateButtons(); - } - }); } @Override public boolean canFlipToNextPage() { - if (option != Option.NONE) { - return true; - } - return false; + return true; } @Override @@ -170,18 +133,6 @@ public class MainPage extends WizardPage { page.initialSetup(Type.SINGLE); return page; } - if (collectionBtn.getSelection()) { - return createWizard.getCollectionResourceBasicDetailsPage(); - } - if (collectionFromRamlBtn.getSelection()) { - LoadRamlPage page = createWizard.getLoadRamlPage(); - page.initialSetup(Type.COLLECTION); - return page; - } - if (deviceBtn.getSelection()) { - DevicePage page = createWizard.getDevicePage(); - return page; - } return null; }