public abstract class AbstractFlowBorder extends AbstractBorder implements FlowBorder
FlowBorder
. Subclassing this class will
possibly guarantee compatibility with future changes to the FlowBorder
interface. This class also returns default values for many of the required
methods as a convenience.tempRect
Constructor and Description |
---|
AbstractFlowBorder() |
Modifier and Type | Method and Description |
---|---|
int |
getBottomMargin()
Returns the collapsable bottom margin in pixels.
|
Insets |
getInsets(IFigure figure)
Returns the Insets for this Border for the given Figure.
|
int |
getLeftMargin()
Returns the left margin in pixels.
|
int |
getRightMargin()
Returns the right margin in pixels.
|
int |
getTopMargin()
Returns the collapsable top margin in pixels.
|
void |
paint(FlowFigure figure,
Graphics g,
Rectangle where,
int sides)
Subclasses should override this method to paint each box's border.
|
void |
paint(IFigure figure,
Graphics graphics,
Insets insets)
This method is not called on FlowBorders.
|
getPaintRectangle, getPreferredSize, isOpaque
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPreferredSize, isOpaque
public int getBottomMargin()
FlowBorder
getBottomMargin
in interface FlowBorder
FlowBorder.getBottomMargin()
public Insets getInsets(IFigure figure)
Border
getInsets
in interface Border
figure
- The figure this border belongs toBorder.getInsets(IFigure)
public int getLeftMargin()
FlowBorder
getLeftMargin
in interface FlowBorder
FlowBorder.getLeftMargin()
public int getRightMargin()
FlowBorder
getRightMargin
in interface FlowBorder
FlowBorder.getRightMargin()
public int getTopMargin()
FlowBorder
getTopMargin
in interface FlowBorder
FlowBorder.getTopMargin()
public final void paint(IFigure figure, Graphics graphics, Insets insets)
final
so that clients override the
correct method.paint
in interface Border
figure
- the figuregraphics
- the graphicsinsets
- the insetsFlowBorder.paint(FlowFigure, Graphics, Rectangle, int)
public void paint(FlowFigure figure, Graphics g, Rectangle where, int sides)
paint
in interface FlowBorder
figure
- the flow figure whose border is being paintedg
- the graphicswhere
- the relative location of the boxsides
- bits indicating sides and bidi orientationFlowBorder.paint(FlowFigure, Graphics, Rectangle, int)
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.