jbcl.view Package
java.lang.Object +----com.borland.jbcl.view.BorderItemPainter
Variables Constructors Properties Methods
Implements ItemPainter, Serializable
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.
edgeOrStyle
parameter.
edgeOrStyle
parameter.
which
parameter.
flags
parameter.
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 = 0x08For more information, see the "Which" edges to draw table in the "About the
BorderItemPainter
component" section.
public static final int BOTTOM_LEFT = BOTTOM | LEFT
For more information, see the "Which" edges to draw table in the "About the BorderItemPainter
component" section.
public static final int BOTTOM_RIGHT = BOTTOM | RIGHT
For more information, see the "Which" edges to draw table in the "About the BorderItemPainter
component" section.
public static final int BUTTON_DN = 7
For more information, see the "Style" types table in the "About the BorderItemPainter
component" section.
public static final int BUTTON_UP = 6
For more information, see the "Style" types table in the "About the BorderItemPainter
component" section.
public static final int EDGE_ALL = 0x0F00
For more information, see the "Edge" types table in the "About the BorderItemPainter
component" section.
public static final int EDGE_BUMP = OUTER_RAISED | INNER_SUNKEN
For more information, see the "Edge" types table in the "About the BorderItemPainter
component" section.
public static final int EDGE_ETCHED = OUTER_SUNKEN | INNER_RAISED
For more information, see the "Edge" types table in the "About the BorderItemPainter
component" section.
public static final int EDGE_INNER = 0x0C00
For more information, see the "Edge" types table in the "About the BorderItemPainter
component" section.
public static final int EDGE_OUTER = 0x0300
For more information, see the "Edge" types table in the "About the BorderItemPainter
component" section.
public static final int EDGE_RAISED = OUTER_RAISED | INNER_RAISED
For more information, see the "Edge" types table in the "About the BorderItemPainter
component" section.
public static final int EDGE_SUNKEN = OUTER_SUNKEN | INNER_SUNKEN
For more information, see the "Edge" types table in the "About the BorderItemPainter
component" section.
public static final int EMBOSSED = 4
For more information, see the "Style" types table in the "About the BorderItemPainter
component" section.
public static final int FILL = 0x0800
For more information, see the "Flags" for style table in the "About the BorderItemPainter
component" section.
public static final int FLAT = 0x4000
For more information, see the "Flags" for style table in the "About the BorderItemPainter
component" section.
public static final int GROOVED = 5
For more information, see the "Style" types table in the "About the BorderItemPainter
component" section.
public static final int INNER_RAISED = 0x0400
For more information, see the "Edge" types table in the "About the BorderItemPainter
component" section.
public static final int INNER_SUNKEN = 0x0800
For more information, see the "Edge" types table in the "About the BorderItemPainter
component" section.
public static final int LEFT = 0x01
For more information, see the "Which" edges to draw table in the "About the BorderItemPainter
component" section.
public static final int MONO = 0x8000
For more information, see the "Flags" for style table in the "About the BorderItemPainter
component" section.
public static final int NONE = 0
For more information, see the "Style" types table in the "About the BorderItemPainter
component" section.
public static final int OUTER_RAISED = 0x0100
For more information, see the "Edge" types table in the "About the BorderItemPainter
component" section.
public static final int OUTER_SUNKEN = 0x0200
For more information, see the "Edge" types table in the "About the BorderItemPainter
component" section.
public static final int PLAIN = 1
For more information, see the "Style" types table in the "About the BorderItemPainter
component" section.
public static final int RAISED = 2
For more information, see the "Style" types table in the "About the BorderItemPainter
component" section.
public static final int RECESSED = 3
For more information, see the "Style" types table in the "About the BorderItemPainter
component" section.
public static final int RECT = TOP | LEFT | BOTTOM | RIGHT
For more information, see the "Which" edges to draw table in the "About the BorderItemPainter
component" section.
public static final int RIGHT = 0x04
For more information, see the "Which" edges to draw table in the "About the BorderItemPainter
component" section.
public static final int SOFT = 0x1000
For more information, see the "Flags" for style table in the "About the BorderItemPainter
component" section.
public static final int TOP = 0x02
For more information, see the "Which" edges to draw table in the "About the BorderItemPainter
component" section.
public static final int TOP_LEFT = TOP | LEFT
For more information, see the "Which" edges to draw table in the "About the BorderItemPainter
component" section.
public static final int TOP_RIGHT = TOP | RIGHT
For more information, see the "Which" edges to draw table in the "About the BorderItemPainter
component" section.
public static final int WELL_SET = 10
For more information, see the "Style" types table in the "About the BorderItemPainter
component" section.
public static final int WND_RAISED = 8
For more information, see the "Style" types table in the "About the BorderItemPainter
component" section.
public static final int WND_RECESSED = 9
For more information, see the "Style" types table in the "About the BorderItemPainter
component" section.
public BorderItemPainter()Constructs a
BorderItemPainter
with the following parameters:
painter |
Default. |
Border edgeOrStyle |
None. |
which edges to paint |
All four sides. |
Special style flags |
0 mask. |
For more information, see the following tables in the "About the BorderItemPainter
component" section:
public BorderItemPainter(ItemPainter painter)Constructs a
BorderItemPainter
with the following parameters:
painter |
Passed as parameter. |
Border edgeOrStyle |
None. |
which edges to paint |
All four sides. |
Special style flags |
0 mask. |
For more information, see the following tables in the "About the BorderItemPainter
component" section:
public BorderItemPainter(ItemPainter painter, int edgeOrStyle)Constructs a
BorderItemPainter
with the following parameters:
painter |
Passed as parameter. |
Border edgeOrStyle |
Passed as parameter. |
which edges to paint |
All four sides. |
Special style flags |
0 mask. |
For more information, see the following tables in the "About the BorderItemPainter
component" section:
public BorderItemPainter(ItemPainter painter, int edgeOrStyle, int which)Constructs a
BorderItemPainter
with the following parameters:
painter |
Passed as parameter. |
Border edgeOrStyle |
Passed as parameter. |
which edges to paint |
Passed as parameter. |
Special style flags |
0 mask. |
For more information, see the following tables in the "About the BorderItemPainter
component" section:
public BorderItemPainter(ItemPainter painter, int edgeOrStyle, int which, int flags)Constructs a
BorderItemPainter
with the following parameters:
painter |
Passed as parameter. |
Border edgeOrStyle |
Passed as parameter. |
which edges to paint |
Passed as parameter. |
Special style flags |
Passed as parameter. |
For more information, see the following tables in the "About the BorderItemPainter
component" section:
public BorderItemPainter(int edgeOrStyle)Constructs a
BorderItemPainter
with the following parameters:
painter |
Default. |
Border edgeOrStyle |
Passed as parameter. |
which edges to paint |
All four sides. |
Special style flags |
0 mask. |
For more information, see the following tables in the "About the BorderItemPainter
component" section:
public BorderItemPainter(int edgeOrStyle, int which)Constructs a
BorderItemPainter
with the following parameters:
painter |
Default. |
Border edgeOrStyle |
Passed as parameter. |
which edges to paint |
Passed as parameter. |
Special style flags |
0 mask. |
For more information, see the following tables in the "About the BorderItemPainter
component" section:
public BorderItemPainter(int edgeOrStyle, int which, int flags)Constructs a
BorderItemPainter
with the following parameters:
painter |
Default. |
Border edgeOrStyle |
Passed as parameter. |
which edges to paint |
Passed as parameter. |
Special style flags |
Passed as parameter. |
For more information, see the following tables in the "About the BorderItemPainter
component" section:
public int getEdgeOrStyle() public void setEdgeOrStyle(int newEdge)The
edgeOrStyle
property stores the border style.
For more information, see the following tables in the "About the BorderItemPainter
component" section:
public int getFlags() public void setFlags(int newFlags)The
flags
property stores the special style flags to tweak the look.
For more information, see the "Flags" for style table in the "About the BorderItemPainter
component" section.
public Insets getInsets()The
insets
property stores the distance between the border and the items inside the border.
public ItemPainter getPainter() public void setPainter(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. For more information, see the "Which" edges to draw table in the "About the BorderItemPainter
component" section.
public static boolean drawEdge(Graphics g, 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.