Revision 45763 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretype/DefaultFeatureTypePanel.java
DefaultFeatureTypePanel.java | ||
---|---|---|
10 | 10 |
import javax.swing.AbstractAction; |
11 | 11 |
import javax.swing.JComponent; |
12 | 12 |
import javax.swing.JOptionPane; |
13 |
import javax.swing.JPanel; |
|
14 |
import javax.swing.JScrollBar; |
|
15 |
import javax.swing.JScrollPane; |
|
16 | 13 |
import javax.swing.JSplitPane; |
17 | 14 |
import javax.swing.event.ChangeListener; |
18 | 15 |
import javax.swing.event.ListSelectionEvent; |
... | ... | |
37 | 34 |
import org.gvsig.tools.swing.api.ChangeListenerHelper; |
38 | 35 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
39 | 36 |
import org.gvsig.tools.swing.api.ToolsSwingManager; |
37 |
import org.gvsig.tools.swing.api.ToolsSwingUtils; |
|
40 | 38 |
import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager; |
41 | 39 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
42 | 40 |
import org.gvsig.tools.util.ToolsUtilLocator; |
... | ... | |
232 | 230 |
this.initComponents(); |
233 | 231 |
} |
234 | 232 |
|
235 |
private JSplitPane createVerticalSplit(JPanel container, JPanel top, boolean scrolltop, JPanel bottom, boolean scrollbottom) { |
|
236 |
JComponent compTop = top; |
|
237 |
JComponent compBottom = bottom; |
|
238 |
if( scrolltop ) { |
|
239 |
compTop = new JScrollPane( |
|
240 |
top, |
|
241 |
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, |
|
242 |
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER |
|
243 |
); |
|
244 |
} |
|
245 |
if( scrollbottom ) { |
|
246 |
compBottom = new JScrollPane( |
|
247 |
bottom, |
|
248 |
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, |
|
249 |
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER |
|
250 |
); |
|
251 |
} |
|
252 |
JSplitPane split = new JSplitPane( |
|
253 |
JSplitPane.VERTICAL_SPLIT, |
|
254 |
false, |
|
255 |
compTop, |
|
256 |
compBottom |
|
257 |
); |
|
258 |
split.setOneTouchExpandable(true); |
|
259 |
container.removeAll(); |
|
260 |
container.setLayout(new BorderLayout()); |
|
261 |
container.add(split, BorderLayout.CENTER); |
|
262 |
return split; |
|
263 |
} |
|
264 |
|
|
265 | 233 |
@SuppressWarnings("Convert2Lambda") |
266 | 234 |
private void initComponents() { |
267 | 235 |
ToolsSwingManager swingManager = ToolsSwingLocator.getToolsSwingManager(); |
... | ... | |
270 | 238 |
this.pnlCfgActions.setLayout(new BorderLayout(0,0)); |
271 | 239 |
this.pnlCfgActions.add(c, BorderLayout.CENTER); |
272 | 240 |
|
273 |
this.splRules = createVerticalSplit( |
|
241 |
this.splRules = ToolsSwingUtils.createVerticalSplit(
|
|
274 | 242 |
this.gridRules, |
275 | 243 |
this.gridRulesTable, false, |
276 | 244 |
this.gridRulesDetail, true |
277 | 245 |
); |
278 |
this.splAttributes = createVerticalSplit( |
|
246 |
this.splAttributes = ToolsSwingUtils.createVerticalSplit(
|
|
279 | 247 |
this.gridAttributes, |
280 | 248 |
this.gridAttributesTable, false, |
281 | 249 |
this.gridAttributesDetail, true |
Also available in: Unified diff