1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 package org.utgenome.gwt.utgb.client.ui;
26
27 import org.utgenome.gwt.utgb.client.track.Design;
28
29 import com.google.gwt.user.client.ui.AbsolutePanel;
30 import com.google.gwt.user.client.ui.Composite;
31 import com.google.gwt.user.client.ui.HorizontalPanel;
32 import com.google.gwt.user.client.ui.VerticalPanel;
33 import com.google.gwt.user.client.ui.Widget;
34
35
36
37
38
39 public class TrackFrame extends Composite implements Frame {
40
41 private final HorizontalPanel layoutFrame = new HorizontalPanel();
42 private final RoundCornerFrame frameBorder = new RoundCornerFrame("999999", 2, RoundCornerFrame.NORTH | RoundCornerFrame.SOUTH | RoundCornerFrame.WEST);
43 private final AbsolutePanel titleFrame = new AbsolutePanel();
44 private final HorizontalPanel iconFrame = new HorizontalPanel();
45
46 private Icon iconConfig = new Icon(Design.getIconImage(Design.ICON_CONFIG));
47 private Icon iconAdjust = new Icon(Design.getIconImage(Design.ICON_PACK));
48 private Icon iconMinmize = new Icon(Design.getIconImage(Design.ICON_HIDE));
49 private Icon iconClose = new Icon(Design.getIconImage(Design.ICON_CLOSE));
50
51 private FixedWidthLabel titleLabel = new FixedWidthLabel("Window Title Message (this is a sample message)", 150);
52
53 private boolean isConfigurable = true;
54 private boolean isAdjustable = true;
55 private boolean isMinimizable = true;
56 private boolean isClosable = true;
57
58 public TrackFrame()
59 {
60 buildGUI();
61 initWidget(layoutFrame);
62 }
63
64 protected void buildGUI()
65 {
66 frameBorder.setPixelSize(150, 20);
67 titleFrame.setSize("100%", "100%");
68 frameBorder.setWidget(titleFrame);
69
70 iconFrame.setSpacing(0);
71 iconFrame.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);
72
73 if(isConfigurable)
74 {
75 iconFrame.add(iconConfig);
76 }
77 if(isAdjustable)
78 iconFrame.add(iconAdjust);
79 if(isMinimizable)
80 iconFrame.add(iconMinmize);
81 if(isClosable)
82 iconFrame.add(iconClose);
83
84 titleFrame.add(titleLabel);
85 titleFrame.add(iconFrame, 50, 0);
86
87 layoutFrame.add(frameBorder);
88
89
90
91
92 }
93
94
95 public Widget getTitleBar() {
96
97 return null;
98 }
99
100 public boolean isAdjustable() {
101
102 return false;
103 }
104
105 public boolean isClosable() {
106
107 return false;
108 }
109
110 public boolean isConfigurable() {
111
112 return false;
113 }
114
115 public boolean isHorizontallyResizable() {
116
117 return false;
118 }
119
120 public boolean isMinimizable() {
121
122 return false;
123 }
124
125 public boolean isVerticallyResizable() {
126
127 return false;
128 }
129
130 public void setAdjustable(boolean enable) {
131
132
133 }
134
135 public void setClosable(boolean enable) {
136
137
138 }
139
140 public void setConfigurable(boolean enable) {
141
142
143 }
144
145 public void setHeight(int height) {
146
147
148 }
149
150 public void setHorizontallyRisizable(boolean enable) {
151
152
153 }
154
155 public void setMinimizable(boolean enable) {
156
157
158 }
159
160 public void setSize(int width, int height) {
161
162
163 }
164
165 public void setVerticallyRisizable(boolean enable) {
166
167
168 }
169
170 public void setVisible(boolean visible) {
171
172
173 }
174
175 public void setWidth(int width) {
176
177
178 }
179
180
181
182 }
183
184
185
186