Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolyn MacLeod2005-02-03 05:57:11 +0000
committerCarolyn MacLeod2005-02-03 05:57:11 +0000
commit93a747937409a27c517ca4a327031f8d31c2bfcd (patch)
tree1a7b41da8fc7fa2aa51f37b3bad47f009d696b1b
parent18fae616a91cd8038a8d5ddff59560d982fa1958 (diff)
downloadeclipse.platform.swt-93a747937409a27c517ca4a327031f8d31c2bfcd.tar.gz
eclipse.platform.swt-93a747937409a27c517ca4a327031f8d31c2bfcd.tar.xz
eclipse.platform.swt-93a747937409a27c517ca4a327031f8d31c2bfcd.zip
*** empty log message ***
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java2
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java14
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java10
3 files changed, 21 insertions, 5 deletions
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java
index 2f0093f1aa..658b824ef5 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java
@@ -280,7 +280,7 @@ class StyledTextTab extends ScrollableTab {
* that can be used to set/get values in the example control(s).
*/
String[] getMethodNames() {
- return new String[] {"CaretOffset", "Content", "DoubleClickEnabled", "Editable", "HorizontalIndex", "HorizontalPixel", "Orientation", "Selection", "Selection", "SelectionBackground", "SelectionForeground", "StyleRanges", "Tabs", "Text", "TextLimit", "TopIndex", "TopPixel", "WordWrap"};
+ return new String[] {"CaretOffset", "DoubleClickEnabled", "Editable", "HorizontalIndex", "HorizontalPixel", "Orientation", "Selection", "Tabs", "Text", "TextLimit", "TopIndex", "TopPixel", "WordWrap"};
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java
index 648c2d638d..1d89c3d54c 100755
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java
@@ -588,6 +588,7 @@ abstract class Tab {
setText.setText("");
getText.setText("");
getValue();
+ setText.setFocus();
}
String setMethodName(String methodRoot) {
@@ -606,7 +607,7 @@ abstract class Tab {
instructions = typeName;
}
instructions += " " + ControlExample.getResourceString("Eg");
- if (typeName.equals("int")) {
+ if (typeName.equals("int") || typeName.equals("long")) {
instructions += "4";
if (returnType.isArray()) instructions += ",5,6";
} else if (typeName.equals("char")) {
@@ -615,16 +616,21 @@ abstract class Tab {
} else if (typeName.equals("boolean")) {
instructions += "true";
if (returnType.isArray()) instructions += ",true";
+ } else if (typeName.equals("java.lang.String")) {
+ instructions += ControlExample.getResourceString("Hello");
+ if (returnType.isArray()) instructions += "," + ControlExample.getResourceString("Hello");
} else if (typeName.equals("org.eclipse.swt.graphics.Point")) {
instructions += "0,0";
- } else if (returnType.isArray()) {
- instructions += "a,b,c";
} else {
- instructions += ControlExample.getResourceString("Hello");
+ instructions += instructionsForType(returnType.getName());
}
return instructions;
}
+ String instructionsForType(String typeName) {
+ return "x";
+ }
+
void getValue() {
String methodName = "get" + nameCombo.getText();
getText.setText("");
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java
index 512ac20eef..4d1519fb70 100755
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java
@@ -349,6 +349,16 @@ class TreeTab extends ScrollableTab {
return null;
}
+ String instructionsForType(String typeName) {
+ if (typeName.equals("org.eclipse.swt.widgets.TreeItem")) {
+ return "Node 1";
+ }
+ if (typeName.equals("[Lorg.eclipse.swt.widgets.TreeItem;")) {
+ return "Node 1,Node 3";
+ }
+ return super.instructionsForType(typeName);
+ }
+
/**
* Gets the text for the tab folder item.
*/

Back to the top