private abstract static class PlasticTabbedPaneUI.AbstractRenderer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.awt.Color |
darkShadow |
protected static java.awt.Insets |
EAST_INSETS |
protected static java.awt.Insets |
EMPTY_INSETS |
protected java.awt.Color |
focus |
protected java.awt.Color |
lightHighlight |
protected static java.awt.Insets |
NORTH_INSETS |
protected java.awt.Color |
selectColor |
protected java.awt.Color |
selectHighlight |
protected java.awt.Color |
selectLight |
protected java.awt.Color |
shadowColor |
protected static java.awt.Insets |
SOUTH_INSETS |
protected javax.swing.JTabbedPane |
tabPane |
protected int |
tabPlacement |
protected static java.awt.Insets |
WEST_INSETS |
| Modifier | Constructor and Description |
|---|---|
private |
AbstractRenderer(javax.swing.JTabbedPane tabPane) |
| Modifier and Type | Method and Description |
|---|---|
private static PlasticTabbedPaneUI.AbstractRenderer |
createEmbeddedRenderer(javax.swing.JTabbedPane tabPane) |
private static PlasticTabbedPaneUI.AbstractRenderer |
createRenderer(javax.swing.JTabbedPane tabPane) |
protected java.awt.Insets |
getContentBorderInsets(java.awt.Insets defaultInsets) |
protected java.awt.Insets |
getSelectedTabPadInsets()
Returns additional the insets for the selected tab.
|
protected java.awt.Insets |
getTabAreaInsets(java.awt.Insets defaultInsets) |
protected abstract java.awt.Insets |
getTabInsets(int tabIndex,
java.awt.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 number
run
should be indented. |
protected int |
getTabRunOverlay(int tabRunOverlay)
Returns the amount of overlap for two Runs.
|
protected int |
getTabsOverlay()
Returns the amount of overlap for two tabs.
|
private void |
initColors() |
protected boolean |
isFirstDisplayedTab(int tabIndex,
int position,
int paneBorder) |
protected void |
paintContentBorderBottomEdge(java.awt.Graphics g,
int x,
int y,
int w,
int h,
boolean drawBroken,
java.awt.Rectangle selRect,
boolean isContentBorderPainted)
Draws the bottom edge of the Border around the content area.
|
protected void |
paintContentBorderLeftEdge(java.awt.Graphics g,
int x,
int y,
int w,
int h,
boolean drawBroken,
java.awt.Rectangle selRect,
boolean isContentBorderPainted)
Draws the left edge of the Border around the content area.
|
protected void |
paintContentBorderRightEdge(java.awt.Graphics g,
int x,
int y,
int w,
int h,
boolean drawBroken,
java.awt.Rectangle selRect,
boolean isContentBorderPainted)
Draws the right edge of the Border around the content area.
|
protected void |
paintContentBorderTopEdge(java.awt.Graphics g,
int x,
int y,
int w,
int h,
boolean drawBroken,
java.awt.Rectangle selRect,
boolean isContentBorderPainted)
Draws the top edge of the border around the content area.
|
protected abstract void |
paintFocusIndicator(java.awt.Graphics g,
java.awt.Rectangle[] rects,
int tabIndex,
java.awt.Rectangle iconRect,
java.awt.Rectangle textRect,
boolean isSelected)
Draws the rectancle around the Tab label which indicates keyboard focus.
|
protected abstract void |
paintTabBackground(java.awt.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(java.awt.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.
|
protected static final java.awt.Insets EMPTY_INSETS
protected static final java.awt.Insets NORTH_INSETS
protected static final java.awt.Insets WEST_INSETS
protected static final java.awt.Insets SOUTH_INSETS
protected static final java.awt.Insets EAST_INSETS
protected final javax.swing.JTabbedPane tabPane
protected final int tabPlacement
protected java.awt.Color shadowColor
protected java.awt.Color darkShadow
protected java.awt.Color selectColor
protected java.awt.Color selectLight
protected java.awt.Color selectHighlight
protected java.awt.Color lightHighlight
protected java.awt.Color focus
private static PlasticTabbedPaneUI.AbstractRenderer createRenderer(javax.swing.JTabbedPane tabPane)
private static PlasticTabbedPaneUI.AbstractRenderer createEmbeddedRenderer(javax.swing.JTabbedPane tabPane)
private void initColors()
protected boolean isFirstDisplayedTab(int tabIndex,
int position,
int paneBorder)
protected java.awt.Insets getTabAreaInsets(java.awt.Insets defaultInsets)
protected java.awt.Insets getContentBorderInsets(java.awt.Insets defaultInsets)
protected int getTabLabelShiftX(int tabIndex,
boolean isSelected)
protected int getTabLabelShiftY(int tabIndex,
boolean isSelected)
protected int getTabRunOverlay(int tabRunOverlay)
protected boolean shouldPadTabRun(int run,
boolean aPriori)
protected int getTabRunIndent(int run)
run
should be indented. Add a few pixels for every run to make
diagonal lines align.protected abstract java.awt.Insets getTabInsets(int tabIndex,
java.awt.Insets tabInsets)
protected abstract void paintFocusIndicator(java.awt.Graphics g,
java.awt.Rectangle[] rects,
int tabIndex,
java.awt.Rectangle iconRect,
java.awt.Rectangle textRect,
boolean isSelected)
protected abstract void paintTabBackground(java.awt.Graphics g,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected)
protected abstract void paintTabBorder(java.awt.Graphics g,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected)
protected java.awt.Insets getSelectedTabPadInsets()
protected void paintContentBorderTopEdge(java.awt.Graphics g,
int x,
int y,
int w,
int h,
boolean drawBroken,
java.awt.Rectangle selRect,
boolean isContentBorderPainted)
protected void paintContentBorderBottomEdge(java.awt.Graphics g,
int x,
int y,
int w,
int h,
boolean drawBroken,
java.awt.Rectangle selRect,
boolean isContentBorderPainted)
protected void paintContentBorderLeftEdge(java.awt.Graphics g,
int x,
int y,
int w,
int h,
boolean drawBroken,
java.awt.Rectangle selRect,
boolean isContentBorderPainted)
protected void paintContentBorderRightEdge(java.awt.Graphics g,
int x,
int y,
int w,
int h,
boolean drawBroken,
java.awt.Rectangle selRect,
boolean isContentBorderPainted)
protected int getTabsOverlay()