| java.lang.Object org.netbeans.modules.visualweb.css2.CssBorder
CssBorder | public class CssBorder (Code) | | A border which paints according to CSS2 specifications. In particular,
the border brush may have different thickness for the top, bottom,
left and right edges, and each edge may have a different style, such
as solid, dashed, dotted, or inset.
author: Tor Norbye |
Method Summary | |
public static CssBorder | getBorder(Element element) Return a border capable of painting the given element's border
preferences. | public static CssBorder | getBorder(Element element, int defaultWidth, int defaultStyle, int mask) Same as
getBorder(Document, Element) but allows you
to specify a default width and style which will be used for
any border edge that does not have an explicit CSS property
setting. | static CssBorder | getBorder(int style, int width, Color color) Return a border of the given style, width and color. | public Insets | getBorderInsets(Component c) Returns the insets of the border. | public int | getBottomBorderWidth() | public static CssBorder | getDesignerBorder() Return a "designer" border - a border suitable for showing
a selection around a box, distinguishable from a typical
document box. | public static CssBorder | getEmptyBorder() | public int | getLeftBorderWidth() | public int | getRightBorderWidth() | public int | getTopBorderWidth() | public boolean | isBorderOpaque() Returns whether or not the border is opaque. | public void | paintBorder(Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified
position and size. | public String | toString() |
FRAME_BOTTOM | final public static int FRAME_BOTTOM(Code) | | Side below box
|
FRAME_BOX | final public static int FRAME_BOX(Code) | | All sides
|
FRAME_LEFT | final public static int FRAME_LEFT(Code) | | Left-hand-side of box
|
FRAME_RIGHT | final public static int FRAME_RIGHT(Code) | | Right-hand-side of box
|
FRAME_TOP | final public static int FRAME_TOP(Code) | | Side above box
|
FRAME_UNSET | final public static int FRAME_UNSET(Code) | | Same as all sides, but used for the case where we haven't specifically set
the frame/rules property, so I can tell "all" from "not set".
|
FRAME_VOID | final public static int FRAME_VOID(Code) | | No sides
|
STYLE_DASHED | final static int STYLE_DASHED(Code) | | |
STYLE_DOTTED | final static int STYLE_DOTTED(Code) | | |
STYLE_DOUBLE | final static int STYLE_DOUBLE(Code) | | |
STYLE_GROOVE | final static int STYLE_GROOVE(Code) | | |
STYLE_INSET | final static int STYLE_INSET(Code) | | |
STYLE_NONE | final static int STYLE_NONE(Code) | | |
STYLE_OUTSET | final static int STYLE_OUTSET(Code) | | |
STYLE_RIDGE | final static int STYLE_RIDGE(Code) | | |
STYLE_SOLID | final static int STYLE_SOLID(Code) | | |
STYLE_UNKNOWN | final static int STYLE_UNKNOWN(Code) | | |
WIDTH_MEDIUM | final public static int WIDTH_MEDIUM(Code) | | |
WIDTH_THIN | final public static int WIDTH_THIN(Code) | | |
getBorder | public static CssBorder getBorder(Element element)(Code) | | Return a border capable of painting the given element's border
preferences. The top, bottom, right and left parameters list
the border thickness to use for each edge. (These are looked up
by the box (the client of this class) rather than here in the
border since the border dimensions are part of the geometry of
the box.) May return null if no border should be painted.
|
getBorder | public static CssBorder getBorder(Element element, int defaultWidth, int defaultStyle, int mask)(Code) | | Same as
getBorder(Document, Element) but allows you
to specify a default width and style which will be used for
any border edge that does not have an explicit CSS property
setting. This is used to force table cells to take on the
table element's border attribute width, for example.
Parameters: defaultWidth - The default width to use, or -1 if adefault border width should not be set. Parameters: defaultStyle - The default style to use for edges thatdo not specify a border, or STYLE_NONE. |
getBorder | static CssBorder getBorder(int style, int width, Color color)(Code) | | Return a border of the given style, width and color.
Style should be one of STYLE_INSET, etc.
|
getBorderInsets | public Insets getBorderInsets(Component c)(Code) | | Returns the insets of the border.
Parameters: c - the component for which this border insets value applies |
getBottomBorderWidth | public int getBottomBorderWidth()(Code) | | |
getDesignerBorder | public static CssBorder getDesignerBorder()(Code) | | Return a "designer" border - a border suitable for showing
a selection around a box, distinguishable from a typical
document box. The border will therefore probably be in
some light color, with a dashed pattern.
|
getLeftBorderWidth | public int getLeftBorderWidth()(Code) | | |
getRightBorderWidth | public int getRightBorderWidth()(Code) | | |
getTopBorderWidth | public int getTopBorderWidth()(Code) | | |
isBorderOpaque | public boolean isBorderOpaque()(Code) | | Returns whether or not the border is opaque. If the border
is opaque, it is responsible for filling in it's own
background when painting.
|
paintBorder | public void paintBorder(Graphics g, int x, int y, int width, int height)(Code) | | Paints the border for the specified component with the specified
position and size.
Parameters: c - the component for which this border is being painted Parameters: g - the paint graphics Parameters: x - the x position of the painted border Parameters: y - the y position of the painted border Parameters: width - the width of the painted border Parameters: height - the height of the painted border |
|
|