Class PlasticTabbedPaneUI.AbstractRenderer

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AbstractRenderer​(javax.swing.JTabbedPane tabPane)  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • EMPTY_INSETS

        protected static final java.awt.Insets EMPTY_INSETS
      • NORTH_INSETS

        protected static final java.awt.Insets NORTH_INSETS
      • WEST_INSETS

        protected static final java.awt.Insets WEST_INSETS
      • SOUTH_INSETS

        protected static final java.awt.Insets SOUTH_INSETS
      • EAST_INSETS

        protected static final java.awt.Insets EAST_INSETS
      • tabPane

        protected final javax.swing.JTabbedPane tabPane
      • shadowColor

        protected java.awt.Color shadowColor
      • darkShadow

        protected java.awt.Color darkShadow
      • selectColor

        protected java.awt.Color selectColor
      • selectLight

        protected java.awt.Color selectLight
      • selectHighlight

        protected java.awt.Color selectHighlight
      • focus

        protected java.awt.Color focus
    • Constructor Detail

      • AbstractRenderer

        private AbstractRenderer​(javax.swing.JTabbedPane tabPane)
    • Method Detail

      • initColors

        private void initColors()
      • isFirstDisplayedTab

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

        protected java.awt.Insets getTabAreaInsets​(java.awt.Insets defaultInsets)
      • getContentBorderInsets

        protected java.awt.Insets getContentBorderInsets​(java.awt.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 java.awt.Insets getTabInsets​(int tabIndex,
                                                        java.awt.Insets tabInsets)
        Returns the insets for the given tab.
      • paintFocusIndicator

        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.
      • paintTabBackground

        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.
      • paintTabBorder

        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.
      • getSelectedTabPadInsets

        protected java.awt.Insets getSelectedTabPadInsets()
        Returns additional the insets for the selected tab. This allows to "raise" The selected tab over the others
      • paintContentBorderTopEdge

        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. Draw unbroken line for tabs are not on TOP override where appropriate.
      • paintContentBorderBottomEdge

        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. Draw broken line if selected tab is visible and adjacent to content and TabPlacement is same as painted edge.
      • paintContentBorderLeftEdge

        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. Draw broken line if selected tab is visible and adjacent to content and TabPlacement is same as painted edge
      • paintContentBorderRightEdge

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