コード例 #1
0
 public void setDividerBorder(Border newBorder) {
   try {
     int divider = this.getDividerSize();
     BasicSplitPaneUI currentUI = (BasicSplitPaneUI) this.getUI();
     BasicSplitPaneDivider div = currentUI.getDivider();
     div.setBorder(newBorder);
     this.setDividerSize(divider);
   } catch (Exception e) {
   }
 }
コード例 #2
0
ファイル: WebSplitPaneUI.java プロジェクト: hackereye/weblaf
  /**
   * Uninstalls UI from the specified component.
   *
   * @param c component with this UI
   */
  @Override
  public void uninstallUI(final JComponent c) {
    splitPane.removePropertyChangeListener(
        WebLookAndFeel.ORIENTATION_PROPERTY, propertyChangeListener);

    super.uninstallUI(c);
  }
コード例 #3
0
 /**
  * Installs the UI.
  *
  * @param c
  */
 @Override
 public void installUI(JComponent c) {
   super.installUI(c);
   c.setOpaque(false);
   //  BasicBorders$SplitPaneBorder paints gray border
   //  resulting in a 2pt border for the left/right components
   //  but results in 1pt gray line on top/button of divider.
   //  Still, a 1 pt shaddow light gay line is painted
   c.setBorder(null);
 } //  installUI
コード例 #4
0
ファイル: WebSplitPaneUI.java プロジェクト: hackereye/weblaf
  /**
   * Installs UI in the specified component.
   *
   * @param c component for this UI
   */
  @Override
  public void installUI(final JComponent c) {
    super.installUI(c);

    // Default settings
    SwingUtils.setOrientation(splitPane);
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(6);

    // Updating border
    updateBorder();

    // Orientation change listener
    propertyChangeListener =
        new PropertyChangeListener() {
          @Override
          public void propertyChange(final PropertyChangeEvent evt) {
            updateBorder();
          }
        };
    splitPane.addPropertyChangeListener(
        WebLookAndFeel.ORIENTATION_PROPERTY, propertyChangeListener);
  }