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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateDragImage(Tab tab) static JhromeTabbedPaneUIvoiddispose()Removes all tabs, stops animation and attempts to unregister all listeners that could prevent this TabbedPane from being finalized.voidImmediately updates the tabs' bounds to their eventual position where animation is complete.getTabBounds(JTabbedPane pane, int vIndex) intintgetTabRunCount(JTabbedPane pane) getTabs()static voidinsertTab(JTabbedPane tabbedPane, int index, Tab tab) protected voidvoidvoidmoveTab(int vCurrentIndex, int vNewIndex) Moves the given tab with animation (if enabled).voidpaint(Graphics g, JComponent c) inttabForCoordinate(JTabbedPane pane, int x, int y) protected voidvoidvoidupdate(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:
installUIin classComponentUI
-
uninstallUI
- Overrides:
uninstallUIin classComponentUI
-
getHoverableTabAt
- Parameters:
p- aPointin this tabbed pane's coordinate system.- Returns:
- the hoverable tab under
p, ornullif no such tab exists. - See Also:
-
getDraggableTabAt
- Parameters:
p- aPointin this tabbed pane's coordinate system.- Returns:
- the draggable tab under
p, ornullif no such tab exists. - See Also:
-
getSelectableTabAt
- Parameters:
p- aPointin this tabbed pane's coordinate system.- Returns:
- the selectable tab under
p, ornullif no such tab exists. - See Also:
-
getTabCount
public int getTabCount()- Returns:
- the number of tabs in this tabbed pane.
-
getTabs
- Returns:
- a newly-constructed
Listof 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 theJTabbedPanewon'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:
paintin classComponentUI
-
update
- Overrides:
updatein classComponentUI
-
tabForCoordinate
- Specified by:
tabForCoordinatein classTabbedPaneUI
-
getTabBounds
- Specified by:
getTabBoundsin classTabbedPaneUI
-
getTabRunCount
- Specified by:
getTabRunCountin classTabbedPaneUI
-
installKeyboardActions
protected void installKeyboardActions() -
uninstallKeyboardActions
protected void uninstallKeyboardActions()
-