本文整理汇总了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
}
);
}
示例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>“InternalFrame.borderShadow”</code>,
* <code>“InternalFrame.borderDarkShadow”</code>,
* <code>“InternalFrame.borderLight”</code>,
* <code>“InternalFrame.borderHighlight”</code>, and
* (for the inner one-pixel thick line)
* <code>“InternalFrame.borderColor”</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));
}
示例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);
}
示例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);
}
示例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;
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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;
}
示例10: createSoftBevelBorder
public static Border createSoftBevelBorder(int type) {
if (type == BevelBorder.RAISED) {
return createRaisedSoftBevelBorder();
}
if (type == BevelBorder.LOWERED) {
return createLoweredSoftBevelBorder();
}
return null;
}
示例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;
}
示例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);
}
}
示例13: getObject
protected SoftBevelBorder getObject() {
return new SoftBevelBorder(BevelBorder.RAISED, Color.RED, Color.GREEN, Color.BLUE, Color.WHITE);
}
示例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);
}