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

private abstract static class PlasticTabbedPaneUI.AbstractRenderer extends Object
This is the abstract superclass for all TabbedPane renderers. Those will be defined in the rest of this file
  • Field Details

    • EMPTY_INSETS

      protected static final Insets EMPTY_INSETS
    • NORTH_INSETS

      protected static final Insets NORTH_INSETS
    • WEST_INSETS

      protected static final Insets WEST_INSETS
    • SOUTH_INSETS

      protected static final Insets SOUTH_INSETS
    • EAST_INSETS

      protected static final Insets EAST_INSETS
    • tabPane

      protected final JTabbedPane tabPane
    • shadowColor

      protected Color shadowColor
    • darkShadow

      protected Color darkShadow
    • selectColor

      protected Color selectColor
    • selectLight

      protected Color selectLight
    • selectHighlight

      protected Color selectHighlight
    • focus

      protected Color focus
  • Constructor Details

    • AbstractRenderer

      private AbstractRenderer(JTabbedPane tabPane)
  • Method Details

    • createRenderer

      private static PlasticTabbedPaneUI.AbstractRenderer createRenderer(JTabbedPane tabPane)
    • createEmbeddedRenderer

      private static PlasticTabbedPaneUI.AbstractRenderer createEmbeddedRenderer(JTabbedPane tabPane)
    • initColors

      private void initColors()
    • isFirstDisplayedTab

      protected boolean isFirstDisplayedTab(int tabIndex, int position, int paneBorder)
    • getTabAreaInsets

      protected Insets getTabAreaInsets(Insets defaultInsets)
    • getContentBorderInsets

      protected Insets getContentBorderInsets(Insets defaultInsets)
    • 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 number run should be indented. Add a few pixels for every run to make diagonal lines align.
    • getTabInsets

      protected abstract Insets getTabInsets(int tabIndex, Insets tabInsets)
      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

      protected Insets 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.