Package org.sexydock.tabs.jhrome
Class JhromeTabbedPaneUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TabbedPaneUI
org.sexydock.tabs.jhrome.JhromeTabbedPaneUI
The Class JhromeTabbedPaneUI.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createDragImage
(Tab tab) static JhromeTabbedPaneUI
void
dispose()
Removes all tabs, stops animation and attempts to unregister all listeners that could prevent this TabbedPane from being finalized.void
Immediately updates the tabs' bounds to their eventual position where animation is complete.getTabBounds
(JTabbedPane pane, int vIndex) int
int
getTabRunCount
(JTabbedPane pane) getTabs()
static void
insertTab
(JTabbedPane tabbedPane, int index, Tab tab) protected void
void
void
moveTab
(int vCurrentIndex, int vNewIndex) Moves the given tab with animation (if enabled).void
paint
(Graphics g, JComponent c) int
tabForCoordinate
(JTabbedPane pane, int x, int y) protected void
void
void
update
(Graphics g, JComponent c) Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize
-
Field Details
-
TAB_CLOSE_BUTTONS_VISIBLE
- See Also:
-
CONTENT_PANEL_BORDER
- See Also:
-
NEW_TAB_BUTTON_VISIBLE
- See Also:
-
TAB_CLOSE_BUTTON_LISTENER
- See Also:
-
FLOATING_TAB_HANDLER
- See Also:
-
TAB_DROP_FAILURE_HANDLER
- See Also:
-
TAB_FACTORY
- See Also:
-
DND_POLICY
- See Also:
-
NEW_TAB_BUTTON_UI
- See Also:
-
USE_UNIFORM_WIDTH
- See Also:
-
ANIMATION_FACTOR
- See Also:
-
DEFAULT_USE_UNIFORM_WIDTH
public static final boolean DEFAULT_USE_UNIFORM_WIDTH- See Also:
-
DEFAULT_ANIMATION_FACTOR
public static final double DEFAULT_ANIMATION_FACTOR- See Also:
-
-
Constructor Details
-
JhromeTabbedPaneUI
public JhromeTabbedPaneUI()
-
-
Method Details
-
createUI
-
insertTab
-
installUI
- Overrides:
installUI
in classComponentUI
-
uninstallUI
- Overrides:
uninstallUI
in classComponentUI
-
getHoverableTabAt
- Parameters:
p
- aPoint
in this tabbed pane's coordinate system.- Returns:
- the hoverable tab under
p
, ornull
if no such tab exists. - See Also:
-
getDraggableTabAt
- Parameters:
p
- aPoint
in this tabbed pane's coordinate system.- Returns:
- the draggable tab under
p
, ornull
if no such tab exists. - See Also:
-
getSelectableTabAt
- Parameters:
p
- aPoint
in this tabbed pane's coordinate system.- Returns:
- the selectable tab under
p
, ornull
if no such tab exists. - See Also:
-
getTabCount
public int getTabCount()- Returns:
- the number of tabs in this tabbed pane.
-
getTabs
- Returns:
- a newly-constructed
List
of the tabs in this tabbed pane.
-
addTab
-
moveTab
public void moveTab(int vCurrentIndex, int vNewIndex) Moves the given tab with animation (if enabled). Attempting to do this by removing / adding back the tab in theJTabbedPane
won't produce the same effect.- Parameters:
vCurrentIndex
- the current index of the tab to move.vNewIndex
- the index to move the tab to.
-
finishAnimation
public void finishAnimation()Immediately updates the tabs' bounds to their eventual position where animation is complete. -
dispose
public void dispose()Removes all tabs, stops animation and attempts to unregister all listeners that could prevent this TabbedPane from being finalized. However, I am not yet certain if this method eliminates all potential memory leaks (excluding references apart from internal TabbedPane code. -
createDragImage
-
paint
- Overrides:
paint
in classComponentUI
-
update
- Overrides:
update
in classComponentUI
-
tabForCoordinate
- Specified by:
tabForCoordinate
in classTabbedPaneUI
-
getTabBounds
- Specified by:
getTabBounds
in classTabbedPaneUI
-
getTabRunCount
- Specified by:
getTabRunCount
in classTabbedPaneUI
-
installKeyboardActions
protected void installKeyboardActions() -
uninstallKeyboardActions
protected void uninstallKeyboardActions()
-