本文整理汇总了Java中javax.swing.border.BevelBorder.LOWERED属性的典型用法代码示例。如果您正苦于以下问题:Java BevelBorder.LOWERED属性的具体用法?Java BevelBorder.LOWERED怎么用?Java BevelBorder.LOWERED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.swing.border.BevelBorder
的用法示例。
在下文中一共展示了BevelBorder.LOWERED属性的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: testBorder
@Test
public void testBorder() throws Exception {
final int borderStyle = BevelBorder.LOWERED;
final Color upper = Color.GREEN;
final Color lower = Color.CYAN;
etchedBorderDecorator.set(borderStyle, upper, lower);
final EtchedBorder etchedBorder = new EtchedBorder(borderStyle, upper, lower);
final Border border = button.getBorder();
assertEquals(border.getClass(), etchedBorder.getClass());
assertEquals(((EtchedBorder) border).getEtchType(), etchedBorder.getEtchType());
assertEquals(((EtchedBorder) border).getHighlightColor(), etchedBorder.getHighlightColor());
assertEquals(((EtchedBorder) border).getShadowColor(), etchedBorder.getShadowColor());
assertEquals(border.isBorderOpaque(), etchedBorder.isBorderOpaque());
}
示例3: testBorder
@Test
public void testBorder() throws Exception {
final int borderStyle = BevelBorder.LOWERED;
final Color upper = Color.GREEN;
final Color lower = Color.CYAN;
bevelBorderDecorator.set(borderStyle, upper, lower);
final BevelBorder bevel = new BevelBorder(borderStyle, upper, lower);
assertEquals(button.getBorder().getClass(), bevel.getClass());
assertEquals(((BevelBorder)button.getBorder()).getBevelType(), bevel.getBevelType());
assertEquals(((BevelBorder)button.getBorder()).getHighlightInnerColor(), bevel.getHighlightInnerColor());
assertEquals(((BevelBorder)button.getBorder()).getShadowInnerColor(), bevel.getShadowInnerColor());
assertEquals(((BevelBorder)button.getBorder()).getHighlightOuterColor(), bevel.getHighlightOuterColor());
assertEquals(((BevelBorder)button.getBorder()).getShadowOuterColor(), bevel.getShadowOuterColor());
}
示例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: createTitledBorder
public static TitledBorder createTitledBorder( String title ) {
return new TitledBorder( new BevelBorder( BevelBorder.LOWERED ), title, TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, new PhetFont( 16, true ) ) {
public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) {
Graphics2D g2 = (Graphics2D) g;
g2.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );
super.paintBorder( c, g, x, y, width, height );
}
};
}
示例7: 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;
}
示例8: createSoftBevelBorder
public static Border createSoftBevelBorder(int type) {
if (type == BevelBorder.RAISED) {
return createRaisedSoftBevelBorder();
}
if (type == BevelBorder.LOWERED) {
return createLoweredSoftBevelBorder();
}
return null;
}
示例9: getLoweredBevelBorderUIResource
/**
* Returns a shared instance of {@link BevelBorderUIResource} whose
* <code>bevelType</code> is {@link
* javax.swing.border.BevelBorder#LOWERED}.
*
* @see javax.swing.border.BevelBorder
*/
public static Border getLoweredBevelBorderUIResource()
{
/* Swing is not designed to be thread-safe, so there is no
* need to synchronize the access to the global variable.
*/
if (loweredBevelBorderUIResource == null)
loweredBevelBorderUIResource = new BevelBorderUIResource(
BevelBorder.LOWERED);
return loweredBevelBorderUIResource;
}
示例10: testSafeBorderBehavingDelegate
@Test
public void testSafeBorderBehavingDelegate() {
JComponent comp = new JButton();
AbstractBorder delegate = new BevelBorder(BevelBorder.LOWERED);
SafeBorder border = new SafeBorder(delegate);
assertNotNull(border.getBorderInsets(comp));
assertNotNull(border.getBorderInsets(comp, null));
}
示例11: testBorder
@Test
public void testBorder() throws Exception {
final int borderStyle = BevelBorder.LOWERED;
final Color upper = Color.GREEN;
final Color lower = Color.CYAN;
final BevelBorder bevel = new BevelBorder(borderStyle, upper, lower);
compoundBorderDecorator.set(bevel);
assertEquals(button.getBorder().getClass(), CompoundBorder.class);
assertEquals(((CompoundBorder)button.getBorder()).getInsideBorder(),bevel );
}
示例12: InputIndentationValidDotIndent
/** Creates a new instance of InputIndentationValidDotIndent */ //indent:4 exp:4
public InputIndentationValidDotIndent() { //indent:4 exp:4
System.lineSeparator(); //indent:8 exp:8
String. //indent:8 exp:8
CASE_INSENSITIVE_ORDER.reversed(); //indent:12 exp:12
String.CASE_INSENSITIVE_ORDER. //indent:8 exp:8
reversed(); //indent:12 exp:12
String. //indent:8 exp:8
CASE_INSENSITIVE_ORDER. //indent:12 exp:12
reversed(); //indent:16 exp:16
String //indent:8 exp:8
.CASE_INSENSITIVE_ORDER //indent:12 exp:12
.reversed(); //indent:16 exp:16
BevelBorder border = new javax.swing.border.BevelBorder(BevelBorder.LOWERED); //indent:8 exp:8
border = new javax.swing.border. //indent:8 exp:8
BevelBorder(BevelBorder.LOWERED); //indent:12 exp:12
border = new javax.swing.border.BevelBorder( //indent:8 exp:8
BevelBorder.LOWERED); //indent:12 exp:12
border = new javax. //indent:8 exp:8
swing. //indent:12 exp:12
border. //indent:16 exp:16
BevelBorder(BevelBorder.LOWERED); //indent:20 exp:20
border = //indent:8 exp:8
new javax. //indent:12 exp:12
swing //indent:16 exp:16
.border //indent:20 exp:20
.BevelBorder(BevelBorder.LOWERED); //indent:24 exp:24
border = //indent:8 exp:8
new javax. //indent:12 exp:12
swing //indent:16 exp:16
.border //indent:20 exp:20
.BevelBorder(BevelBorder. //indent:24 exp:24
LOWERED); //indent:28 exp:28
Class<MetalButtonUI> c = javax.swing. //indent:8 exp:8
plaf.metal.MetalButtonUI.class; //indent:12 exp:12
Class<MetalButtonUI> c1 = javax.swing //indent:8 exp:8
.plaf.metal.MetalButtonUI.class; //indent:12 exp:12
Class<MetalButtonUI> c2 = javax.swing //indent:8 exp:8
.plaf.metal. //indent:12 exp:12
MetalButtonUI.class; //indent:16 exp:16
Class<MetalButtonUI> c3 = javax.swing //indent:8 exp:8
.plaf.metal //indent:12 exp:12
.MetalButtonUI.class; //indent:16 exp:16
Class<MetalButtonUI> c4 = javax. //indent:8 exp:8
swing.plaf.metal. //indent:12 exp:12
MetalButtonUI.class; //indent:16 exp:16
border = //indent:8 exp:8
new javax. //indent:12 exp:12
swing //indent:16 exp:16
.border.BevelBorder(BevelBorder. //indent:20 exp:20
LOWERED); //indent:24 exp:24
}
示例13: getDefaultBorder
protected Border getDefaultBorder() {
return new BevelBorder(BevelBorder.LOWERED, Color.lightGray, Color.darkGray);
}
示例14: createLoweredSoftBevelBorder
public static Border createLoweredSoftBevelBorder() {
return new SoftBevelBorder(BevelBorder.LOWERED);
}
示例15: FormatControls
public FormatControls() {
setLayout(new GridLayout(0,1));
EmptyBorder eb = new EmptyBorder(0,0,0,5);
BevelBorder bb = new BevelBorder(BevelBorder.LOWERED);
CompoundBorder cb = new CompoundBorder(eb, bb);
setBorder(new CompoundBorder(cb, new EmptyBorder(8,5,5,5)));
JPanel p1 = new JPanel();
ButtonGroup encodingGroup = new ButtonGroup();
linrB = addToggleButton(p1, encodingGroup, "linear", true);
ulawB = addToggleButton(p1, encodingGroup, "ulaw", false);
alawB = addToggleButton(p1, encodingGroup, "alaw", false);
add(p1);
groups.addElement(encodingGroup);
JPanel p2 = new JPanel();
JPanel p2b = new JPanel();
ButtonGroup sampleRateGroup = new ButtonGroup();
rate8B = addToggleButton(p2, sampleRateGroup, "8000", false);
rate11B = addToggleButton(p2, sampleRateGroup, "11025", false);
rate16B = addToggleButton(p2b, sampleRateGroup, "16000", false);
rate22B = addToggleButton(p2b, sampleRateGroup, "22050", false);
rate44B = addToggleButton(p2b, sampleRateGroup, "44100", true);
add(p2);
add(p2b);
groups.addElement(sampleRateGroup);
JPanel p3 = new JPanel();
ButtonGroup sampleSizeInBitsGroup = new ButtonGroup();
size8B = addToggleButton(p3, sampleSizeInBitsGroup, "8", false);
size16B = addToggleButton(p3, sampleSizeInBitsGroup, "16", true);
add(p3);
groups.addElement(sampleSizeInBitsGroup);
JPanel p4 = new JPanel();
ButtonGroup signGroup = new ButtonGroup();
signB = addToggleButton(p4, signGroup, "signed", true);
unsignB = addToggleButton(p4, signGroup, "unsigned", false);
add(p4);
groups.addElement(signGroup);
JPanel p5 = new JPanel();
ButtonGroup endianGroup = new ButtonGroup();
litB = addToggleButton(p5, endianGroup, "little endian", false);
bigB = addToggleButton(p5, endianGroup, "big endian", true);
add(p5);
groups.addElement(endianGroup);
JPanel p6 = new JPanel();
ButtonGroup channelsGroup = new ButtonGroup();
monoB = addToggleButton(p6, channelsGroup, "mono", false);
sterB = addToggleButton(p6, channelsGroup, "stereo", true);
add(p6);
groups.addElement(channelsGroup);
}