jbcl.view Package 

BorderItemPainter component

java.lang.Object
   +----com.borland.jbcl.view.BorderItemPainter

About the BorderItemPainter component

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.

"Edge" constants
Describe inner and outer edges, at a low level of abstraction. This is the "edge" part, or option, of the edgeOrStyle parameter.
"Style" constants
Describe combinations of edges (see above) and flags (see below) at a high level of abstraction. This is the "style" part, or option, of the edgeOrStyle parameter.
"Which" constants
Which edges to draw: left, right, top, bottom, or a combination. This group of constants is isolated from the other groups of constants. This is the which parameter.
"Flags" constants
Special style flags, such as area-fill and soft edges. This is the flags parameter.

"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.


"Style" types

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).


"Which" edges to draw

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.


"Flags" for style

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.


BorderItemPainter variables

Variables implemented in this class

BorderItemPainter constructors

BorderItemPainter properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

BorderItemPainter methods

Methods implemented in this class

Methods implemented in java.lang.Object


BorderItemPainter variables

BOTTOM

  public static final int BOTTOM = 0x08
For more information, see the "Which" edges to draw table in the "About the BorderItemPainter component" section.

BOTTOM_LEFT

  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.

BOTTOM_RIGHT

  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.

BUTTON_DN

  public static final int BUTTON_DN = 7

For more information, see the "Style" types table in the "About the BorderItemPainter component" section.

BUTTON_UP

  public static final int BUTTON_UP = 6

For more information, see the "Style" types table in the "About the BorderItemPainter component" section.

EDGE_ALL

  public static final int EDGE_ALL = 0x0F00

For more information, see the "Edge" types table in the "About the BorderItemPainter component" section.

EDGE_BUMP

  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.

EDGE_ETCHED

  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.

EDGE_INNER

  public static final int EDGE_INNER = 0x0C00

For more information, see the "Edge" types table in the "About the BorderItemPainter component" section.

EDGE_OUTER

  public static final int EDGE_OUTER = 0x0300

For more information, see the "Edge" types table in the "About the BorderItemPainter component" section.

EDGE_RAISED

  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.

EDGE_SUNKEN

  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.

EMBOSSED

  public static final int EMBOSSED = 4

For more information, see the "Style" types table in the "About the BorderItemPainter component" section.

FILL

  public static final int FILL = 0x0800

For more information, see the "Flags" for style table in the "About the BorderItemPainter component" section.

FLAT

  public static final int FLAT = 0x4000

For more information, see the "Flags" for style table in the "About the BorderItemPainter component" section.

GROOVED

  public static final int GROOVED = 5

For more information, see the "Style" types table in the "About the BorderItemPainter component" section.

INNER_RAISED

  public static final int INNER_RAISED = 0x0400

For more information, see the "Edge" types table in the "About the BorderItemPainter component" section.

INNER_SUNKEN

  public static final int INNER_SUNKEN = 0x0800

For more information, see the "Edge" types table in the "About the BorderItemPainter component" section.

LEFT

  public static final int LEFT = 0x01

For more information, see the "Which" edges to draw table in the "About the BorderItemPainter component" section.

MONO

  public static final int MONO = 0x8000

For more information, see the "Flags" for style table in the "About the BorderItemPainter component" section.

NONE

  public static final int NONE = 0

For more information, see the "Style" types table in the "About the BorderItemPainter component" section.

OUTER_RAISED

  public static final int OUTER_RAISED = 0x0100

For more information, see the "Edge" types table in the "About the BorderItemPainter component" section.

OUTER_SUNKEN

  public static final int OUTER_SUNKEN = 0x0200

For more information, see the "Edge" types table in the "About the BorderItemPainter component" section.

PLAIN

  public static final int PLAIN = 1

For more information, see the "Style" types table in the "About the BorderItemPainter component" section.

RAISED

  public static final int RAISED = 2

For more information, see the "Style" types table in the "About the BorderItemPainter component" section.

RECESSED

  public static final int RECESSED = 3

For more information, see the "Style" types table in the "About the BorderItemPainter component" section.

RECT

  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.

RIGHT

  public static final int RIGHT = 0x04

For more information, see the "Which" edges to draw table in the "About the BorderItemPainter component" section.

SOFT

  public static final int SOFT = 0x1000

For more information, see the "Flags" for style table in the "About the BorderItemPainter component" section.

TOP

  public static final int TOP = 0x02

For more information, see the "Which" edges to draw table in the "About the BorderItemPainter component" section.

TOP_LEFT

  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.

TOP_RIGHT

  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.

WELL_SET

  public static final int WELL_SET = 10

For more information, see the "Style" types table in the "About the BorderItemPainter component" section.

WND_RAISED

  public static final int WND_RAISED = 8

For more information, see the "Style" types table in the "About the BorderItemPainter component" section.

WND_RECESSED

  public static final int WND_RECESSED = 9

For more information, see the "Style" types table in the "About the BorderItemPainter component" section.


BorderItemPainter constructors

BorderItemPainter()

  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:

BorderItemPainter(com.borland.jbcl.model.ItemPainter)

  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:

BorderItemPainter(com.borland.jbcl.model.ItemPainter, int)

  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:

BorderItemPainter(com.borland.jbcl.model.ItemPainter, int, int)

  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:

BorderItemPainter(com.borland.jbcl.model.ItemPainter, int, int, int)

  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:

BorderItemPainter(int)

  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:

BorderItemPainter(int, int)

  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:

BorderItemPainter(int, int, int)

  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:


BorderItemPainter properties

edgeOrStyle

 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:

flags

 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.

insets

 public Insets getInsets()
The insets property stores the distance between the border and the items inside the border.

painter

 public ItemPainter getPainter()
 public void setPainter(ItemPainter newPainter)
The painter property stores the item painter to use for this BorderItemPainter.

whichEdges

 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.


BorderItemPainter methods

drawEdge(java.awt.Graphics, java.awt.Rectangle, int, int, int)

  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.