Revision 45707 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/dispose/DisposablesDoListLayout.java
DisposablesDoListLayout.java | ||
---|---|---|
1 | 1 |
package org.gvsig.app.extension.dispose; |
2 | 2 |
|
3 |
import com.jeta.open.i18n.I18NUtils; |
|
4 |
import com.jgoodies.forms.layout.CellConstraints; |
|
5 |
import com.jgoodies.forms.layout.FormLayout; |
|
3 | 6 |
import java.awt.BorderLayout; |
4 | 7 |
import java.awt.ComponentOrientation; |
5 | 8 |
import java.awt.Container; |
6 | 9 |
import java.awt.Dimension; |
7 |
|
|
8 | 10 |
import javax.swing.Box; |
9 | 11 |
import javax.swing.ImageIcon; |
10 | 12 |
import javax.swing.JButton; |
13 |
import javax.swing.JFrame; |
|
11 | 14 |
import javax.swing.JLabel; |
12 | 15 |
import javax.swing.JPanel; |
13 | 16 |
import javax.swing.JSplitPane; |
14 | 17 |
|
15 |
import com.jgoodies.forms.layout.CellConstraints; |
|
16 |
import com.jgoodies.forms.layout.FormLayout; |
|
17 | 18 |
|
18 |
|
|
19 | 19 |
public class DisposablesDoListLayout extends JPanel |
20 | 20 |
{ |
21 | 21 |
JButton disposeButton = new JButton(); |
... | ... | |
24 | 24 |
JLabel messageLabel = new JLabel(); |
25 | 25 |
JButton refreshButton = new JButton(); |
26 | 26 |
JSplitPane splitPanel = new JSplitPane(); |
27 |
JLabel lblTotalMemory = new JLabel(); |
|
28 |
JLabel lblFreeMemory = new JLabel(); |
|
29 |
JLabel lblMaxMemory = new JLabel(); |
|
30 |
JLabel lblActiveThreads = new JLabel(); |
|
31 |
JLabel lblObjectPendingFinalization = new JLabel(); |
|
27 | 32 |
|
28 | 33 |
/** |
29 | 34 |
* Default constructor |
... | ... | |
115 | 120 |
public JPanel createPanel() |
116 | 121 |
{ |
117 | 122 |
JPanel jpanel1 = new JPanel(); |
118 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
|
|
123 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,CENTER:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
|
|
119 | 124 |
CellConstraints cc = new CellConstraints(); |
120 | 125 |
jpanel1.setLayout(formlayout1); |
121 | 126 |
|
... | ... | |
140 | 145 |
jpanel1.add(disposeAllButton,cc.xy(5,6)); |
141 | 146 |
|
142 | 147 |
messageLabel.setName("messageLabel"); |
143 |
jpanel1.add(messageLabel,cc.xy(2,6)); |
|
148 |
messageLabel.setText("Pending ?"); |
|
149 |
messageLabel.setHorizontalAlignment(JLabel.TRAILING); |
|
150 |
jpanel1.add(messageLabel,new CellConstraints(2,6,1,1,CellConstraints.LEFT,CellConstraints.DEFAULT)); |
|
144 | 151 |
|
145 | 152 |
refreshButton.setActionCommand("Refresh"); |
146 | 153 |
refreshButton.setName("refreshButton"); |
147 | 154 |
refreshButton.setText("Refresh"); |
148 | 155 |
jpanel1.add(refreshButton,cc.xy(3,6)); |
149 | 156 |
|
150 |
splitPanel.setDividerLocation(120);
|
|
157 |
splitPanel.setDividerLocation(40);
|
|
151 | 158 |
splitPanel.setLastDividerLocation(-1); |
152 | 159 |
splitPanel.setName("splitPanel"); |
153 | 160 |
splitPanel.setOneTouchExpandable(true); |
154 | 161 |
splitPanel.setOrientation(0); |
155 | 162 |
jpanel1.add(splitPanel,cc.xywh(2,4,8,1)); |
156 | 163 |
|
157 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10 },new int[]{ 1,2,3,4,5,6,7 }); |
|
164 |
jpanel1.add(createPanel1(),cc.xywh(2,8,8,1)); |
|
165 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10 },new int[]{ 1,2,3,4,5,6,7,8,9 }); |
|
158 | 166 |
return jpanel1; |
159 | 167 |
} |
160 | 168 |
|
169 |
public JPanel createPanel1() |
|
170 |
{ |
|
171 |
JPanel jpanel1 = new JPanel(); |
|
172 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
|
173 |
CellConstraints cc = new CellConstraints(); |
|
174 |
jpanel1.setLayout(formlayout1); |
|
175 |
|
|
176 |
JLabel jlabel1 = new JLabel(); |
|
177 |
jlabel1.setText("Total mem."); |
|
178 |
jlabel1.setToolTipText("Total memory in Kb"); |
|
179 |
jpanel1.add(jlabel1,cc.xy(1,1)); |
|
180 |
|
|
181 |
JLabel jlabel2 = new JLabel(); |
|
182 |
jlabel2.setText("Free mem."); |
|
183 |
jpanel1.add(jlabel2,cc.xy(5,1)); |
|
184 |
|
|
185 |
JLabel jlabel3 = new JLabel(); |
|
186 |
jlabel3.setText("Max mem."); |
|
187 |
jpanel1.add(jlabel3,cc.xy(9,1)); |
|
188 |
|
|
189 |
lblTotalMemory.setName("lblTotalMemory"); |
|
190 |
lblTotalMemory.setText("0"); |
|
191 |
lblTotalMemory.setToolTipText("Total memory in Kb"); |
|
192 |
jpanel1.add(lblTotalMemory,cc.xy(3,1)); |
|
193 |
|
|
194 |
lblFreeMemory.setName("lblFreeMemory"); |
|
195 |
lblFreeMemory.setText("0"); |
|
196 |
lblFreeMemory.setToolTipText("Free memory in Kb"); |
|
197 |
jpanel1.add(lblFreeMemory,cc.xy(7,1)); |
|
198 |
|
|
199 |
lblMaxMemory.setName("lblMaxMemory"); |
|
200 |
lblMaxMemory.setText("0"); |
|
201 |
lblMaxMemory.setToolTipText("Max memory in kb"); |
|
202 |
jpanel1.add(lblMaxMemory,cc.xy(11,1)); |
|
203 |
|
|
204 |
JLabel jlabel4 = new JLabel(); |
|
205 |
jlabel4.setText("Threads"); |
|
206 |
jlabel4.setToolTipText("Active threads"); |
|
207 |
jpanel1.add(jlabel4,cc.xy(13,1)); |
|
208 |
|
|
209 |
lblActiveThreads.setName("lblActiveThreads"); |
|
210 |
lblActiveThreads.setText("0"); |
|
211 |
lblActiveThreads.setToolTipText("Active threads"); |
|
212 |
jpanel1.add(lblActiveThreads,cc.xy(15,1)); |
|
213 |
|
|
214 |
JLabel jlabel5 = new JLabel(); |
|
215 |
jlabel5.setText("O.P.F"); |
|
216 |
jlabel5.setToolTipText("Objects pending finalization count."); |
|
217 |
jpanel1.add(jlabel5,cc.xy(17,1)); |
|
218 |
|
|
219 |
lblObjectPendingFinalization.setName("lblObjectPendingFinalization"); |
|
220 |
lblObjectPendingFinalization.setText("0"); |
|
221 |
lblObjectPendingFinalization.setToolTipText("Objects pending finalization count."); |
|
222 |
jpanel1.add(lblObjectPendingFinalization,cc.xy(19,1)); |
|
223 |
|
|
224 |
addFillComponents(jpanel1,new int[]{ 2,4,6,8,10,12,14,16,18 },new int[0]); |
|
225 |
return jpanel1; |
|
226 |
} |
|
227 |
|
|
161 | 228 |
/** |
162 | 229 |
* Initializer |
163 | 230 |
*/ |
Also available in: Unified diff