Package hec.gfx2d.border
Class EdgeBorder
java.lang.Object
hec.gfx2d.border.EdgeBorder
- All Implemented Interfaces:
Border
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new default EdgeBorder with edges drawn on all sidesEdgeBorder
(int i) Constructus a new EdgeBorder with the given Edge Pattern -
Method Summary
Modifier and TypeMethodDescriptiongetBorderInsets
(Component component) Returns the inests of this borderboolean
void
paintBorder
(Component component, Graphics graphics, int x, int y, int width, int height) Called to paint the border.protected void
Calculates a new set of insets based on the gived edge pattern
-
Field Details
-
EDGE_RIGHT
public static final int EDGE_RIGHT- See Also:
-
EDGE_BOTTOM
public static final int EDGE_BOTTOM- See Also:
-
EDGE_LEFT
public static final int EDGE_LEFT- See Also:
-
EDGE_TOP
public static final int EDGE_TOP- See Also:
-
EDGE_ALL
public static final int EDGE_ALL- See Also:
-
-
Constructor Details
-
EdgeBorder
public EdgeBorder(int i) Constructus a new EdgeBorder with the given Edge Pattern -
EdgeBorder
public EdgeBorder()Constructs a new default EdgeBorder with edges drawn on all sides
-
-
Method Details
-
isBorderOpaque
public boolean isBorderOpaque()- Specified by:
isBorderOpaque
in interfaceBorder
-
getBorderInsets
Returns the inests of this border- Specified by:
getBorderInsets
in interfaceBorder
-
paintBorder
public void paintBorder(Component component, Graphics graphics, int x, int y, int width, int height) Called to paint the border. Border is painted by the set edge pattern- Specified by:
paintBorder
in interfaceBorder
-
recalcInsets
protected void recalcInsets()Calculates a new set of insets based on the gived edge pattern
-