Package com.jgoodies.looks.plastic
Class PlasticTabbedPaneUI.AbstractRenderer
java.lang.Object
com.jgoodies.looks.plastic.PlasticTabbedPaneUI.AbstractRenderer
- Direct Known Subclasses:
PlasticTabbedPaneUI.BottomEmbeddedRenderer
,PlasticTabbedPaneUI.BottomRenderer
,PlasticTabbedPaneUI.LeftEmbeddedRenderer
,PlasticTabbedPaneUI.LeftRenderer
,PlasticTabbedPaneUI.RightEmbeddedRenderer
,PlasticTabbedPaneUI.RightRenderer
,PlasticTabbedPaneUI.TopEmbeddedRenderer
,PlasticTabbedPaneUI.TopRenderer
- Enclosing class:
PlasticTabbedPaneUI
This is the abstract superclass for all TabbedPane renderers.
Those will be defined in the rest of this file
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Color
protected static final Insets
protected static final Insets
protected Color
protected static final Insets
protected Color
protected Color
protected Color
protected Color
protected static final Insets
protected final JTabbedPane
protected static final Insets
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static PlasticTabbedPaneUI.AbstractRenderer
createEmbeddedRenderer
(JTabbedPane tabPane) private static PlasticTabbedPaneUI.AbstractRenderer
createRenderer
(JTabbedPane tabPane) protected Insets
getContentBorderInsets
(Insets defaultInsets) protected Insets
Returns additional the insets for the selected tab.protected Insets
getTabAreaInsets
(Insets defaultInsets) protected abstract Insets
getTabInsets
(int tabIndex, Insets tabInsets) Returns the insets for the given tab.protected int
getTabLabelShiftX
(int tabIndex, boolean isSelected) Returns the amount by which the label should be shifted horizontally.protected int
getTabLabelShiftY
(int tabIndex, boolean isSelected) Returns the amount by which the label should be shifted vertically.protected int
getTabRunIndent
(int run) Returns the amount by which the run numberrun
should be indented.protected int
getTabRunOverlay
(int tabRunOverlay) Returns the amount of overlap for two Runs.protected int
Returns the amount of overlap for two tabs.private void
protected boolean
isFirstDisplayedTab
(int tabIndex, int position, int paneBorder) protected void
paintContentBorderBottomEdge
(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted) Draws the bottom edge of the Border around the content area.protected void
paintContentBorderLeftEdge
(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted) Draws the left edge of the Border around the content area.protected void
paintContentBorderRightEdge
(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted) Draws the right edge of the Border around the content area.protected void
paintContentBorderTopEdge
(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted) Draws the top edge of the border around the content area.protected abstract void
paintFocusIndicator
(Graphics g, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) Draws the rectancle around the Tab label which indicates keyboard focus.protected abstract void
paintTabBackground
(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected) Fills the background of the given tab to make sure overlap of tabs is handled correctly.protected abstract void
paintTabBorder
(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected) Paints the border around the given tab.protected boolean
shouldPadTabRun
(int run, boolean aPriori) Returns if a run should be padded with empty space to take up as much room as the others.
-
Field Details
-
EMPTY_INSETS
-
NORTH_INSETS
-
WEST_INSETS
-
SOUTH_INSETS
-
EAST_INSETS
-
tabPane
-
shadowColor
-
darkShadow
-
selectColor
-
selectLight
-
selectHighlight
-
focus
-
-
Constructor Details
-
AbstractRenderer
-
-
Method Details
-
createRenderer
-
createEmbeddedRenderer
-
initColors
private void initColors() -
isFirstDisplayedTab
protected boolean isFirstDisplayedTab(int tabIndex, int position, int paneBorder) -
getTabAreaInsets
-
getContentBorderInsets
-
getTabLabelShiftX
protected int getTabLabelShiftX(int tabIndex, boolean isSelected) Returns the amount by which the label should be shifted horizontally. -
getTabLabelShiftY
protected int getTabLabelShiftY(int tabIndex, boolean isSelected) Returns the amount by which the label should be shifted vertically. -
getTabRunOverlay
protected int getTabRunOverlay(int tabRunOverlay) Returns the amount of overlap for two Runs. -
shouldPadTabRun
protected boolean shouldPadTabRun(int run, boolean aPriori) Returns if a run should be padded with empty space to take up as much room as the others. -
getTabRunIndent
protected int getTabRunIndent(int run) Returns the amount by which the run numberrun
should be indented. Add a few pixels for every run to make diagonal lines align. -
getTabInsets
Returns the insets for the given tab. -
paintFocusIndicator
protected abstract void paintFocusIndicator(Graphics g, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) Draws the rectancle around the Tab label which indicates keyboard focus. -
paintTabBackground
protected abstract void paintTabBackground(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected) Fills the background of the given tab to make sure overlap of tabs is handled correctly. -
paintTabBorder
protected abstract void paintTabBorder(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected) Paints the border around the given tab. -
getSelectedTabPadInsets
Returns additional the insets for the selected tab. This allows to "raise" The selected tab over the others -
paintContentBorderTopEdge
protected void paintContentBorderTopEdge(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted) Draws the top edge of the border around the content area. Draw unbroken line for tabs are not on TOP override where appropriate. -
paintContentBorderBottomEdge
protected void paintContentBorderBottomEdge(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted) Draws the bottom edge of the Border around the content area. Draw broken line if selected tab is visible and adjacent to content and TabPlacement is same as painted edge. -
paintContentBorderLeftEdge
protected void paintContentBorderLeftEdge(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted) Draws the left edge of the Border around the content area. Draw broken line if selected tab is visible and adjacent to content and TabPlacement is same as painted edge -
paintContentBorderRightEdge
protected void paintContentBorderRightEdge(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted) Draws the right edge of the Border around the content area. Draw broken line if selected tab is visible and adjacent to content and TabPlacement is same as painted edge -
getTabsOverlay
protected int getTabsOverlay()Returns the amount of overlap for two tabs.
-