oracle.cabo.image.painter
Class DirectionalBorderPainter
java.lang.Object
|
+--oracle.cabo.image.painter.AbstractPainter
|
+--oracle.cabo.image.painter.AbstractWrappingPainter
|
+--oracle.cabo.image.painter.AbstractBorderPainter
|
+--oracle.cabo.image.painter.DirectionalBorderPainter
- All Implemented Interfaces:
- BorderPainter, Painter
- public class DirectionalBorderPainter
- extends AbstractBorderPainter
A border that insets painting of the wrapped painter by the specified
amount, flipping left and right when drawing in a right-to-left
direction.
Fields inherited from interface oracle.cabo.image.painter.Painter |
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 Summary |
DirectionalBorderPainter(int top,
int left,
int bottom,
int right)
Creates a BorderPainter that
insets painting by the specified amount. |
DirectionalBorderPainter(Painter wrappedPainter,
int top,
int left,
int bottom,
int right)
Creates a BorderPainter that A border that
insets painting of the wrapped painter by the specified amount. |
DirectionalBorderPainter(Painter wrappedPainter,
int top,
int left,
int bottom,
int right,
boolean alwaysAddBorder)
Creates a BorderPainter that A border that
insets painting of the wrapped painter by the specified amount. |
Methods inherited from class oracle.cabo.image.painter.AbstractBorderPainter |
borderContains, contentContains, getBorderPainterAt, getContentPainterAt, getFillInsets, getInsets, getMaximumSize, getMinimumSize, getOwnFillInsets, getPainterAt, getPreferredSize, getSize, isTransparent, paint, paintBorder |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.cabo.image.painter.Painter |
contains |
DirectionalBorderPainter
public DirectionalBorderPainter(int top,
int left,
int bottom,
int right)
- Creates a BorderPainter that
insets painting by the specified amount.
- Parameters:
top
- Amount to inset painting from the top.left
- Amount to inset painting from the left.bottom
- Amount to inset painting from the bottom.right
- Amount to inset painting from the right.
DirectionalBorderPainter
public DirectionalBorderPainter(Painter wrappedPainter,
int top,
int left,
int bottom,
int right)
- Creates a BorderPainter that A border that
insets painting of the wrapped painter by the specified amount.
- Parameters:
wrappedPainter
- Painter to wrap this border around.top
- Amount to inset painting from the top.left
- Amount to inset painting from the left.bottom
- Amount to inset painting from the bottom.right
- Amount to inset painting from the right.
DirectionalBorderPainter
public DirectionalBorderPainter(Painter wrappedPainter,
int top,
int left,
int bottom,
int right,
boolean alwaysAddBorder)
- Creates a BorderPainter that A border that
insets painting of the wrapped painter by the specified amount.
- Parameters:
wrappedPainter
- Painter to wrap this border around.top
- Amount to inset painting from the top.left
- Amount to inset painting from the left.bottom
- Amount to inset painting from the bottom.right
- Amount to inset painting from the right.alwaysAddInsets
- True if the border should always add its insets
to the size of the wrapped painter when computing
its size, even if the wrapped painter's size is
zero.
getOwnInsets
protected ImmInsets getOwnInsets(PaintContext context)
- Returns the insets of just this BorderPainter. These are the insets
that were passed into our constructor.
- Overrides:
getOwnInsets
in class AbstractBorderPainter
- Parameters:
context
- PaintContext to use when getting our own Insets
- Returns:
- The insets of just this BorderPainter.
- See Also:
AbstractBorderPainter.getInsets(oracle.cabo.image.painter.PaintContext)
isBorderTransparent
protected boolean isBorderTransparent(PaintContext context)
- Returns true if the border itself is transparent.
- Overrides:
isBorderTransparent
in class AbstractBorderPainter
- Parameters:
context
- PaintContext to use when determining transparency.
- Returns:
- true if this BorderPainter is transparent.
- See Also:
AbstractBorderPainter.isTransparent(oracle.cabo.image.painter.PaintContext)
getRepaintFlags
public int getRepaintFlags(PaintContext context)
- Returns the flags indicating the conditions under which the
Painter must be repainted.
- Overrides:
getRepaintFlags
in class AbstractWrappingPainter
- Parameters:
context
- Context to use for determining the conditions under
which reapinting is required.
- Returns:
- Flags indicating the conditions under which this Painter must
be repainted.
getInvalidateFlags
public int getInvalidateFlags(PaintContext context)
- Returns the flags indicating the conditions under which the
Painter must be invalidated.
- Overrides:
getInvalidateFlags
in class AbstractWrappingPainter
- Parameters:
context
- Context to use for determining the conditions under
which reapinting is required.
- Returns:
- Flags indicating the conditions under which this Painter must
be invalidated.