Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwjongman2010-08-19 08:45:50 +0000
committerwjongman2010-08-19 08:45:50 +0000
commit61e9c9489d6925269d8aa0643a75801354845b74 (patch)
treec23ee1257a7178b4b69f534f122e6be932eaf416 /examples
parent60cb4bcbf2b8a0c8171daf925355eaff3b159ebb (diff)
downloadorg.eclipse.ecf-61e9c9489d6925269d8aa0643a75801354845b74.tar.gz
org.eclipse.ecf-61e9c9489d6925269d8aa0643a75801354845b74.tar.xz
org.eclipse.ecf-61e9c9489d6925269d8aa0643a75801354845b74.zip
Enable to operate in standalone or centralized mode
Diffstat (limited to 'examples')
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.quotes.consumer/src/org/eclipse/ecf/examples/remoteservices/quotes/consumer/ConsumerUI.java89
1 files changed, 43 insertions, 46 deletions
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.quotes.consumer/src/org/eclipse/ecf/examples/remoteservices/quotes/consumer/ConsumerUI.java b/examples/bundles/org.eclipse.ecf.examples.remoteservices.quotes.consumer/src/org/eclipse/ecf/examples/remoteservices/quotes/consumer/ConsumerUI.java
index 0e60799cc..94bc0e9a5 100644
--- a/examples/bundles/org.eclipse.ecf.examples.remoteservices.quotes.consumer/src/org/eclipse/ecf/examples/remoteservices/quotes/consumer/ConsumerUI.java
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.quotes.consumer/src/org/eclipse/ecf/examples/remoteservices/quotes/consumer/ConsumerUI.java
@@ -65,15 +65,13 @@ public class ConsumerUI extends Shell {
composite.setLayout(new GridLayout(3, false));
Label lblCommaSeperatedList = new Label(composite, SWT.NONE);
- lblCommaSeperatedList.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER,
- false, false, 1, 1));
+ lblCommaSeperatedList.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblCommaSeperatedList.setText("Servers");
servers = (new Text(composite, SWT.BORDER));
servers.setToolTipText("Enter a host or a comma\r\nseparated list of hosts.");
getServers().setText("yazafatutu.com");
- getServers().setLayoutData(
- new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+ getServers().setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
Button btnConnect = new Button(composite, SWT.NONE);
btnConnect.addMouseListener(new MouseAdapter() {
@@ -83,46 +81,46 @@ public class ConsumerUI extends Shell {
}
});
btnConnect.setText("Connect");
-
- TabFolder tabFolder = new TabFolder(composite, SWT.BOTTOM);
- tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
-
- TabItem tbtmUi = new TabItem(tabFolder, SWT.NONE);
- tbtmUi.setText("UI");
-
- Composite composite_2 = new Composite(tabFolder, SWT.NONE);
- tbtmUi.setControl(composite_2);
- composite_2.setLayout(new GridLayout(1, false));
-
- gilloscope = new OSGilloscope(composite_2, SWT.NONE);
- GridData gd_gilloscope = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
- gd_gilloscope.heightHint = 100;
- gilloscope.setLayoutData(gd_gilloscope);
-
- Composite composite_1 = new Composite(composite_2, SWT.BORDER);
- composite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- composite_1.setLayout(new GridLayout(1, false));
-
- lblBehindAFirewall = (new Label(composite_1, SWT.NONE));
- getLabel().setAlignment(SWT.CENTER);
- getLabel().setFont(new Font(null, "Segoe UI", 15, SWT.BOLD));
- getLabel().setLayoutData(
- new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
- getLabel().setText("Behind a Firewall?");
-
- styledText = (new StyledText(composite_1, SWT.BORDER | SWT.WRAP));
- styledText.setText("Ports 2181 needs to be opened for the Zookeeper Discovery to work and port 3282 is needed by the ECF distribution provider. You can change the ports if you run this in your own environment.");
- styledText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- styledText.setEditable(false);
-
- TabItem tbtmInfo = new TabItem(tabFolder, SWT.NONE);
- tbtmInfo.setText("Info");
-
- Composite composite_3 = new Composite(tabFolder, SWT.NONE);
- tbtmInfo.setControl(composite_3);
- composite_3.setLayout(new FillLayout(SWT.HORIZONTAL));
-
- info =new Text(composite_3, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);
+
+ TabFolder tabFolder = new TabFolder(composite, SWT.BOTTOM);
+ tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
+
+ TabItem tbtmUi = new TabItem(tabFolder, SWT.NONE);
+ tbtmUi.setText("UI");
+
+ Composite composite_2 = new Composite(tabFolder, SWT.NONE);
+ tbtmUi.setControl(composite_2);
+ composite_2.setLayout(new GridLayout(1, false));
+
+ gilloscope = new OSGilloscope(composite_2, SWT.NONE);
+ GridData gd_gilloscope = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
+ gd_gilloscope.heightHint = 100;
+ gilloscope.setLayoutData(gd_gilloscope);
+
+ Composite composite_1 = new Composite(composite_2, SWT.BORDER);
+ composite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+ composite_1.setLayout(new GridLayout(1, false));
+
+ lblBehindAFirewall = (new Label(composite_1, SWT.NONE));
+ getLabel().setAlignment(SWT.CENTER);
+ getLabel().setFont(new Font(null, "Segoe UI", 15, SWT.BOLD));
+ getLabel().setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
+ getLabel().setText("Behind a Firewall?");
+
+ styledText = (new StyledText(composite_1, SWT.BORDER | SWT.WRAP));
+ styledText
+ .setText("Ports 2181 needs to be opened for the Zookeeper Discovery to work and port 3282 is needed by the ECF distribution provider. You can change the ports if you run this in your own environment.");
+ styledText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+ styledText.setEditable(false);
+
+ TabItem tbtmInfo = new TabItem(tabFolder, SWT.NONE);
+ tbtmInfo.setText("Info");
+
+ Composite composite_3 = new Composite(tabFolder, SWT.NONE);
+ tbtmInfo.setControl(composite_3);
+ composite_3.setLayout(new FillLayout(SWT.HORIZONTAL));
+
+ info = new Text(composite_3, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);
createContents();
}
@@ -130,8 +128,7 @@ public class ConsumerUI extends Shell {
IContainer zooContainer = null;
try {
- zooContainer = ContainerFactory.getDefault().createContainer(
- ZooDiscoveryContainerInstantiator.NAME);
+ zooContainer = ContainerFactory.getDefault().createContainer(ZooDiscoveryContainerInstantiator.NAME);
} catch (ContainerCreateException e1) {
}

Back to the top