Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## madkit.MadChat.CloseAndMaxTabbedPane
Class CloseTabPaneUI

    java.lang.Object
      javax.swing.plaf.ComponentUI
          javax.swing.plaf.TabbedPaneUI
              javax.swing.plaf.basic.BasicTabbedPaneUI
                  madkit.MadChat.CloseAndMaxTabbedPane.CloseTabPaneUI

All Implemented Interfaces:
  javax.swing.SwingConstants

Direct Known Subclasses:
  CloseTabPaneEclipseUI, CloseTabPaneEnhancedUI

    public class CloseTabPaneUI

extends javax.swing.plaf.basic.BasicTabbedPaneUI

UI for `CloseAndMaxTabbedPane`.

Credits to:

Author:
  Amy Fowler, Philip Milne, Steve Wilson, Tom Santos, Dave Moore

Nested Class Summary
`protected class` | `CloseTabPaneUI.ScrollableTabButton`
`class` | `CloseTabPaneUI.TabSelectionHandler` This inner class is marked "public" due to a compiler bug.

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`

Field Summary
`protected javax.swing.JPopupMenu` | `actionPopupMenu`
`protected static int` | `BUTTONSIZE`
`protected javax.swing.JMenuItem` | `closeItem`
`protected javax.swing.JMenuItem` | `maxItem`
`protected madkit.MadChat.CloseAndMaxTabbedPane.CloseTabPaneUI.MyMouseMotionListener` | `motionListener`
`protected madkit.MadChat.CloseAndMaxTabbedPane.CloseTabPaneUI.ScrollableTabSupport` | `tabScroller`
`protected static int` | `WIDTHDELTA`

Fields inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
`calcRect, contentBorderInsets, darkShadow, downKey, focus, focusListener, highlight, leftKey, lightHighlight, maxTabHeight, maxTabWidth, mouseListener, propertyChangeListener, rects, rightKey, runCount, selectedRun, selectedTabPadInsets, shadow, tabAreaInsets, tabChangeListener, tabInsets, tabPane, tabRunOverlay, tabRuns, textIconGap, upKey`

Fields inherited from interface javax.swing.SwingConstants
`BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST`

Constructor Summary
`CloseTabPaneUI()`

Method Summary
`protected int` | `calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight)`
`protected int` | `calculateTabWidth(int tabPlacement, int tabIndex, java.awt.FontMetrics metrics)`
`protected javax.swing.event.ChangeListener` | `createChangeListener()`
`protected java.awt.LayoutManager` | `createLayoutManager()` Invoked by `installUI` to create a layout manager object to manage the `JTabbedPane`.
`protected java.awt.event.MouseListener` | `createMouseListener()`
`protected CloseTabPaneUI.ScrollableTabButton` | `createScrollableTabButton(int direction)`
`static javax.swing.plaf.ComponentUI` | `createUI(javax.swing.JComponent c)`
`int` | `getOverTabIndex()`
`protected java.awt.Rectangle` | `getTabBounds(int tabIndex, java.awt.Rectangle dest)` Returns the bounds of the specified tab in the coordinate space of the JTabbedPane component.
`protected void` | `installComponents()` Creates and installs any required subcomponents for the JTabbedPane.
`protected void` | `installKeyboardActions()`
`protected void` | `installListeners()`
`boolean` | `isCloseEnabled()`
`boolean` | `isMaxEnabled()`
`protected boolean` | `isOneActionButtonEnabled()`
`protected void` | `layoutLabel(int tabPlacement, java.awt.FontMetrics metrics, int tabIndex, java.lang.String title, javax.swing.Icon icon, java.awt.Rectangle tabRect, java.awt.Rectangle iconRect, java.awt.Rectangle textRect, boolean isSelected)`
`protected java.awt.Rectangle` | `newCloseRect(java.awt.Rectangle rect)`
`protected java.awt.Rectangle` | `newMaxRect(java.awt.Rectangle rect)`
`void` | `paint(java.awt.Graphics g, javax.swing.JComponent c)`
`protected void` | `paintActionButton(java.awt.Graphics g, int dx, int dy, int status, boolean isOver, javax.swing.JButton button, java.awt.image.BufferedImage image)`
`protected void` | `paintCloseIcon(java.awt.Graphics g, int dx, int dy, boolean isOver)`
`protected void` | `paintMaxIcon(java.awt.Graphics g, int dx, int dy, boolean isOver)`
`protected void` | `paintTab(java.awt.Graphics g, int tabPlacement, java.awt.Rectangle[] rects, int tabIndex, java.awt.Rectangle iconRect, java.awt.Rectangle textRect)`
`void` | `setCloseIcon(boolean b)`
`void` | `setMaxIcon(boolean b)`
`protected void` | `uninstallComponents()` Removes any installed subcomponents from the JTabbedPane.
`protected void` | `uninstallKeyboardActions()`
`protected void` | `uninstallListeners()`
`protected void` | `updateCloseIcon(int x, int y)`
`protected void` | `updateMaxIcon(int x, int y)`
`protected void` | `updateOverTab(int x, int y)`

Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
`assureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, createFocusListener, createPropertyChangeListener, createScrollButton, expandTabRunsArray, getContentBorderInsets, getFocusIndex, getFontMetrics, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabInsets, getTabLabelShiftX, getTabLabelShiftY, getTabRunCount, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getTextViewForTab, getVisibleComponent, installDefaults, installUI, lastTabInRun, navigateSelectedTab, paintContentBorder, paintContentBorderBottomEdge, paintContentBorderLeftEdge, paintContentBorderRightEdge, paintContentBorderTopEdge, paintFocusIndicator, paintIcon, paintTabArea, paintTabBackground, paintTabBorder, paintText, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldPadTabRun, shouldRotateTabRuns, tabForCoordinate, uninstallDefaults, uninstallUI`

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

### tabScroller

    protected madkit.MadChat.CloseAndMaxTabbedPane.CloseTabPaneUI.ScrollableTabSupport tabScroller

### motionListener

    protected madkit.MadChat.CloseAndMaxTabbedPane.CloseTabPaneUI.MyMouseMotionListener motionListener

### BUTTONSIZE

    protected static final int BUTTONSIZE

See Also:
  Constant Field Values

### WIDTHDELTA

    protected static final int WIDTHDELTA

See Also:
  Constant Field Values

### actionPopupMenu

    protected javax.swing.JPopupMenu actionPopupMenu

### maxItem

    protected javax.swing.JMenuItem maxItem

### closeItem

    protected javax.swing.JMenuItem closeItem

Constructor Detail

### CloseTabPaneUI

    public CloseTabPaneUI()

Method Detail

### isOneActionButtonEnabled

    protected boolean isOneActionButtonEnabled()

### isCloseEnabled

    public boolean isCloseEnabled()

### isMaxEnabled

    public boolean isMaxEnabled()

### setCloseIcon

    public void setCloseIcon(boolean b)

### setMaxIcon

    public void setMaxIcon(boolean b)

### calculateTabWidth

    protected int calculateTabWidth(int tabPlacement,
                                    int tabIndex,
                                    java.awt.FontMetrics metrics)

  Overrides:
    `calculateTabWidth` 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`

