Class MaterialTabbedPaneUI

  • All Implemented Interfaces:
    javax.swing.SwingConstants

    public class MaterialTabbedPaneUI
    extends javax.swing.plaf.basic.BasicTabbedPaneUI
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected class  MaterialTabbedPaneUI.ArrowButtonTabbedPane  
      protected class  MaterialTabbedPaneUI.MaterialMouseHoverOnTab
      This class implement the mouse hover effect on TabbedPane, is a mouseMotion listener and is run on all JTabbedPane component, when the mouse is hover aver the tab this event change the cursor.
      protected class  MaterialTabbedPaneUI.MaterialTabbedPaneLayout
      Deprecated.
      remove this implementation inside the version 1.2 of the library.
      • Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI

        javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout, javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int calculateTabHeight​(int tabPlacement, int tabIndex, int fontHeight)  
      protected javax.swing.JButton createScrollButton​(int direction)  
      static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent c)  
      void installUI​(javax.swing.JComponent c)  
      protected void paintContentBorder​(java.awt.Graphics g, int tabPlacement, int selectedIndex)  
      protected void paintContentBorderBottomEdge​(java.awt.Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)  
      protected void paintContentBorderLeftEdge​(java.awt.Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)  
      protected void paintContentBorderRightEdge​(java.awt.Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)  
      protected void paintContentBorderTopEdge​(java.awt.Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)  
      protected void paintFocusIndicator​(java.awt.Graphics g, int tabPlacement, java.awt.Rectangle[] rects, int tabIndex, java.awt.Rectangle iconRect, java.awt.Rectangle textRect, boolean isSelected)  
      protected void paintTab​(java.awt.Graphics g, int tabPlacement, java.awt.Rectangle[] rects, int tabIndex, java.awt.Rectangle iconRect, java.awt.Rectangle textRect)  
      protected void paintTabBackground​(java.awt.Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)  
      protected void paintTabBorder​(java.awt.Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)  
      protected void paintText​(java.awt.Graphics g, int tabPlacement, java.awt.Font font, java.awt.FontMetrics metrics, int tabIndex, java.lang.String title, java.awt.Rectangle textRect, boolean isSelected)  
      protected void uninstallListeners()  
      void uninstallUI​(javax.swing.JComponent c)  
      • Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI

        assureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabWidth, createChangeListener, createFocusListener, createLayoutManager, createMouseListener, createPropertyChangeListener, expandTabRunsArray, getBaseline, getBaseline, getBaselineOffset, getBaselineResizeBehavior, getContentBorderInsets, getFocusIndex, getFontMetrics, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabBounds, getTabInsets, getTabLabelShiftX, getTabLabelShiftY, getTabRunCount, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getTextViewForTab, getVisibleComponent, installComponents, installDefaults, installKeyboardActions, installListeners, lastTabInRun, layoutLabel, navigateSelectedTab, paint, paintIcon, paintTabArea, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldPadTabRun, shouldRotateTabRuns, tabForCoordinate, uninstallComponents, uninstallDefaults, uninstallKeyboardActions
      • Methods inherited from class javax.swing.plaf.ComponentUI

        contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize, update
      • Methods inherited from class java.lang.Object

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

      • selectedForeground

        protected java.awt.Color selectedForeground
      • disabledForeground

        protected java.awt.Color disabledForeground
      • areaContentBackground

        protected java.awt.Color areaContentBackground
      • selectedAreaContentBackground

        protected java.awt.Color selectedAreaContentBackground
      • disableAreaContentBackground

        protected java.awt.Color disableAreaContentBackground
      • foreground

        protected java.awt.Color foreground
      • positionYLine

        protected int positionYLine
      • positionXLine

        protected int positionXLine
      • widthLine

        protected int widthLine
      • heightLine

        protected int heightLine
      • arcLine

        protected int arcLine
      • margin

        protected int margin
      • heightTab

        protected int heightTab
      • tabsOverlapBorder

        protected boolean tabsOverlapBorder
      • mouseHoverInitialized

        protected java.util.Map<java.lang.Integer,​java.lang.Boolean> mouseHoverInitialized
      • mouseHoverEnabled

        protected java.lang.Boolean mouseHoverEnabled
    • Constructor Detail

      • MaterialTabbedPaneUI

        public MaterialTabbedPaneUI()
    • Method Detail

      • createUI

        public static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent c)
      • installUI

        public void installUI​(javax.swing.JComponent c)
        Overrides:
        installUI in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • uninstallUI

        public void uninstallUI​(javax.swing.JComponent c)
        Overrides:
        uninstallUI in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • paintText

        protected void paintText​(java.awt.Graphics g,
                                 int tabPlacement,
                                 java.awt.Font font,
                                 java.awt.FontMetrics metrics,
                                 int tabIndex,
                                 java.lang.String title,
                                 java.awt.Rectangle textRect,
                                 boolean isSelected)
        Overrides:
        paintText in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • paintTabBackground

        protected void paintTabBackground​(java.awt.Graphics g,
                                          int tabPlacement,
                                          int tabIndex,
                                          int x,
                                          int y,
                                          int w,
                                          int h,
                                          boolean isSelected)
        Overrides:
        paintTabBackground in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • calculateTabHeight

        protected int calculateTabHeight​(int tabPlacement,
                                         int tabIndex,
                                         int fontHeight)
        Overrides:
        calculateTabHeight in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • paintTab

        protected void paintTab​(java.awt.Graphics g,
                                int tabPlacement,
                                java.awt.Rectangle[] rects,
                                int tabIndex,
                                java.awt.Rectangle iconRect,
                                java.awt.Rectangle textRect)
        Overrides:
        paintTab in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • paintTabBorder

        protected void paintTabBorder​(java.awt.Graphics g,
                                      int tabPlacement,
                                      int tabIndex,
                                      int x,
                                      int y,
                                      int w,
                                      int h,
                                      boolean isSelected)
        Overrides:
        paintTabBorder in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • paintFocusIndicator

        protected void paintFocusIndicator​(java.awt.Graphics g,
                                           int tabPlacement,
                                           java.awt.Rectangle[] rects,
                                           int tabIndex,
                                           java.awt.Rectangle iconRect,
                                           java.awt.Rectangle textRect,
                                           boolean isSelected)
        Overrides:
        paintFocusIndicator in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • paintContentBorder

        protected void paintContentBorder​(java.awt.Graphics g,
                                          int tabPlacement,
                                          int selectedIndex)
        Overrides:
        paintContentBorder in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • paintContentBorderBottomEdge

        protected void paintContentBorderBottomEdge​(java.awt.Graphics g,
                                                    int tabPlacement,
                                                    int selectedIndex,
                                                    int x,
                                                    int y,
                                                    int w,
                                                    int h)
        Overrides:
        paintContentBorderBottomEdge in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • paintContentBorderLeftEdge

        protected void paintContentBorderLeftEdge​(java.awt.Graphics g,
                                                  int tabPlacement,
                                                  int selectedIndex,
                                                  int x,
                                                  int y,
                                                  int w,
                                                  int h)
        Overrides:
        paintContentBorderLeftEdge in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • paintContentBorderRightEdge

        protected void paintContentBorderRightEdge​(java.awt.Graphics g,
                                                   int tabPlacement,
                                                   int selectedIndex,
                                                   int x,
                                                   int y,
                                                   int w,
                                                   int h)
        Overrides:
        paintContentBorderRightEdge in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • paintContentBorderTopEdge

        protected void paintContentBorderTopEdge​(java.awt.Graphics g,
                                                 int tabPlacement,
                                                 int selectedIndex,
                                                 int x,
                                                 int y,
                                                 int w,
                                                 int h)
        Overrides:
        paintContentBorderTopEdge in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • uninstallListeners

        protected void uninstallListeners()
        Overrides:
        uninstallListeners in class javax.swing.plaf.basic.BasicTabbedPaneUI
      • createScrollButton

        protected javax.swing.JButton createScrollButton​(int direction)
        Overrides:
        createScrollButton in class javax.swing.plaf.basic.BasicTabbedPaneUI