public class MarginBorder extends AbstractBorder
| Modifier and Type | Field and Description |
|---|---|
protected Insets |
insets
This border's insets.
|
tempRect| Constructor and Description |
|---|
MarginBorder(Insets insets)
Constructs a MarginBorder with dimensions specified by insets.
|
MarginBorder(int allsides)
Constructs a MarginBorder with equal padding on all sides.
|
MarginBorder(int t,
int l,
int b,
int r)
Constructs a MarginBorder with padding specified by the passed values.
|
| Modifier and Type | Method and Description |
|---|---|
Insets |
getInsets(IFigure figure)
Returns the Insets for this Border for the given Figure.
|
void |
paint(IFigure figure,
Graphics graphics,
Insets insets)
This method does nothing, since this border is just for spacing.
|
getPaintRectangle, getPreferredSize, isOpaqueprotected Insets insets
public MarginBorder(Insets insets)
insets - The Insets for the borderpublic MarginBorder(int t,
int l,
int b,
int r)
t - Top paddingl - Left paddingb - Bottom paddingr - Right paddingpublic MarginBorder(int allsides)
allsides - Padding size for all sides of the border.public Insets getInsets(IFigure figure)
Borderfigure - The figure this border belongs toBorder.getInsets(IFigure)public void paint(IFigure figure, Graphics graphics, Insets insets)
figure - The figure this border belongs tographics - The graphics object used for paintinginsets - The insetsBorder.paint(IFigure, Graphics, Insets)Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.