|
UIX 2.2.16 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cabo.image.painter.AbstractPainter | +--oracle.cabo.image.painter.AbstractWrappingPainter | +--oracle.cabo.image.painter.AbstractBorderPainter
Abstract baseclass combining a BorderPainter with the ability to wrap other components. Most BorderPainters are subclasses of this class.
Constructor Summary | |
AbstractBorderPainter()
Creates an AbstractBorderPainter. |
|
AbstractBorderPainter(Painter wrappedPainter)
Creates an AbstractBorderPainter wrapping the wrappedPainter |
|
AbstractBorderPainter(Painter wrappedPainter,
boolean alwaysAddInsets)
Creates an AbstractBorderPainter wrapping the wrappedPainter and using alwaysAddInsets to determine whether to add the border's insets when computing its size. |
Method Summary | |
ImmInsets |
getFillInsets(PaintContext context)
Returns the amount of space by which fills should be inset. |
ImmInsets |
getInsets(PaintContext context)
Returns the insets of this stack of BorderPainters. |
java.awt.Dimension |
getMinimumSize(PaintContext context)
Returns the minimum size of the AbstractBorderPainter. |
protected ImmInsets |
getOwnFillInsets(PaintContext context)
Returns the amount of space by which fills should be inset for this BorderPainter. |
protected ImmInsets |
getOwnInsets(PaintContext context)
Returns the insets of just this BorderPainter, as opposed to the entire nested stack of BorderPainters like getInsets does. |
java.awt.Dimension |
getPreferredSize(PaintContext context)
Returns the preferred size of the AbstractBorderPainter. |
void |
paint(PaintContext context,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paints the Painter wrapped by the AbstractBorderPainter with the AbstractBorderPainter painted around it. |
protected void |
paintBorder(PaintContext context,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paint just the border of the BorderPainter. |
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 |
public AbstractBorderPainter()
public AbstractBorderPainter(Painter wrappedPainter)
wrappedPainter
- Painter to wrap this border around.public AbstractBorderPainter(Painter wrappedPainter, boolean alwaysAddInsets)
wrappedPainter
- Painter to wrap this border around.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 |
public java.awt.Dimension getPreferredSize(PaintContext context)
In general, BorderPainters should not need to override this method, since it already accounts for the Border's insets.
getPreferredSize
in interface Painter
getPreferredSize
in class AbstractWrappingPainter
context
- Context for determining the preferred size.
public java.awt.Dimension getMinimumSize(PaintContext context)
In general, BorderPainters should not need to override this method, since it already accounts for the Border's insets.
getMinimumSize
in interface Painter
getMinimumSize
in class AbstractWrappingPainter
context
- Context for determining the minimum size.
public final void paint(PaintContext context, java.awt.Graphics g, int x, int y, int width, int height)
Painters that modify the Graphics context are responsible for returning it to its initial state when done painting. Further Painters that paint outside the bounds of x, y, width, and height are responsible for clipping themselves to the bounds.
paint
in interface Painter
paint
in class AbstractWrappingPainter
context
- PaintContext to use when paintingg
- 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 paint
paintBorder(oracle.cabo.image.painter.PaintContext, java.awt.Graphics, int, int, int, int)
public final ImmInsets getInsets(PaintContext context)
getInsets
in interface BorderPainter
context
- PaintContext to use when getting the insets
getOwnInsets(oracle.cabo.image.painter.PaintContext)
public final ImmInsets getFillInsets(PaintContext context)
getFillInsets
in interface BorderPainter
context
- the context for paintingprotected ImmInsets getOwnInsets(PaintContext context)
context
- PaintContext to use when getting our own Insets
getInsets(oracle.cabo.image.painter.PaintContext)
protected ImmInsets getOwnFillInsets(PaintContext context)
context
- the context for painting
getFillInsets(oracle.cabo.image.painter.PaintContext)
protected void paintBorder(PaintContext context, java.awt.Graphics g, int x, int y, int width, int height)
Painters that modify the Graphics context are responsible for returning it to its initial state when done painting. Further Painters that paint outside the bounds of x, y, width, and height or inside the area inset by their insets are responsible for clipping themselves.
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 paint
paint(oracle.cabo.image.painter.PaintContext, java.awt.Graphics, int, int, int, int)
|
UIX 2.2.16 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |