| java.lang.Object javax.swing.border.AbstractBorder contrib.ch.randelshofer.quaqua.VisualMargin
VisualMargin | public class VisualMargin extends AbstractBorder implements UIResource(Code) | | The VisualMargin is used to visually align components using bounds
based on other criterias than the clip bounds of the component.
For example: The clip bounds of a JButton includes its cast shadow and its
focus ring. When we align the JButton with a JLabel, we want to align the
baseline of the Text of the JButton with the text in the JLabel.
The visual margin may be quite large. We allow to programmatically set a
smaller margin using the client property "Quaqua.Component.margin".
author: Werner Randelshofer version: 2.2 2005-10-01 Added method getVisualMargin. version: 2.1 2005-06-21 Implements UIResource. version: 2.0 2005-05-08 Renamed from BorderMargin to VisualMargin. Reworked version: API. version: 1.0 31 March 2005 Created. |
Constructor Summary | |
public | VisualMargin() Creates a new VisualMargin. | public | VisualMargin(int top, int left, int bottom, int right) Creates a new VisualMargin. | public | VisualMargin(int top, int left, int bottom, int right, boolean ftop, boolean fleft, boolean fbottom, boolean fright) | public | VisualMargin(boolean ftop, boolean fleft, boolean fbottom, boolean fright) | public | VisualMargin(Insets layoutMargin) Creates a new VisualMargin.
Parameters: layoutMargin - Defines the margin from the clip bounds of thecomponent to its visual bounds. |
VisualMargin | public VisualMargin()(Code) | | Creates a new VisualMargin.
|
VisualMargin | public VisualMargin(int top, int left, int bottom, int right)(Code) | | Creates a new VisualMargin.
Parameters: top - Defines the margin from the clip bounds of thecomponent to its visual bounds. Parameters: left - Defines the margin from the clip bounds of thecomponent to its visual bounds. Parameters: bottom - Defines the margin from the clip bounds of thecomponent to its visual bounds. Parameters: right - Defines the margin from the clip bounds of thecomponent to its visual bounds. |
VisualMargin | public VisualMargin(int top, int left, int bottom, int right, boolean ftop, boolean fleft, boolean fbottom, boolean fright)(Code) | | |
VisualMargin | public VisualMargin(boolean ftop, boolean fleft, boolean fbottom, boolean fright)(Code) | | |
VisualMargin | public VisualMargin(Insets layoutMargin)(Code) | | Creates a new VisualMargin.
Parameters: layoutMargin - Defines the margin from the clip bounds of thecomponent to its visual bounds. The margin has usually negative values! |
getBorderInsets | public Insets getBorderInsets(Component c, Insets insets)(Code) | | Reinitializes the insets parameter with this Border's current Insets.
Parameters: c - the component for which this border insets value applies Parameters: insets - the object to be reinitialized the insets object |
getVisualMargin | protected Insets getVisualMargin(Component c, Insets insets)(Code) | | Reinitializes the insets parameter with this Border's current Insets.
Parameters: c - the component for which this border insets value applies Parameters: insets - the object to be reinitialized the insets object |
setFixed | public void setFixed(boolean top, boolean left, boolean bottom, boolean right)(Code) | | |
setPropertyName | public void setPropertyName(String propertyName)(Code) | | The UIManager Property to be used for the default margin.
|
Methods inherited from javax.swing.border.AbstractBorder | public int getBaseline(Component c, int width, int height)(Code)(Java Doc) public Component.BaselineResizeBehavior getBaselineResizeBehavior(Component c)(Code)(Java Doc) public Insets getBorderInsets(Component c)(Code)(Java Doc) public Insets getBorderInsets(Component c, Insets insets)(Code)(Java Doc) public Rectangle getInteriorRectangle(Component c, int x, int y, int width, int height)(Code)(Java Doc) public static Rectangle getInteriorRectangle(Component c, Border b, int x, int y, int width, int height)(Code)(Java Doc) public boolean isBorderOpaque()(Code)(Java Doc) public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)(Code)(Java Doc)
|
|
|