X Tutup
Skip to content

Commit 45c1f4b

Browse files
author
jossonsmith
committed
Update ControlExamples for ToolBar and Menu
1 parent 28100a7 commit 45c1f4b

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

tests/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ public ControlExample(Composite parent) {
6868
// "CTabFolder",
6969
"SashForm",
7070

71-
// "CoolBar",
71+
"CoolBar",
7272
// "Dialog",
7373
"Group",
7474
"Label",
7575
"Link",
7676
"List",
77-
// "Menu",
77+
"Menu",
7878
"ProgressBar",
7979

8080
"Sash",
@@ -85,7 +85,7 @@ public ControlExample(Composite parent) {
8585
"TabFolder",
8686
"Table",
8787
"Text",
88-
// "ToolBar",
88+
"ToolBar",
8989
"Tree"
9090
};
9191
for (int i=0; i<tabs.length; i++) {
@@ -150,11 +150,11 @@ public void run() {
150150
if (control != null && control instanceof Label) {
151151
control.dispose();
152152
}
153-
item.setImage(images[(int) Math.round(3 * Math.random())]);
153+
item.setImage(images[(int) Math.floor(3 * Math.random())]);
154154
tabFolder.setSelection(tabFolder.getSelectionIndex());
155155
item.setControl(page);
156156
} catch (Throwable e) {
157-
//e.printStackTrace();
157+
e.printStackTrace();
158158
throw (Error) e;
159159
}
160160
}
@@ -326,7 +326,7 @@ void initResources() {
326326
* Invokes as a standalone program.
327327
*/
328328
public static void main(String[] args) {
329-
System.out.println("To begin control examples ..."); // bring the correct width and height of XHTML
329+
//System.out.println("To begin control examples ..."); // bring the correct width and height of XHTML
330330
Display display = new Display();
331331
int styleNone = SWT.NONE;
332332
int style = styleNone;

tests/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class CoolBarTab extends Tab {
3636
/**
3737
* Creates the Tab within a given instance of ControlExample.
3838
*/
39-
CoolBarTab(ControlExample instance) {
39+
public CoolBarTab(ControlExample instance) {
4040
super(instance);
4141
}
4242

tests/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/MenuTab.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class MenuTab extends Tab {
3131
/**
3232
* Creates the Tab within a given instance of ControlExample.
3333
*/
34-
MenuTab(ControlExample instance) {
34+
public MenuTab(ControlExample instance) {
3535
super(instance);
3636
}
3737

tests/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ToolBarTab.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ToolBarTab extends Tab {
3131
/**
3232
* Creates the Tab within a given instance of ControlExample.
3333
*/
34-
ToolBarTab(ControlExample instance) {
34+
public ToolBarTab(ControlExample instance) {
3535
super(instance);
3636
}
3737

0 commit comments

Comments
 (0)
X Tutup