当前位置: 首页>>代码示例>>Java>>正文


Java BevelBorder.RAISED属性代码示例

本文整理汇总了Java中javax.swing.border.BevelBorder.RAISED属性的典型用法代码示例。如果您正苦于以下问题:Java BevelBorder.RAISED属性的具体用法?Java BevelBorder.RAISED怎么用?Java BevelBorder.RAISED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.swing.border.BevelBorder的用法示例。


在下文中一共展示了BevelBorder.RAISED属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: BevelTypePropertyEditor

public BevelTypePropertyEditor() {
    super(
        new int[] {
            BevelBorder.RAISED,
            BevelBorder.LOWERED,
        },
        new String[] {
            "javax.swing.border.BevelBorder.RAISED", // NOI18N
            "javax.swing.border.BevelBorder.LOWERED", // NOI18N
        },
        new String[] {
            "VALUE_BevelRaised",  // NOI18N
            "VALUE_BevelLowered", // NOI18N
        }
    );
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:BevelBorderBeanInfo.java

示例2: getInternalFrameBorder

/**
 * Returns a border that is composed of a raised bevel border and a
 * one-pixel thick line border.
 *
 * <p><img src="doc-files/BasicBorders-2.png" width="300" height="200"
 * alt="[A screen shot of a border returned by this method]" />
 *
 * <p>The colors of the border are retrieved from the
 * <code>UIDefaults</code> of the currently active look and feel
 * using the keys <code>&#x201c;InternalFrame.borderShadow&#x201d;</code>,
 * <code>&#x201c;InternalFrame.borderDarkShadow&#x201d;</code>,
 * <code>&#x201c;InternalFrame.borderLight&#x201d;</code>,
 * <code>&#x201c;InternalFrame.borderHighlight&#x201d;</code>, and
 * (for the inner one-pixel thick line)
 * <code>&#x201c;InternalFrame.borderColor&#x201d;</code>.
 */
public static Border getInternalFrameBorder()
{
  Color shadow, darkShadow, highlight, lightHighlight, line;

  /* See comment in methods above for why this border is not shared. */
  shadow = UIManager.getColor("InternalFrame.borderShadow");
  darkShadow = UIManager.getColor("InternalFrame.borderDarkShadow");
  highlight = UIManager.getColor("InternalFrame.borderLight");
  lightHighlight = UIManager.getColor("InternalFrame.borderHighlight");
  line = UIManager.getColor("InternalFrame.borderColor");

  return new BorderUIResource.CompoundBorderUIResource(
    /* outer border */
    new BorderUIResource.BevelBorderUIResource(
      BevelBorder.RAISED,
      (highlight != null) ? highlight : Color.lightGray,
      (lightHighlight != null) ? lightHighlight : Color.white,
      (darkShadow != null) ? darkShadow : Color.black,
      (shadow != null) ? shadow : Color.gray),

    /* inner border */
    new BorderUIResource.LineBorderUIResource(
      (line != null) ? line : Color.lightGray));
}
 
开发者ID:vilie,项目名称:javify,代码行数:40,代码来源:BasicBorders.java

示例3: testGetter

public void testGetter () {
    Scene scene = new Scene ();
    BevelBorder originalBorder = new BevelBorder (BevelBorder.RAISED);
    scene.setBorder (originalBorder);
    Border foundBorder = BorderSupport.getSwingBorder (scene.getBorder ());
    assertEquals (originalBorder, foundBorder);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:SwingBorderGetterTest.java

示例4: handleBevelBorder

private final void handleBevelBorder (org.xml.sax.AttributeList atts) {
    String key = atts.getValue (KEY_ATTR);
    int i = BevelBorder.LOWERED;
    String type = atts.getValue (TYPE_ATTR);
    if (type != null) 
        i = type.equals (TYPE_LOWERED) ? BevelBorder.LOWERED : BevelBorder.RAISED;
    BorderUIResource.BevelBorderUIResource resource = new BorderUIResource.BevelBorderUIResource (i);
    defaults.put (key, resource);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:NbTheme.java

示例5: getBorderByType

private Border getBorderByType(int borderTypeIndex) {
    switch (borderTypeIndex) {
        case 0: {
            return null;
        }
        case 1: {
            return new EmptyBorder(5, 5, 5, 5);
        }
        case 2: {
            return new BasicBorders.MarginBorder();
        }
        case 3: {
            return new BevelBorder(BevelBorder.RAISED);
        }
        case 4: {
            return new BevelBorder(BevelBorder.LOWERED);
        }
        case 5: {
            return new EtchedBorder(EtchedBorder.RAISED);
        }
        case 6: {
            return new EtchedBorder(EtchedBorder.LOWERED);
        }
        case 7: {
            return new LineBorder(Color.BLACK);
        }
    }

    return null;
}
 
开发者ID:exbin,项目名称:deltahex-java,代码行数:30,代码来源:DeltaHexExampleExPanel.java

示例6: setTitle

public void setTitle( String title ) {
    Border border = new TitledBorder( new EtchedBorder( BevelBorder.RAISED,
                                                        new Color( 40, 20, 255 ),
                                                        Color.black ),
                                      title );
    basePanel.setBorder( border );
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:7,代码来源:PumpSpeciesSelectorPanel.java

示例7: createCompoundBorder

protected static CompoundBorder createCompoundBorder() {
    Color[] gradient = new Color[8];
    for( int i = 0; i < gradient.length; i++ ) {
        float value = ( (float)i ) / ( gradient.length - 1 );
        gradient[i] = new Color( 1 - value, 1 - value, 1 - value );
    }
    Border outsiteBorder = new BevelBorder( BevelBorder.RAISED, gradient[0], gradient[1], gradient[7], gradient[6] );
    Border insideBorder = new BevelBorder( BevelBorder.RAISED, gradient[2], gradient[3], gradient[5], gradient[4] );
    return new CompoundBorder( outsiteBorder, insideBorder );
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:10,代码来源:ShinyBorder.java

示例8: createCompoundBorder

protected static CompoundBorder createCompoundBorder() {
    Color[] gradient = new Color[8];
    for ( int i = 0; i < gradient.length; i++ ) {
        float value = ( (float) i ) / ( gradient.length - 1 );
        gradient[i] = new Color( 1 - value, 1 - value, 1 - value );
    }
    Border outsiteBorder = new BevelBorder( BevelBorder.RAISED, gradient[0], gradient[1], gradient[7], gradient[6] );
    Border insideBorder = new BevelBorder( BevelBorder.RAISED, gradient[2], gradient[3], gradient[5], gradient[4] );
    return new CompoundBorder( outsiteBorder, insideBorder );
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:10,代码来源:ShinyPanel.java

示例9: createSharedBevel

static Border createSharedBevel(int type) {
	if (type == BevelBorder.RAISED) {
		return new BevelBorder(BevelBorder.RAISED);
	} else if (type == BevelBorder.LOWERED) {
		return new BevelBorder(BevelBorder.LOWERED);
	}
	return null;
}
 
开发者ID:javalovercn,项目名称:j2se_for_android,代码行数:8,代码来源:BorderFactory.java

示例10: createSoftBevelBorder

public static Border createSoftBevelBorder(int type) {
	if (type == BevelBorder.RAISED) {
		return createRaisedSoftBevelBorder();
	}
	if (type == BevelBorder.LOWERED) {
		return createLoweredSoftBevelBorder();
	}
	return null;
}
 
开发者ID:javalovercn,项目名称:j2se_for_android,代码行数:9,代码来源:BorderFactory.java

示例11: getRaisedBevelBorderUIResource

/**
 * Returns a shared instance of {@link BevelBorderUIResource} whose
 * <code>bevelType</code> is {@link
 * javax.swing.border.BevelBorder#RAISED}.
 *
 * @see javax.swing.border.BevelBorder
 */
public static Border getRaisedBevelBorderUIResource()
{
  /* Swing is not designed to be thread-safe, so there is no
   * need to synchronize the access to the global variable.
   */
  if (raisedBevelBorderUIResource == null)
    raisedBevelBorderUIResource = new BevelBorderUIResource(
      BevelBorder.RAISED);
  return raisedBevelBorderUIResource;
}
 
开发者ID:vilie,项目名称:javify,代码行数:17,代码来源:BorderUIResource.java

示例12: MTTableSelectedCellHighlightBorder

public MTTableSelectedCellHighlightBorder() {
  outsideBorder = new BevelBorder(BevelBorder.RAISED, getHighlightOuterColor(), getHighlightInnerColor(), getShadowOuterColor(),
                                  getShadowInnerColor());
  if (MTConfig.getInstance().isCompactTables()) {
    insideBorder = JBUI.Borders.empty(0, 3);
  } else {
    insideBorder = JBUI.Borders.empty(10, 2);
  }
}
 
开发者ID:ChrisRM,项目名称:material-theme-jetbrains,代码行数:9,代码来源:MTTableSelectedCellHighlightBorder.java

示例13: getObject

protected SoftBevelBorder getObject() {
    return new SoftBevelBorder(BevelBorder.RAISED, Color.RED, Color.GREEN, Color.BLUE, Color.WHITE);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:3,代码来源:javax_swing_border_SoftBevelBorder.java

示例14: getObject

protected BevelBorderUIResource getObject() {
    return new BevelBorderUIResource(BevelBorder.RAISED);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:3,代码来源:javax_swing_plaf_BorderUIResource_BevelBorderUIResource.java

示例15: getObject

protected BevelBorder getObject() {
    return new BevelBorder(BevelBorder.RAISED, Color.RED, Color.GREEN, Color.BLUE, Color.WHITE);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:3,代码来源:javax_swing_border_BevelBorder.java


注:本文中的javax.swing.border.BevelBorder.RAISED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。