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 Colorprotected static final Insetsprotected static final Insetsprotected Colorprotected static final Insetsprotected Colorprotected Colorprotected Colorprotected Colorprotected static final Insetsprotected final JTabbedPaneprotected static final Insets -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static PlasticTabbedPaneUI.AbstractRenderercreateEmbeddedRenderer(JTabbedPane tabPane) private static PlasticTabbedPaneUI.AbstractRenderercreateRenderer(JTabbedPane tabPane) protected InsetsgetContentBorderInsets(Insets defaultInsets) protected InsetsReturns additional the insets for the selected tab.protected InsetsgetTabAreaInsets(Insets defaultInsets) protected abstract InsetsgetTabInsets(int tabIndex, Insets tabInsets) Returns the insets for the given tab.protected intgetTabLabelShiftX(int tabIndex, boolean isSelected) Returns the amount by which the label should be shifted horizontally.protected intgetTabLabelShiftY(int tabIndex, boolean isSelected) Returns the amount by which the label should be shifted vertically.protected intgetTabRunIndent(int run) Returns the amount by which the run numberrunshould be indented.protected intgetTabRunOverlay(int tabRunOverlay) Returns the amount of overlap for two Runs.protected intReturns the amount of overlap for two tabs.private voidprotected booleanisFirstDisplayedTab(int tabIndex, int position, int paneBorder) protected voidpaintContentBorderBottomEdge(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 voidpaintContentBorderLeftEdge(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 voidpaintContentBorderRightEdge(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 voidpaintContentBorderTopEdge(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 voidpaintFocusIndicator(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 voidpaintTabBackground(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 voidpaintTabBorder(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected) Paints the border around the given tab.protected booleanshouldPadTabRun(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 numberrunshould 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.
-