コード例 #1
0
ファイル: PlasticToolBarUI.java プロジェクト: srnsw/xena
 /** Checks and answers if we should add a pseudo 3D effect. */
 private boolean is3D() {
   if (PlasticUtils.force3D(toolBar)) return true;
   if (PlasticUtils.forceFlat(toolBar)) return false;
   return PlasticUtils.is3D(PROPERTY_PREFIX)
       && (HeaderStyle.from(toolBar) != null)
       && (BorderStyle.from(toolBar, PlasticLookAndFeel.BORDER_STYLE_KEY) != BorderStyle.EMPTY);
 }
コード例 #2
0
ファイル: PlasticToolBarUI.java プロジェクト: srnsw/xena
 /**
  * Installs a special border, if either a look-dependent <code>BorderStyle</code> or a
  * look-independent <code>HeaderStyle</code> has been specified. A look specific <code>BorderStyle
  * </code> shadows a <code>HeaderStyle</code>.
  *
  * <p>Specifying a <code>HeaderStyle</code> is recommend.
  */
 private void installSpecialBorder() {
   String suffix;
   BorderStyle borderStyle = BorderStyle.from(toolBar, PlasticLookAndFeel.BORDER_STYLE_KEY);
   if (borderStyle == BorderStyle.EMPTY) suffix = "emptyBorder";
   else if (borderStyle == BorderStyle.ETCHED) suffix = "etchedBorder";
   else if (borderStyle == BorderStyle.SEPARATOR) suffix = "separatorBorder";
   else {
     HeaderStyle headerStyle = HeaderStyle.from(toolBar);
     if (headerStyle == HeaderStyle.BOTH) suffix = "headerBorder";
     else if (headerStyle == HeaderStyle.SINGLE && is3D()) suffix = "etchedBorder";
     else suffix = "border";
   }
   LookAndFeel.installBorder(toolBar, PROPERTY_PREFIX + suffix);
 }