311
312
313 /**
314 * Installs the UI.
315 */
316 public void installUI(JComponent c) {
317 splitPane = (JSplitPane) c;
318 dividerLocationIsSet = false;
319 dividerKeyboardResize = false;
320 keepHidden = false;
321 installDefaults();
322 installListeners();
323 installKeyboardActions();
324 setLastDragLocation(-1);
325 }
326
327
328 /**
329 * Installs the UI defaults.
330 */
331 protected void installDefaults(){
332 LookAndFeel.installBorder(splitPane, "SplitPane.border");
333 LookAndFeel.installColors(splitPane, "SplitPane.background",
334 "SplitPane.foreground");
335 LookAndFeel.installProperty(splitPane, "opaque", Boolean.TRUE);
336
337 if (divider == null) divider = createDefaultDivider();
338 divider.setBasicSplitPaneUI(this);
339
340 Border b = divider.getBorder();
341
342 if (b == null || !(b instanceof UIResource)) {
343 divider.setBorder(UIManager.getBorder("SplitPaneDivider.border"));
344 }
345
346 dividerDraggingColor = UIManager.getColor("SplitPaneDivider.draggingColor");
347
348 setOrientation(splitPane.getOrientation());
349
350 // note: don't rename this temp variable to dividerSize
|
311
312
313 /**
314 * Installs the UI.
315 */
316 public void installUI(JComponent c) {
317 splitPane = (JSplitPane) c;
318 dividerLocationIsSet = false;
319 dividerKeyboardResize = false;
320 keepHidden = false;
321 installDefaults();
322 installListeners();
323 installKeyboardActions();
324 setLastDragLocation(-1);
325 }
326
327
328 /**
329 * Installs the UI defaults.
330 */
331 @SuppressWarnings("deprecation")
332 protected void installDefaults(){
333 LookAndFeel.installBorder(splitPane, "SplitPane.border");
334 LookAndFeel.installColors(splitPane, "SplitPane.background",
335 "SplitPane.foreground");
336 LookAndFeel.installProperty(splitPane, "opaque", Boolean.TRUE);
337
338 if (divider == null) divider = createDefaultDivider();
339 divider.setBasicSplitPaneUI(this);
340
341 Border b = divider.getBorder();
342
343 if (b == null || !(b instanceof UIResource)) {
344 divider.setBorder(UIManager.getBorder("SplitPaneDivider.border"));
345 }
346
347 dividerDraggingColor = UIManager.getColor("SplitPaneDivider.draggingColor");
348
349 setOrientation(splitPane.getOrientation());
350
351 // note: don't rename this temp variable to dividerSize
|