Package net.infonode.tabbedpanel.border
Class TabAreaLineBorder
- java.lang.Object
-
- net.infonode.tabbedpanel.border.TabAreaLineBorder
-
- All Implemented Interfaces:
java.io.Serializable,javax.swing.border.Border
public class TabAreaLineBorder extends java.lang.Object implements javax.swing.border.Border, java.io.SerializableTabAreaLineBorder draws a 1 pixel wide border on all sides except the side towards the content area of a tabbed panel.- Since:
- ITP 1.1.0
- Version:
- $Revision: 1.19 $
- See Also:
Tab,TabbedPanel,TabbedPanelProperties,TabAreaProperties,TabAreaComponentsProperties, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private ColorProvidercolorprivate booleandrawLeftprivate booleandrawRightprivate booleandrawTopprivate booleanflipLeftRightprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description TabAreaLineBorder()Constructs a TabAreaLineBorder with color based on the look and feelTabAreaLineBorder(boolean drawTop, boolean drawLeft, boolean drawRight, boolean flipLeftRight)Constructor.TabAreaLineBorder(java.awt.Color color)Constructs a TabAreaLineBorder with the give colorTabAreaLineBorder(java.awt.Color color, boolean drawTop, boolean drawLeft, boolean drawRight, boolean flipLeftRight)Constructor.TabAreaLineBorder(ColorProvider colorProvider, boolean drawTop, boolean drawLeft, boolean drawRight, boolean flipLeftRight)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleandrawBottom(Direction orientation)private booleandrawLeft(Direction orientation)private booleandrawRight(Direction orientation)private booleandrawTop(Direction orientation)java.awt.InsetsgetBorderInsets(java.awt.Component c)private static DirectiongetTabAreaDirection(java.awt.Component c)booleanisBorderOpaque()voidpaintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
color
private ColorProvider color
-
drawTop
private boolean drawTop
-
drawLeft
private boolean drawLeft
-
drawRight
private boolean drawRight
-
flipLeftRight
private boolean flipLeftRight
-
-
Constructor Detail
-
TabAreaLineBorder
public TabAreaLineBorder()
Constructs a TabAreaLineBorder with color based on the look and feel
-
TabAreaLineBorder
public TabAreaLineBorder(java.awt.Color color)
Constructs a TabAreaLineBorder with the give color- Parameters:
color- color for the border
-
TabAreaLineBorder
public TabAreaLineBorder(boolean drawTop, boolean drawLeft, boolean drawRight, boolean flipLeftRight)Constructor.- Parameters:
drawTop- draw the top linedrawLeft- draw the left linedrawRight- draw the right lineflipLeftRight- if true the left line is rotated so that it is always to the left or at the top and vice versa for the right line, if false the left and right lines are rotated the same way as the other lines
-
TabAreaLineBorder
public TabAreaLineBorder(java.awt.Color color, boolean drawTop, boolean drawLeft, boolean drawRight, boolean flipLeftRight)Constructor.- Parameters:
color- the line colordrawTop- draw the top linedrawLeft- draw the left linedrawRight- draw the right lineflipLeftRight- if true the left line is rotated so that it is always to the left or at the top and vice versa for the right line, if false the left and right lines are rotated the same way as the other lines
-
TabAreaLineBorder
public TabAreaLineBorder(ColorProvider colorProvider, boolean drawTop, boolean drawLeft, boolean drawRight, boolean flipLeftRight)
Constructor.- Parameters:
colorProvider- the line color providerdrawTop- draw the top linedrawLeft- draw the left linedrawRight- draw the right lineflipLeftRight- if true the left line is rotated so that it is always to the left or at the top and vice versa for the right line, if false the left and right lines are rotated the same way as the other lines
-
-
Method Detail
-
isBorderOpaque
public boolean isBorderOpaque()
- Specified by:
isBorderOpaquein interfacejavax.swing.border.Border
-
paintBorder
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)- Specified by:
paintBorderin interfacejavax.swing.border.Border
-
drawTop
private boolean drawTop(Direction orientation)
-
drawLeft
private boolean drawLeft(Direction orientation)
-
drawRight
private boolean drawRight(Direction orientation)
-
drawBottom
private boolean drawBottom(Direction orientation)
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c)
- Specified by:
getBorderInsetsin interfacejavax.swing.border.Border
-
getTabAreaDirection
private static Direction getTabAreaDirection(java.awt.Component c)
-
-