コード例 #1
0
 /**
  * Removes the previous content border from the specified component, and sets an empty border if
  * there has been no border or an UIResource instance before.
  */
 private void stripContentBorder(Object c) {
   if (c instanceof JComponent) {
     JComponent contentComp = (JComponent) c;
     Border contentBorder = contentComp.getBorder();
     if (contentBorder == null || contentBorder instanceof UIResource) {
       contentComp.setBorder(handyEmptyBorder);
     }
   }
 }
コード例 #2
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
コード例 #3
0
  /** Uninstalls the UI delegate for the specified component */
  public void uninstallUI(JComponent c) {
    frame = (JInternalFrame) c;

    Container cont = ((JInternalFrame) (c)).getContentPane();
    if (cont instanceof JComponent) {
      JComponent content = (JComponent) cont;
      if (content.getBorder() == handyEmptyBorder) {
        content.setBorder(null);
      }
    }
    super.uninstallUI(c);
  }