borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.view
java.lang.Object +----borland.jbcl.view.BorderItemPainter
Variables Constructors Properties Methods
Implements ItemPainter
Paints a shaded, 3-dimensional border around model-view controls. Puts a specific border state around another item painter. Borders can have a number of different painting styles and 3-dimensional effects. These styles are defined by constants which are used and combined as boolean masks.
This class contains several groups of constants. To differentiate these groups of constants, pay close attention to the terminology used for this class. The terms "edge", "style", and "flags" overlap (all these constants could be called "edge style flags"), but these terms are used to designate three distinct groups of constants. The groups of constants are defined below, in the same order as the constructor arguments.
"Edge" types
Below are the constants to describe border edge styles at a low level of abstraction. This is the "edge" part of the edgeOrStyle parameter for the constructors. edgeOrStyle defaults to NONE.
OUTER_RAISED | Raised outer edge only. |
OUTER_SUNKEN | Sunken outer edge only. |
INNER_RAISED | Raised inner edge only. |
INNER_SUNKEN | Sunken inner edge only. |
EDGE_OUTER | Mask for outer edge bits. |
EDGE_INNER | Mask for inner edge bits. |
EDGE_RAISED | Both inner and outer raised. |
EDGE_SUNKEN | Both inner and outer sunken. |
EDGE_ETCHED | Outer sunken, inner raised. |
EDGE_BUMP | Outer raised, inner sunken. |
EDGE_ALL | Mask for inner edge bits. |
Below are the constants to describe border edge-styles at a high level of abstraction. These border styles define certain prepackaged combinations of edges and flags. This is the "style" part of the edgeOrStyle parameter for the constructors. edgeOrStyle defaults to NONE.
You can define a flag directly, by using the flags parameter of a BorderItemPainter constructor, or indirectly, by using a "style" constant.
NONE | No border painted at all. |
PLAIN | Plain window frame. |
RAISED | Status field style raised. |
RECESSED | Status field style recessed. |
EMBOSSED | Grouping raised emboss bead. |
GROOVED | Grouping groove. |
BUTTON_UP | Button in up position. |
BUTTON_DN | Button in down position. |
WND_RAISED | Raised window outer and inner edge. |
WND_RECESSED | Input field and other window recessed. |
WELL_SET | Well option set (auto grows +1). |
Below are the constants to describe which edge to draw. The constructor defaults to RECT, which is all four edges. Used for the which argument that can be sent to the BorderItemPainter constructors.
LEFT | Left edge. |
TOP | Top edge. |
RIGHT | Right edge. |
BOTTOM | Bottom edge. |
TOP_LEFT | Top and left edges. |
TOP_RIGHT | Top and right edges. |
BOTTOM_LEFT | Bottom and left edges. |
BOTTOM_RIGHT | Bottom and right edges. |
RECT | Left, right, top, and bottom edges. |
Below are the special flags to tweak the look. Used for the flags argument for constructors. flags defaults to 0, which means to use no special flags except for any that might be included in a "style" constant passed as the edgeOrStyle parameter.
FILL | Fill-in the entire area enclosed by the border. |
SOFT | A soft-edge look for buttons. |
FLAT | A flat look, for use in non-3D windows. |
MONO | Monochrome. |
public static final int BOTTOM = 0x08See the tables in the About section above.
public static final int BOTTOM_LEFT = BOTTOM | LEFT
See the tables in the About section above.
public static final int BOTTOM_RIGHT = BOTTOM | RIGHT
See the tables in the About section above.
public static final int BUTTON_DN = 7
See the tables in the About section above.
public static final int BUTTON_UP = 6
See the tables in the About section above.
public static final int EDGE_ALL = 0x0F00
See the tables in the About section above.
public static final int EDGE_BUMP = OUTER_RAISED | INNER_SUNKEN
See the tables in the About section above.
public static final int EDGE_ETCHED = OUTER_SUNKEN | INNER_RAISED
See the tables in the About section above.
public static final int EDGE_INNER = 0x0C00
See the tables in the About section above.
public static final int EDGE_OUTER = 0x0300
See the tables in the About section above.
public static final int EDGE_RAISED = OUTER_RAISED | INNER_RAISED
See the tables in the About section above.
public static final int EDGE_SUNKEN = OUTER_SUNKEN | INNER_SUNKEN
See the tables in the About section above.
public static final int EMBOSSED = 4
See the tables in the About section above.
public static final int FILL = 0x0800
See the tables in the About section above.
public static final int FLAT = 0x4000
See the tables in the About section above.
public static final int GROOVED = 5
See the tables in the About section above.
public static final int INNER_RAISED = 0x0400
See the tables in the About section above.
public static final int INNER_SUNKEN = 0x0800
See the tables in the About section above.
public static final int LEFT = 0x01
See the tables in the About section above.
public static final int MONO = 0x8000
See the tables in the About section above.
public static final int NONE = 0
See the tables in the About section above.
public static final int OUTER_RAISED = 0x0100
See the tables in the About section above.
public static final int OUTER_SUNKEN = 0x0200
See the tables in the About section above.
public static final int PLAIN = 1
See the tables in the About section above.
public static final int RAISED = 2
See the tables in the About section above.
public static final int RECESSED = 3
See the tables in the About section above.
public static final int RECT = TOP | LEFT | BOTTOM | RIGHT
See the tables in the About section above.
public static final int RIGHT = 0x04
See the tables in the About section above.
public static final int SOFT = 0x1000
See the tables in the About section above.
public static final int TOP = 0x02
See the tables in the About section above.
public static final int TOP_LEFT = TOP | LEFT
See the tables in the About section above.
public static final int TOP_RIGHT = TOP | RIGHT
See the tables in the About section above.
public static final int WELL_SET = 10
See the tables in the About section above.
public static final int WND_RAISED = 8
See the tables in the About section above.
public static final int WND_RECESSED = 9
See the tables in the About section above.
public BorderItemPainter()Constructs a BorderItemPainter. See tables at top.
painter | Default. |
Border edgeOrStyle | None. |
which edges to paint | All four sides. |
Special style flags | 0 mask. |
public BorderItemPainter(borland.jbcl.model.ItemPainter painter)Constructs a BorderItemPainter. See tables at top.
painter | Passed as parameter. |
Border edgeOrStyle | None. |
which edges to paint | All four sides. |
Special style flags | 0 mask. |
public BorderItemPainter(borland.jbcl.model.ItemPainter painter, int edgeOrStyle)Constructs a BorderItemPainter. See tables at top.
painter | Passed as parameter. |
Border edgeOrStyle | Passed as parameter. |
which edges to paint | All four sides. |
Special style flags | 0 mask. |
public BorderItemPainter(borland.jbcl.model.ItemPainter painter, int edgeOrStyle, int which)Constructs a BorderItemPainter. See tables at top.
painter | Passed as parameter. |
Border edgeOrStyle | Passed as parameter. |
which edges to paint | Passed as parameter. |
Special style flags | 0 mask. |
public BorderItemPainter(borland.jbcl.model.ItemPainter painter, int edgeOrStyle, int which, int flags)Constructs a BorderItemPainter. See tables at top.
painter | Passed as parameter. |
Border edgeOrStyle | Passed as parameter. |
which edges to paint | Passed as parameter. |
Special style flags | Passed as parameter. |
public BorderItemPainter(int edgeOrStyle)Constructs a BorderItemPainter. See tables at top.
painter | Default. |
Border edgeOrStyle | Passed as parameter. |
which edges to paint | All four sides. |
Special style flags | 0 mask. |
public BorderItemPainter(int edgeOrStyle, int which)Constructs a BorderItemPainter. See tables at top.
painter | Default. |
Border edgeOrStyle | Passed as parameter. |
which edges to paint | Passed as parameter. |
Special style flags | 0 mask. |
public BorderItemPainter(int edgeOrStyle, int which, int flags)Constructs a BorderItemPainter. See tables at top.
painter | Default. |
Border edgeOrStyle | Passed as parameter. |
which edges to paint | Passed as parameter. |
Special style flags | Passed as parameter. |
public int getEdgeOrStyle() public void setEdgeOrStyle(int newEdge)The edgeOrStyle property stores the border style. This can be a constant shown in the "edge" table or a constant shown in the "style" table. See tables at top.
public int getFlags() public void setFlags(int newFlags)The flags property stores the special style flags to tweak the look. See the "flags" table at top.
public Insets getInsets()The insets property stores the distance between the border and the items inside the border.
public ItemPainter getPainter() public void setPainter(borland.jbcl.model.ItemPainter newPainter)The painter property stores the item painter to use for this BorderItemPainter.
public int getWhichEdges() public void setWhichEdges(int newWhich)
The whichEdges property stores which of the edges of the border to paint. See the "which" table at top.
public static boolean drawEdge(java.awt.Graphics g, java.awt.Rectangle bounds, int edge, int which, int flags)A static function that performs the actual drawing of edges for a Border, or an external client. Uses the system ::DrawEdge if available.