📄 borderuiresource.java
字号:
* @param bevelType the desired appearance of the border. The value * must be either {@link javax.swing.border.BevelBorder#RAISED} * or {@link javax.swing.border.BevelBorder#LOWERED}. * * @param highlight the color that will be used for the inner side * of the highlighted edges (top and left if if * <code>bevelType</code> is {@link * javax.swing.border.BevelBorder#RAISED}; bottom and right * otherwise). The color for the outer side is a brightened * version of this color. * * @param shadow the color that will be used for the outer side of * the shadowed edges (bottom and right if * <code>bevelType</code> is {@link * javax.swing.border.BevelBorder#RAISED}; top and left * otherwise). The color for the inner side is a brightened * version of this color. * * @throws IllegalArgumentException if <code>bevelType</code> has * an unsupported value. * * @throws NullPointerException if <code>highlight</code> or * <code>shadow</code> is <code>null</code>. */ public BevelBorderUIResource(int bevelType, Color highlight, Color shadow) { super(bevelType, highlight, shadow); } /** * Constructs a BevelBorderUIResource given its appearance type * and all its colors. * * <p><img src="../border/doc-files/BevelBorder-3.png" width="500" * height="150" alt="[An illustration showing BevelBorders that * were constructed with this method]" /> * * @param bevelType the desired appearance of the border. The value * must be either {@link javax.swing.border.BevelBorder#RAISED} * or {@link javax.swing.border.BevelBorder#LOWERED}. * * @param highlightOuter the color that will be used for the outer * side of the highlighted edges (top and left if * <code>bevelType</code> is {@link * javax.swing.border.BevelBorder#RAISED}; bottom and right * otherwise). * * @param highlightInner the color that will be used for the inner * side of the highlighted edges. * * @param shadowOuter the color that will be used for the outer * side of the shadowed edges (bottom and right if * <code>bevelType</code> is {@link * javax.swing.border.BevelBorder#RAISED}; top and left * otherwise). * * @param shadowInner the color that will be used for the inner * side of the shadowed edges. * * @throws IllegalArgumentException if <code>bevelType</code> has * an unsupported value. * * @throws NullPointerException if one of the passed colors * is <code>null</code>. */ public BevelBorderUIResource(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) { super(bevelType, highlightOuter, highlightInner, shadowOuter, shadowInner); } } /** * A {@link javax.swing.border.CompoundBorder} that also implements the * {@link UIResource} marker interface. This is useful for * implementing pluggable look-and-feels: When switching the current * LookAndFeel, only those borders are replaced that are marked as * {@link UIResource}. For this reason, a look-and-feel should * always install borders that implement <code>UIResource</code>, * such as the borders provided by this class. * * @author Brian Jones (cbj@gnu.org) * @author Sascha Brawer (brawer@dandelis.ch) */ public static class CompoundBorderUIResource extends CompoundBorder implements UIResource, Serializable { /** * Constructs a CompoundBorderUIResource with the specified inside * and outside borders. * * @param outsideBorder the outside border, which is painted to the * outside of both <code>insideBorder</code> and the enclosed * component. It is acceptable to pass <code>null</code>, in * which case no outside border is painted. * * @param insideBorder the inside border, which is painted to * between <code>outsideBorder</code> and the enclosed * component. It is acceptable to pass <code>null</code>, in * which case no inside border is painted. */ public CompoundBorderUIResource(Border outsideBorder, Border insideBorder) { super(outsideBorder, insideBorder); } } /** * An {@link javax.swing.border.EmptyBorder} that also implements the * {@link UIResource} marker interface. This is useful for * implementing pluggable look-and-feels: When switching the current * LookAndFeel, only those borders are replaced that are marked as * {@link UIResource}. For this reason, a look-and-feel should * always install borders that implement <code>UIResource</code>, * such as the borders provided by this class. * * <p><img src="../border/doc-files/EmptyBorder-1.png" * width="290" height="200" * alt="[An illustration of EmptyBorder]" /> * * @author Brian Jones (cbj@gnu.org) * @author Sascha Brawer (brawer@dandelis.ch) */ public static class EmptyBorderUIResource extends EmptyBorder implements UIResource, Serializable { /** * Constructs an empty border given the number of pixels required * on each side. * * @param top the number of pixels that the border will need * for its top edge. * * @param left the number of pixels that the border will need * for its left edge. * * @param bottom the number of pixels that the border will need * for its bottom edge. * * @param right the number of pixels that the border will need * for its right edge. */ public EmptyBorderUIResource(int top, int left, int bottom, int right) { super(top, left, bottom, right); } /** * Constructs an empty border given the number of pixels required * on each side, passed in an Insets object. * * @param insets the Insets for the new border. */ public EmptyBorderUIResource(Insets insets) { super(insets); } } /** * An {@link javax.swing.border.EtchedBorder} that also implements the * {@link UIResource} marker interface. This is useful for * implementing pluggable look-and-feels: When switching the current * LookAndFeel, only those borders are replaced that are marked as * {@link UIResource}. For this reason, a look-and-feel should * always install borders that implement <code>UIResource</code>, * such as the borders provided by this class. * * <p><img src="../border/doc-files/EtchedBorder-1.png" width="500" * height="200" alt="[An illustration of the two EtchedBorder * variants]" /> * * @author Brian Jones (cbj@gnu.org) * @author Sascha Brawer (brawer@dandelis.ch) */ public static class EtchedBorderUIResource extends EtchedBorder implements UIResource, Serializable { /** * Constructs an EtchedBorderUIResource that appears lowered into * the surface. The colors will be derived from the background * color of the enclosed Component when the border gets painted. */ public EtchedBorderUIResource() { super(); } /** * Constructs an EtchedBorderUIResource with the specified * appearance. The colors will be derived from the background * color of the enclosed Component when the border gets painted. * * <p><img src="../border/doc-files/EtchedBorder-1.png" * width="500" height="200" alt="[An illustration of the two * EtchedBorder variants]" /> * * @param etchType the desired appearance of the border. The value * must be either {@link javax.swing.border.EtchedBorder#RAISED} * or {@link javax.swing.border.EtchedBorder#LOWERED}. * * @throws IllegalArgumentException if <code>etchType</code> has * an unsupported value. */ public EtchedBorderUIResource(int etchType) { super(etchType); } /** * Constructs a lowered EtchedBorderUIResource, explicitly * selecting the colors that will be used for highlight and * shadow. * * @param highlight the color that will be used for painting * the highlight part of the border. * * @param shadow the color that will be used for painting * the shadow part of the border. * * @see #EtchedBorderUIResource(int, Color, Color) */ public EtchedBorderUIResource(Color highlight, Color shadow) { super(highlight, shadow); } /** * Constructs an EtchedBorderUIResource with the specified * appearance, explicitly selecting the colors that will be used * for highlight and shadow. * * <p><img src="../border/doc-files/EtchedBorder-2.png" width="500" * height="200" alt="[An illustration that shows which pixels get * painted in what color]" /> * * @param etchType the desired appearance of the border. The value * must be either {@link javax.swing.border.EtchedBorder#RAISED} * or {@link javax.swing.border.EtchedBorder#LOWERED}. * * @param highlight the color that will be used for painting * the highlight part of the border. * * @param shadow the color that will be used for painting * the shadow part of the border. * * @throws IllegalArgumentException if <code>etchType</code> has * an unsupported value. */ public EtchedBorderUIResource(int etchType, Color highlight, Color shadow) { super(etchType, highlight, shadow); } } /** * A {@link javax.swing.border.LineBorder} that also implements the * {@link UIResource} marker interface. This is useful for * implementing pluggable look-and-feels: When switching the current * LookAndFeel, only those borders are replaced that are marked as * {@link UIResource}. For this reason, a look-and-feel should * always install borders that implement <code>UIResource</code>, * such as the borders provided by this class. * * <p><img src="../border/doc-files/LineBorder-1.png" width="500" * height="200" alt="[An illustration of two LineBorders] /> * * @author Brian Jones (cbj@gnu.org) * @author Sascha Brawer (brawer@dandelis.ch) */ public static class LineBorderUIResource extends LineBorder implements UIResource, Serializable { /** * Constructs a LineBorderUIResource given its color. The border * will be one pixel thick and have plain corners. * * @param color the color for drawing the border. */ public LineBorderUIResource(Color color) { super(color);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -