UIX 2.2.16

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.


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.
 
Method Summary
protected  ImmInsets getOwnInsets(PaintContext context)
          Returns the insets of just this BorderPainter.
 
Methods inherited from class oracle.cabo.image.painter.AbstractBorderPainter
getFillInsets, getInsets, getMinimumSize, getOwnFillInsets, getPreferredSize, paint, paintBorder
 
Methods inherited from class oracle.cabo.image.painter.AbstractWrappingPainter
getWrappedPainter
 
Methods inherited from class oracle.cabo.image.painter.AbstractPainter
getData, getDataKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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)

UIX 2.2.16