Package net.infonode.tabbedpanel.border
Class TabHighlightBorder
- java.lang.Object
-
- net.infonode.tabbedpanel.border.TabHighlightBorder
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.border.Border
public class TabHighlightBorder extends java.lang.Object implements javax.swing.border.Border, java.io.Serializable
TabHighlightBorder draws a 1 pixel wide highlight on the top and left side of the tab. It will not draw highlight on the side towards a TabbedPanel's content area if the border is constructed with open border.- See Also:
Tab
,TabbedPanel
,TabbedPanelProperties
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TabHighlightBorder()
Constructs a TabHighlightBorder that acts as an empty border, i.e.TabHighlightBorder(java.awt.Color color, boolean openBorder)
Constructs a TabHighlightBorder with the given color as highlight colorTabHighlightBorder(ColorProvider colorProvider, boolean openBorder)
Constructs a TabHighlightBorder with the given color as highlight color
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Insets
getBorderInsets(java.awt.Component c)
boolean
isBorderOpaque()
void
paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
-
-
-
Constructor Detail
-
TabHighlightBorder
public TabHighlightBorder()
Constructs a TabHighlightBorder that acts as an empty border, i.e. no highlight is drawn but it will report the same insets as if the highlight was drawn
-
TabHighlightBorder
public TabHighlightBorder(java.awt.Color color, boolean openBorder)
Constructs a TabHighlightBorder with the given color as highlight color- Parameters:
color
- the highlight coloropenBorder
- when true, no highlighting is drawn on the side towards a TabbedPanel's content area, otherwise false
-
TabHighlightBorder
public TabHighlightBorder(ColorProvider colorProvider, boolean openBorder)
Constructs a TabHighlightBorder with the given color as highlight color- Parameters:
colorProvider
- the highlight color provideropenBorder
- when true, no highlighting is drawn on the side towards a TabbedPanel's content area, otherwise false
-
-
Method Detail
-
paintBorder
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
- Specified by:
paintBorder
in interfacejavax.swing.border.Border
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c)
- Specified by:
getBorderInsets
in interfacejavax.swing.border.Border
-
isBorderOpaque
public boolean isBorderOpaque()
- Specified by:
isBorderOpaque
in interfacejavax.swing.border.Border
-
-