annotate examples/controlexample/TabFolderTab.d @ 161:eb84f9418bbf

Change module names to this not have examples in the FQN.
author Frank Benoit <benoit@tionex.de>
date Mon, 01 Sep 2008 22:24:27 +0200
parents 4a04b6759f98
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
78
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
1 /*******************************************************************************
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
2 * Copyright (c) 2000, 2007 IBM Corporation and others.
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
3 * All rights reserved. This program and the accompanying materials
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
4 * are made available under the terms of the Eclipse Public License v1.0
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
5 * which accompanies this distribution, and is available at
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
6 * http://www.eclipse.org/legal/epl-v10.html
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
7 *
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
8 * Contributors:
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
9 * IBM Corporation - initial API and implementation
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
10 * Port to the D programming language:
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
11 * Frank Benoit <benoit@tionex.de>
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
12 *******************************************************************************/
161
eb84f9418bbf Change module names to this not have examples in the FQN.
Frank Benoit <benoit@tionex.de>
parents: 78
diff changeset
13 module controlexample.TabFolderTab;
78
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
14
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
15
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
16
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
17 import dwt.DWT;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
18 import dwt.layout.GridData;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
19 import dwt.layout.GridLayout;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
20 import dwt.widgets.Button;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
21 import dwt.widgets.Group;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
22 import dwt.widgets.Item;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
23 import dwt.widgets.TabFolder;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
24 import dwt.widgets.TabItem;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
25 import dwt.widgets.Text;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
26 import dwt.widgets.Widget;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
27
161
eb84f9418bbf Change module names to this not have examples in the FQN.
Frank Benoit <benoit@tionex.de>
parents: 78
diff changeset
28 import controlexample.Tab;
eb84f9418bbf Change module names to this not have examples in the FQN.
Frank Benoit <benoit@tionex.de>
parents: 78
diff changeset
29 import controlexample.ControlExample;
78
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
30 import tango.text.convert.Format;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
31
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
32 class TabFolderTab : Tab {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
33 /* Example widgets and groups that contain them */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
34 TabFolder tabFolder1;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
35 Group tabFolderGroup;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
36
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
37 /* Style widgets added to the "Style" group */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
38 Button topButton, bottomButton;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
39
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
40 static char[] [] TabItems1;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
41
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
42 /**
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
43 * Creates the Tab within a given instance of ControlExample.
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
44 */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
45 this(ControlExample instance) {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
46 super(instance);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
47 if( TabItems1.length is 0 ){
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
48 TabItems1 = [
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
49 ControlExample.getResourceString("TabItem1_0"),
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
50 ControlExample.getResourceString("TabItem1_1"),
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
51 ControlExample.getResourceString("TabItem1_2")];
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
52 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
53 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
54
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
55 /**
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
56 * Creates the "Example" group.
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
57 */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
58 void createExampleGroup () {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
59 super.createExampleGroup ();
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
60
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
61 /* Create a group for the TabFolder */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
62 tabFolderGroup = new Group (exampleGroup, DWT.NONE);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
63 tabFolderGroup.setLayout (new GridLayout ());
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
64 tabFolderGroup.setLayoutData (new GridData (DWT.FILL, DWT.FILL, true, true));
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
65 tabFolderGroup.setText ("TabFolder");
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
66 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
67
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
68 /**
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
69 * Creates the "Example" widgets.
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
70 */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
71 void createExampleWidgets () {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
72
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
73 /* Compute the widget style */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
74 int style = getDefaultStyle();
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
75 if (topButton.getSelection ()) style |= DWT.TOP;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
76 if (bottomButton.getSelection ()) style |= DWT.BOTTOM;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
77 if (borderButton.getSelection ()) style |= DWT.BORDER;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
78
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
79 /* Create the example widgets */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
80 tabFolder1 = new TabFolder (tabFolderGroup, style);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
81 for (int i = 0; i < TabItems1.length; i++) {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
82 TabItem item = new TabItem(tabFolder1, DWT.NONE);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
83 item.setText(TabItems1[i]);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
84 item.setToolTipText(Format( ControlExample.getResourceString("Tooltip"), TabItems1[i] ));
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
85 Text content = new Text(tabFolder1, DWT.WRAP | DWT.MULTI);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
86 content.setText(Format( "{}: {}", ControlExample.getResourceString("TabItem_content"), i));
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
87 item.setControl(content);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
88 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
89 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
90
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
91 /**
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
92 * Creates the "Style" group.
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
93 */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
94 void createStyleGroup() {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
95 super.createStyleGroup ();
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
96
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
97 /* Create the extra widgets */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
98 topButton = new Button (styleGroup, DWT.RADIO);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
99 topButton.setText ("DWT.TOP");
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
100 topButton.setSelection(true);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
101 bottomButton = new Button (styleGroup, DWT.RADIO);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
102 bottomButton.setText ("DWT.BOTTOM");
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
103 borderButton = new Button (styleGroup, DWT.CHECK);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
104 borderButton.setText ("DWT.BORDER");
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
105 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
106
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
107 /**
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
108 * Gets the "Example" widget children's items, if any.
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
109 *
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
110 * @return an array containing the example widget children's items
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
111 */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
112 Item [] getExampleWidgetItems () {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
113 return tabFolder1.getItems();
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
114 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
115
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
116 /**
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
117 * Gets the "Example" widget children.
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
118 */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
119 Widget [] getExampleWidgets () {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
120 return [cast(Widget) tabFolder1 ];
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
121 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
122
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
123 /**
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
124 * Returns a list of set/get API method names (without the set/get prefix)
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
125 * that can be used to set/get values in the example control(s).
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
126 */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
127 char[][] getMethodNames() {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
128 return ["Selection", "SelectionIndex"];
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
129 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
130
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
131 char[] setMethodName(char[] methodRoot) {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
132 /* Override to handle special case of int getSelectionIndex()/setSelection(int) */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
133 return (methodRoot == "SelectionIndex") ? "setSelection" : "set" ~ methodRoot;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
134 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
135
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
136 //PROTING_LEFT
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
137 /+
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
138 Object[] parameterForType(char[] typeName, char[] value, Widget widget) {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
139 if (value.length is 0 ) return new Object[] {new TabItem[0]};
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
140 if (typeName.equals("org.eclipse.swt.widgets.TabItem")) {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
141 TabItem item = findItem(value, ((TabFolder) widget).getItems());
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
142 if (item !is null) return new Object[] {item};
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
143 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
144 if (typeName.equals("[Lorg.eclipse.swt.widgets.TabItem;")) {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
145 char[][] values = split(value, ',');
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
146 TabItem[] items = new TabItem[values.length];
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
147 for (int i = 0; i < values.length; i++) {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
148 items[i] = findItem(values[i], ((TabFolder) widget).getItems());
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
149 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
150 return new Object[] {items};
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
151 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
152 return super.parameterForType(typeName, value, widget);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
153 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
154 +/
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
155 TabItem findItem(char[] value, TabItem[] items) {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
156 for (int i = 0; i < items.length; i++) {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
157 TabItem item = items[i];
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
158 if (item.getText() ==/*eq*/ value) return item;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
159 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
160 return null;
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
161 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
162
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
163 /**
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
164 * Gets the short text for the tab folder item.
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
165 */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
166 public char[] getShortTabText() {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
167 return "TF";
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
168 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
169
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
170 /**
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
171 * Gets the text for the tab folder item.
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
172 */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
173 char[] getTabText () {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
174 return "TabFolder";
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
175 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
176
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
177 /**
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
178 * Sets the state of the "Example" widgets.
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
179 */
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
180 void setExampleWidgetState () {
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
181 super.setExampleWidgetState ();
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
182 topButton.setSelection ((tabFolder1.getStyle () & DWT.TOP) !is 0);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
183 bottomButton.setSelection ((tabFolder1.getStyle () & DWT.BOTTOM) !is 0);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
184 borderButton.setSelection ((tabFolder1.getStyle () & DWT.BORDER) !is 0);
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
185 }
4a04b6759f98 Clean up directory names
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
186 }