public abstract class BasicScrollingTabDisplayerUI extends BasicTabDisplayerUI
| Modifier and Type | Class and Description |
|---|---|
protected class |
BasicScrollingTabDisplayerUI.ScrollingDisplayerComponentListener |
protected class |
BasicScrollingTabDisplayerUI.ScrollingHierarchyListener |
protected class |
BasicScrollingTabDisplayerUI.ScrollingTabState |
BasicTabDisplayerUI.BasicDisplayerMouseListener, BasicTabDisplayerUI.BasicModelListener, BasicTabDisplayerUI.BasicSelectionListener, BasicTabDisplayerUI.BasicTabStateAbstractTabDisplayerUI.DisplayerHierarchyListener, AbstractTabDisplayerUI.DisplayerPropertyChangeListener, AbstractTabDisplayerUI.ModelListenerdefaultRenderer, repaintPolicy, tabStatecomponentListener, hierarchyListener, layoutModel, modelListener, mouseListener, propertyChangeListener, selectionListenerdisplayer, selectionModel| Constructor and Description |
|---|
BasicScrollingTabDisplayerUI(TabDisplayer displayer)
Creates a new instance of BasicScrollingTabDisplayerUI
|
| Modifier and Type | Method and Description |
|---|---|
protected ComponentListener |
createComponentListener()
Create a ComponentListener that may be needed to handle resize, show,
hide, etc.
|
protected HierarchyListener |
createHierarchyListener() |
protected LayoutManager |
createLayout() |
protected TabLayoutModel |
createLayoutModel()
Create an instance of TabLayoutModel which will provide coordinates for
tabs
|
protected TabState |
createTabState()
Create a TabState instance.
|
protected Component |
getControlButtons() |
protected Rectangle |
getControlButtonsRectangle(Container parent) |
protected int |
getFirstVisibleTab()
Scrollable implementations will override this method to provide the first
visible (even if clipped) tab.
|
protected int |
getLastVisibleTab()
Scrollable implementations will override this method to provide the last
visible (even if clipped) tab.
|
Dimension |
getMinimumSize(JComponent c) |
static Graphics2D |
getOffscreenGraphics()
Provides an offscreen graphics context so that widths based on character
size can be calculated correctly before the component is shown
|
Insets |
getTabAreaInsets()
Return a set of insets defining the margins into which tabs should not be
painted.
|
protected int |
getTabsAreaWidth()
Returns the width of the tabs area
|
protected void |
install()
Overridden to initialize the
tabState and defaultRenderer. |
protected void |
installControlButtons() |
void |
makeTabVisible(int tab)
Instruct the UI to ensure that the tab at the given index is visible.
|
protected void |
modelChanged()
Overrides
modelChanged() to clear the transient information in the
state model, which may now contain tab indices that don't exist, and also
to clear cached width/last-visible-tab data in the layout model, and ensure that
the selected tab is visible. |
protected void |
processMouseWheelEvent(MouseWheelEvent e)
Overridden to update the offset of the ScrollingTabLayoutModel on mouse
wheel events
|
protected ScrollingTabLayoutModel |
scroll()
Convenience getter for the layout model as an instance of
ScrollingTabLayoutModel
|
protected void |
uninstall()
Called after uninstalling the mouse listener and selection model, but
before references to that or the layout model or displayer have been
nulled.
|
cancelRequestAttention, createDefaultRenderer, createImageOfTab, createModelListener, createMouseListener, createPropertyChangeListener, createRepaintPolicy, createSelectionListener, dropIndexOfPoint, getExactTabIndication, getInsertTabIndication, getLastKnownMouseLocation, getTabCellRenderer, getTabRect, getTabRectForRepaint, getTabsVisibleArea, isAntialiased, paint, paintAfterTabs, paintBackground, requestAttention, setAttentionHighlight, tabForCoordinatecreateFont, createSelectionModel, installListeners, installUI, registerShortcuts, toDropPoint, uninstallListeners, uninstallUI, unregisterShortcutsgetButtonIcon, getTxtFont, isTabBusy, postTabAction, shouldPerformAction, shouldPerformActioncontains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getPreferredSize, updatepublic BasicScrollingTabDisplayerUI(TabDisplayer displayer)
protected TabLayoutModel createLayoutModel()
AbstractTabDisplayerUIcreateLayoutModel in class AbstractTabDisplayerUIprotected TabState createTabState()
BasicTabDisplayerUIsetMouseInTab(int tab). Its getState() method returns a bitmask of
states a tab may have which affect the way it is painted.
Usage: It is expected that UIs will subclass TabState, to implement the
repaint methods, and possibly override getState(int tab) to mix
additional state bits into the bitmask. For example, scrollable tabs have the
possible states CLIP_LEFT and CLIP_RIGHT; BasicScrollingTabDisplayerUI's
implementation of this determines these states by consulting its layout model, and
adds them in when appropriate.
createTabState in class BasicTabDisplayerUIBasicTabDisplayerUI.BasicTabState,
BasicScrollingTabDisplayerUI.ScrollingTabStateprotected HierarchyListener createHierarchyListener()
createHierarchyListener in class AbstractTabDisplayerUIpublic void makeTabVisible(int tab)
TabDisplayerUImakeTabVisible in class TabDisplayerUItab - The index of the tab that should be made visible, which
should be within the range of 0 to the count of tabs in the
modelprotected final int getTabsAreaWidth()
public Insets getTabAreaInsets()
BasicTabDisplayerUIgetTabAreaInsets in class BasicTabDisplayerUIprotected final int getLastVisibleTab()
BasicTabDisplayerUIgetLastVisibleTab in class BasicTabDisplayerUIprotected final int getFirstVisibleTab()
BasicTabDisplayerUIgetFirstVisibleTab in class BasicTabDisplayerUIprotected void install()
BasicTabDisplayerUItabState and defaultRenderer.install in class BasicTabDisplayerUIprotected void uninstall()
AbstractTabDisplayerUIuninstall in class BasicTabDisplayerUIprotected LayoutManager createLayout()
protected Component getControlButtons()
protected ComponentListener createComponentListener()
AbstractTabDisplayerUIcreateComponentListener in class AbstractTabDisplayerUIprotected void modelChanged()
modelChanged() to clear the transient information in the
state model, which may now contain tab indices that don't exist, and also
to clear cached width/last-visible-tab data in the layout model, and ensure that
the selected tab is visible.modelChanged in class BasicTabDisplayerUIprotected void installControlButtons()
protected final ScrollingTabLayoutModel scroll()
protected void processMouseWheelEvent(MouseWheelEvent e)
processMouseWheelEvent in class BasicTabDisplayerUIpublic static Graphics2D getOffscreenGraphics()
protected Rectangle getControlButtonsRectangle(Container parent)
public Dimension getMinimumSize(JComponent c)
getMinimumSize in class ComponentUIBuilt on May 21 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.