### layoutLabel

    protected void layoutLabel(int tabPlacement,
                               java.awt.FontMetrics metrics,
                               int tabIndex,
                               java.lang.String title,
                               javax.swing.Icon icon,
                               java.awt.Rectangle tabRect,
                               java.awt.Rectangle iconRect,
                               java.awt.Rectangle textRect,
                               boolean isSelected)

  Overrides:
    `layoutLabel` in class `javax.swing.plaf.basic.BasicTabbedPaneUI`

### createMouseListener

    protected java.awt.event.MouseListener createMouseListener()

  Overrides:
    `createMouseListener` in class `javax.swing.plaf.basic.BasicTabbedPaneUI`

### createScrollableTabButton

    protected CloseTabPaneUI.ScrollableTabButton createScrollableTabButton(int direction)

### newCloseRect

    protected java.awt.Rectangle newCloseRect(java.awt.Rectangle rect)

### newMaxRect

    protected java.awt.Rectangle newMaxRect(java.awt.Rectangle rect)

### updateOverTab

    protected void updateOverTab(int x,
                                 int y)

### updateCloseIcon

    protected void updateCloseIcon(int x,
                                   int y)

### updateMaxIcon

    protected void updateMaxIcon(int x,
                                 int y)

### createUI

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

### createLayoutManager

    protected java.awt.LayoutManager createLayoutManager()

  Invoked by `installUI` to create a layout manager object to manage the `JTabbedPane`.

  Overrides:
    `createLayoutManager` in class `javax.swing.plaf.basic.BasicTabbedPaneUI`
  Returns:
    a layout manager object
  See Also:
    `TabbedPaneLayout`, `JTabbedPane.getTabLayoutPolicy()`

