Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2005-02-21 01:46:04 +0000
committerslewis2005-02-21 01:46:04 +0000
commita484cb207cbf505eb654af66fef036ec629d8c80 (patch)
tree0945ffe4df92817c34a4f45c1dbfffedea2652f6
parent9ffc6c9c92d294ca16bc4578101579a6b957748e (diff)
downloadorg.eclipse.ecf-a484cb207cbf505eb654af66fef036ec629d8c80.tar.gz
org.eclipse.ecf-a484cb207cbf505eb654af66fef036ec629d8c80.tar.xz
org.eclipse.ecf-a484cb207cbf505eb654af66fef036ec629d8c80.zip
Small changes to support xmpp provider
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java23
1 files changed, 20 insertions, 3 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java
index 3a4149639..d9670cfd8 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java
@@ -39,6 +39,7 @@ public class JoinGroupWizardPage extends WizardPage {
protected static final String DEFAULTGROUPID_PROP_NAME = CLASSNAME+".defaultgroupid";
protected static final String EXAMPLEGROUPID_PROP_NAME = CLASSNAME+".examplegroupid";
protected static final String USEPASSWORD_PROP_NAME = CLASSNAME+".usepassword";
+ protected static final String USENICKNAME_PROP_NAME = CLASSNAME+".usenickname";
protected static final String URLPREFIX_NAME = CLASSNAME+".urlprefix";
protected static final String GROUPIDLABEL_PROP_NAME = CLASSNAME+".groupIDLabel";
@@ -60,9 +61,11 @@ public class JoinGroupWizardPage extends WizardPage {
protected String template_url = ECF_TEMPLATE_URL;
protected String default_url = ECF_DEFAULT_URL;
protected boolean showPassword = true;
+ protected boolean showNickname = true;
protected Label password_label;
protected Text nickname_text;
+ protected Label nickname_label;
protected Text joingroup_text;
protected Label example_label;
protected Combo combo;
@@ -76,6 +79,7 @@ public class JoinGroupWizardPage extends WizardPage {
String usePassword = (String) props.get(USEPASSWORD_PROP_NAME);
String examplegroupid = (String) props.get(EXAMPLEGROUPID_PROP_NAME);
String defaultgroupid = (String) props.get(DEFAULTGROUPID_PROP_NAME);
+ String useNickname = (String) props.get(USENICKNAME_PROP_NAME);
urlPrefix = (String) props.get(URLPREFIX_NAME);
if (urlPrefix == null) urlPrefix = "";
String groupLabel = (String) props.get(GROUPIDLABEL_PROP_NAME);
@@ -92,6 +96,14 @@ public class JoinGroupWizardPage extends WizardPage {
password_label.setVisible(false);
password_text.setVisible(false);
}
+ // turn off nickname unless used
+ if (useNickname != null){
+ nickname_label.setVisible(true);
+ nickname_text.setVisible(true);
+ } else {
+ nickname_label.setVisible(false);
+ nickname_text.setVisible(false);
+ }
// set examplegroupid text
example_label.setText((examplegroupid != null)?examplegroupid:"");
joingroup_text.setText((defaultgroupid != null)?defaultgroupid:"");
@@ -170,9 +182,9 @@ public class JoinGroupWizardPage extends WizardPage {
}
});
- final Label label_1 = new Label(container, SWT.NONE);
- label_1.setLayoutData(new GridData());
- label_1.setText(NICKNAME_FIELDNAME);
+ nickname_label = new Label(container, SWT.NONE);
+ nickname_label.setLayoutData(new GridData());
+ nickname_label.setText(NICKNAME_FIELDNAME);
nickname_text = new Text(container, SWT.BORDER);
final GridData nickname = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
@@ -187,6 +199,10 @@ public class JoinGroupWizardPage extends WizardPage {
public void focusLost(FocusEvent e) {
}
});
+ if (!showNickname) {
+ nickname_text.setVisible(false);
+ nickname_label.setVisible(false);
+ }
password_label = new Label(container, SWT.NONE);
password_label.setText("Password:");
@@ -210,6 +226,7 @@ public class JoinGroupWizardPage extends WizardPage {
}
public String getNicknameText() {
+ if (nickname_text == null) return null;
return nickname_text.getText().trim();
}

Back to the top