public class CellBorderPainter
extends oracle.bali.ewt.painter.AbstractBorderPainter
implements java.io.Serializable
CellBorderPainter
draws a number of border styles of a specified
color around the four edges of a paint area. One may independently
specify which of the four edges are drawn and in what style.
Six types of border styles are supported - solid, dashed, dotted, dot-dash,
dash-dot-dot and double solid line.
CellBorderPainter
's are created and accessed with the
factory method CellBorderPainter.getPainter()
which
provides for the sharing of instances of identical painters.
STATE_ACTIVE_CHANGED, STATE_ARMED_CHANGED, STATE_BACKGROUND_CHANGED, STATE_ENABLED_CHANGED, STATE_FOCUSED_CHANGED, STATE_FONT_CHANGED, STATE_FOREGROUND_CHANGED, STATE_ISDEFAULT_CHANGED, STATE_MOUSE_OVER_CHANGED, STATE_READING_DIRECTION_CHANGED, STATE_SELECTED_CHANGED, STATE_SET_CHANGED, STATE_SIZE_CHANGED, STATE_XALIGNMENT_CHANGED, STATE_YALIGNMENT_CHANGED
Constructor and Description |
---|
CellBorderPainter(java.awt.Color color,
int lineWidth,
int top,
int left,
int bottom,
int right)
Clients use getPainter factory method.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getBorderBottomColor()
Hidden
|
int |
getBorderBottomLineWidth()
Hidden
|
java.awt.Color |
getBorderLeftColor()
Hidden
|
int |
getBorderLeftLineWidth()
Hidden
|
java.awt.Color |
getBorderRightColor()
Hidden
|
int |
getBorderRightLineWidth()
Hidden
|
boolean |
getBorderSeparateSetting()
Hidden
|
java.awt.Color |
getBorderTopColor()
Hidden
|
int |
getBorderTopLineWidth()
Hidden
|
oracle.bali.ewt.util.ImmInsets |
getOwnInsets(oracle.bali.ewt.painter.PaintContext context)
Return insets for current border.
|
static CellBorderPainter |
getPainter(java.awt.Color color,
int lineWidth,
int top,
int left,
int bottom,
int right,
boolean separated)
Factory method used to create and access
CellBorderPainter
instances. |
protected boolean |
isBorderTransparent(oracle.bali.ewt.painter.PaintContext context)
Returns true if border itself is transparent.
|
protected void |
paintBorder(oracle.bali.ewt.painter.PaintContext context,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paints border for the given cell area.
|
void |
setBorderBottomColor(java.awt.Color color)
Hidden
|
void |
setBorderBottomLineWidth(int width)
Hidden
|
void |
setBorderLeftColor(java.awt.Color color)
Hidden
|
void |
setBorderLeftLineWidth(int width)
Hidden
|
void |
setBorderRightColor(java.awt.Color color)
Hidden
|
void |
setBorderRightLineWidth(int width)
Hidden
|
void |
setBorderSeparateSetting(boolean trueOrFalse)
Hidden
|
void |
setBorderTopColor(java.awt.Color color)
Hidden
|
void |
setBorderTopLineWidth(int width)
Hidden
|
borderContains, contentContains, getBorderPainterAt, getContentPainterAt, getFillInsets, getInsets, getMaximumSize, getMinimumSize, getOwnFillInsets, getPainterAt, getPreferredSize, getSize, isTransparent, paint
getInvalidateFlags, getRepaintFlags, getWrappedPainter
public CellBorderPainter(java.awt.Color color, int lineWidth, int top, int left, int bottom, int right)
public static CellBorderPainter getPainter(java.awt.Color color, int lineWidth, int top, int left, int bottom, int right, boolean separated)
CellBorderPainter
instances. Multiple calls to this method with the same parameters
returns the same instance.
color
- color of the line(s)linewidth
- pixel width of the line(s). linewidth is considered
for solid borders only. It is ignored for other
border styles.top
- the line style for top side.
Valid values are :
ViewStyle.BORDER_STYLE_SOLID
ViewStyle.BORDER_STYLE_DASH
ViewStyle.BORDER_STYLE_DOT
ViewStyle.BORDER_STYLE_DOT_DASH
ViewStyle.BORDER_STYLE_DASH_DOT_DOT
ViewStyle.BORDER_STYLE_DOUBLE
ViewStyle.BORDER_STYLE_NO_LINEleft
- the line style for left side.
Valid values are :
ViewStyle.BORDER_STYLE_SOLID
ViewStyle.BORDER_STYLE_DASH
ViewStyle.BORDER_STYLE_DOT
ViewStyle.BORDER_STYLE_DOT_DASH
ViewStyle.BORDER_STYLE_DASH_DOT_DOT
ViewStyle.BORDER_STYLE_DOUBLE
ViewStyle.BORDER_STYLE_NO_LINEbottom
- the line style for bottom side.
Valid values are :
ViewStyle.BORDER_STYLE_SOLID
ViewStyle.BORDER_STYLE_DASH
ViewStyle.BORDER_STYLE_DOT
ViewStyle.BORDER_STYLE_DOT_DASH
ViewStyle.BORDER_STYLE_DASH_DOT_DOT
ViewStyle.BORDER_STYLE_DOUBLE
ViewStyle.BORDER_STYLE_NO_LINEright
- the line style for right side.
Valid values are :
ViewStyle.BORDER_STYLE_SOLID
ViewStyle.BORDER_STYLE_DASH
ViewStyle.BORDER_STYLE_DOT
ViewStyle.BORDER_STYLE_DOT_DASH
ViewStyle.BORDER_STYLE_DASH_DOT_DOT
ViewStyle.BORDER_STYLE_DOUBLE
ViewStyle.BORDER_STYLE_NO_LINEprotected void paintBorder(oracle.bali.ewt.painter.PaintContext context, java.awt.Graphics g, int x, int y, int width, int height)
paintBorder
in class oracle.bali.ewt.painter.AbstractBorderPainter
context
- PaintContext to use when painting the Borderg
- Graphics context to use when paintingx
- x coordinate to begin painting aty
- y coordinate to begin painting atwidth
- width of area to paintheight
- height of area to paintpublic oracle.bali.ewt.util.ImmInsets getOwnInsets(oracle.bali.ewt.painter.PaintContext context)
getOwnInsets
in class oracle.bali.ewt.painter.AbstractBorderPainter
public void setBorderSeparateSetting(boolean trueOrFalse)
public boolean getBorderSeparateSetting()
public void setBorderTopLineWidth(int width)
public void setBorderLeftLineWidth(int width)
public void setBorderBottomLineWidth(int width)
public void setBorderRightLineWidth(int width)
public int getBorderTopLineWidth()
public int getBorderLeftLineWidth()
public int getBorderBottomLineWidth()
public int getBorderRightLineWidth()
public void setBorderTopColor(java.awt.Color color)
public void setBorderLeftColor(java.awt.Color color)
public void setBorderBottomColor(java.awt.Color color)
public void setBorderRightColor(java.awt.Color color)
public java.awt.Color getBorderTopColor()
public java.awt.Color getBorderLeftColor()
public java.awt.Color getBorderBottomColor()
public java.awt.Color getBorderRightColor()
protected boolean isBorderTransparent(oracle.bali.ewt.painter.PaintContext context)
isBorderTransparent
in class oracle.bali.ewt.painter.AbstractBorderPainter
context
- PaintContext to use when determining transparency.true
if this BorderPainter is transparent.