### installComponents

    protected void installComponents()

  Creates and installs any required subcomponents for the JTabbedPane. Invoked by installUI.

  Overrides:
    `installComponents` in class `javax.swing.plaf.basic.BasicTabbedPaneUI`
  Since:
    1.4

### uninstallComponents

    protected void uninstallComponents()

  Removes any installed subcomponents from the JTabbedPane. Invoked by uninstallUI.

  Overrides:
    `uninstallComponents` in class `javax.swing.plaf.basic.BasicTabbedPaneUI`
  Since:
    1.4

### installListeners

    protected void installListeners()

  Overrides:
    `installListeners` in class `javax.swing.plaf.basic.BasicTabbedPaneUI`

### uninstallListeners

    protected void uninstallListeners()

  Overrides:
    `uninstallListeners` in class `javax.swing.plaf.basic.BasicTabbedPaneUI`

### createChangeListener

    protected javax.swing.event.ChangeListener createChangeListener()

  Overrides:
    `createChangeListener` in class `javax.swing.plaf.basic.BasicTabbedPaneUI`

### installKeyboardActions

    protected void installKeyboardActions()

  Overrides:
    `installKeyboardActions` in class `javax.swing.plaf.basic.BasicTabbedPaneUI`

### uninstallKeyboardActions

    protected void uninstallKeyboardActions()

  Overrides:
    `uninstallKeyboardActions` in class `javax.swing.plaf.basic.BasicTabbedPaneUI`

### paint

    public void paint(java.awt.Graphics g,
                      javax.swing.JComponent c)

  Overrides:
    `paint` 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`

### paintCloseIcon

    protected void paintCloseIcon(java.awt.Graphics g,
                                  int dx,
                                  int dy,
                                  boolean isOver)

### paintMaxIcon

    protected void paintMaxIcon(java.awt.Graphics g,
                                int dx,
                                int dy,
                                boolean isOver)

### paintActionButton

    protected void paintActionButton(java.awt.Graphics g,
                                     int dx,
                                     int dy,
                                     int status,
                                     boolean isOver,
                                     javax.swing.JButton button,
                                     java.awt.image.BufferedImage image)

### getTabBounds

    protected java.awt.Rectangle getTabBounds(int tabIndex,
                                              java.awt.Rectangle dest)

  Returns the bounds of the specified tab in the coordinate space of the JTabbedPane component. This is required because the tab rects are by default defined in the coordinate space of the component where they are rendered, which could be the JTabbedPane (for WRAP_TAB_LAYOUT) or a ScrollableTabPanel (SCROLL_TAB_LAYOUT). This method should be used whenever the tab rectangle must be relative to the JTabbedPane itself and the result should be placed in a designated Rectangle object (rather than instantiating and returning a new Rectangle each time). The tab index parameter must be a valid tabbed pane tab index (0 to tab count - 1, inclusive). The destination rectangle parameter must be a valid `Rectangle` instance. The handling of invalid parameters is unspecified.

  Overrides:
    `getTabBounds` in class `javax.swing.plaf.basic.BasicTabbedPaneUI`
  Parameters:
    `tabIndex` - the index of the tab
    `dest` - the rectangle where the result should be placed
  Returns:
    the resulting rectangle
  Since:
    1.4

### getOverTabIndex

    public int getOverTabIndex()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.