borland.jbcl Packages  borland.jbcl Class Hierarchy  borland.jbcl.view 

BorderItemPainter component

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

About the BorderItemPainter component

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" 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
See the tables in the About section above.

BOTTOM_LEFT

  public static final int BOTTOM_LEFT = BOTTOM | LEFT

See the tables in the About section above.

BOTTOM_RIGHT

  public static final int BOTTOM_RIGHT = BOTTOM | RIGHT

See the tables in the About section above.

BUTTON_DN

  public static final int BUTTON_DN = 7

See the tables in the About section above.

BUTTON_UP

  public static final int BUTTON_UP = 6

See the tables in the About section above.

EDGE_ALL

  public static final int EDGE_ALL = 0x0F00

See the tables in the About section above.

EDGE_BUMP

  public static final int EDGE_BUMP = OUTER_RAISED | INNER_SUNKEN

See the tables in the About section above.

EDGE_ETCHED

  public static final int EDGE_ETCHED = OUTER_SUNKEN | INNER_RAISED

See the tables in the About section above.

EDGE_INNER

  public static final int EDGE_INNER = 0x0C00

See the tables in the About section above.

EDGE_OUTER

  public static final int EDGE_OUTER = 0x0300

See the tables in the About section above.

EDGE_RAISED

  public static final int EDGE_RAISED = OUTER_RAISED | INNER_RAISED

See the tables in the About section above.

EDGE_SUNKEN

  public static final int EDGE_SUNKEN = OUTER_SUNKEN | INNER_SUNKEN

See the tables in the About section above.

EMBOSSED

  public static final int EMBOSSED = 4

See the tables in the About section above.

FILL

  public static final int FILL = 0x0800

See the tables in the About section above.

FLAT

  public static final int FLAT = 0x4000

See the tables in the About section above.

GROOVED

  public static final int GROOVED = 5

See the tables in the About section above.

INNER_RAISED

  public static final int INNER_RAISED = 0x0400

See the tables in the About section above.

INNER_SUNKEN

  public static final int INNER_SUNKEN = 0x0800

See the tables in the About section above.

LEFT

  public static final int LEFT = 0x01

See the tables in the About section above.

MONO

  public static final int MONO = 0x8000

See the tables in the About section above.

NONE

  public static final int NONE = 0

See the tables in the About section above.

OUTER_RAISED

  public static final int OUTER_RAISED = 0x0100

See the tables in the About section above.

OUTER_SUNKEN

  public static final int OUTER_SUNKEN = 0x0200

See the tables in the About section above.

PLAIN

  public static final int PLAIN = 1

See the tables in the About section above.

RAISED

  public static final int RAISED = 2

See the tables in the About section above.

RECESSED

  public static final int RECESSED = 3

See the tables in the About section above.

RECT

  public static final int RECT = TOP | LEFT | BOTTOM | RIGHT

See the tables in the About section above.

RIGHT

  public static final int RIGHT = 0x04

See the tables in the About section above.

SOFT

  public static final int SOFT = 0x1000

See the tables in the About section above.

TOP

  public static final int TOP = 0x02

See the tables in the About section above.

TOP_LEFT

  public static final int TOP_LEFT = TOP | LEFT

See the tables in the About section above.

TOP_RIGHT

  public static final int TOP_RIGHT = TOP | RIGHT

See the tables in the About section above.

WELL_SET

  public static final int WELL_SET = 10

See the tables in the About section above.

WND_RAISED

  public static final int WND_RAISED = 8

See the tables in the About section above.

WND_RECESSED

  public static final int WND_RECESSED = 9

See the tables in the About section above.


BorderItemPainter constructors

BorderItemPainter()

  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.

BorderItemPainter(borland.jbcl.model.ItemPainter)

  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.

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

  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.

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

  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.

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

  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.

BorderItemPainter(int)

  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.

BorderItemPainter(int, int)

  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.

BorderItemPainter(int, int, int)

  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.


BorderItemPainter properties

edgeOrStyle

 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.

flags

 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.

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(borland.jbcl.model.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. See the "which" table at top.


BorderItemPainter methods

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

  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.