|
org.netbeans.swing.tabcontrol 1.8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
org.netbeans.swing.tabcontrol.TabDisplayerUI
org.netbeans.swing.tabcontrol.plaf.AbstractTabDisplayerUI
org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI
org.netbeans.swing.tabcontrol.plaf.BasicScrollingTabDisplayerUI
public abstract class BasicScrollingTabDisplayerUI
Base class for tab displayers that have scrollable tabs.
Nested Class Summary | |
---|---|
protected class |
BasicScrollingTabDisplayerUI.ScrollingDisplayerComponentListener
|
protected class |
BasicScrollingTabDisplayerUI.ScrollingHierarchyListener
|
protected class |
BasicScrollingTabDisplayerUI.ScrollingTabState
|
Nested classes/interfaces inherited from class org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI |
---|
BasicTabDisplayerUI.BasicDisplayerMouseListener, BasicTabDisplayerUI.BasicModelListener, BasicTabDisplayerUI.BasicSelectionListener, BasicTabDisplayerUI.BasicTabState |
Nested classes/interfaces inherited from class org.netbeans.swing.tabcontrol.plaf.AbstractTabDisplayerUI |
---|
AbstractTabDisplayerUI.DisplayerHierarchyListener, AbstractTabDisplayerUI.DisplayerPropertyChangeListener, AbstractTabDisplayerUI.ModelListener |
Field Summary |
---|
Fields inherited from class org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI |
---|
defaultRenderer, repaintPolicy, tabState |
Fields inherited from class org.netbeans.swing.tabcontrol.plaf.AbstractTabDisplayerUI |
---|
componentListener, hierarchyListener, layoutModel, modelListener, mouseListener, propertyChangeListener, selectionListener |
Fields inherited from class org.netbeans.swing.tabcontrol.TabDisplayerUI |
---|
displayer, selectionModel |
Constructor Summary | |
---|---|
BasicScrollingTabDisplayerUI(TabDisplayer displayer)
Creates a new instance of BasicScrollingTabDisplayerUI |
Method Summary | |
---|---|
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. |
Methods inherited from class org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI |
---|
cancelRequestAttention, createDefaultRenderer, createImageOfTab, createModelListener, createMouseListener, createPropertyChangeListener, createRepaintPolicy, createSelectionListener, dropIndexOfPoint, getExactTabIndication, getInsertTabIndication, getLastKnownMouseLocation, getTabCellRenderer, getTabRect, getTabRectForRepaint, getTabsVisibleArea, isAntialiased, paint, paintAfterTabs, paintBackground, requestAttention, tabForCoordinate |
Methods inherited from class org.netbeans.swing.tabcontrol.plaf.AbstractTabDisplayerUI |
---|
createFont, createSelectionModel, installListeners, installUI, registerShortcuts, toDropPoint, uninstallListeners, uninstallUI, unregisterShortcuts |
Methods inherited from class org.netbeans.swing.tabcontrol.TabDisplayerUI |
---|
getButtonIcon, postTabAction, shouldPerformAction |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getPreferredSize, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicScrollingTabDisplayerUI(TabDisplayer displayer)
Method Detail |
---|
protected final TabLayoutModel createLayoutModel()
AbstractTabDisplayerUI
createLayoutModel
in class AbstractTabDisplayerUI
protected TabState createTabState()
BasicTabDisplayerUI
setMouseInTab(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 BasicTabDisplayerUI
BasicTabDisplayerUI.BasicTabState
,
BasicScrollingTabDisplayerUI.ScrollingTabState
protected HierarchyListener createHierarchyListener()
createHierarchyListener
in class AbstractTabDisplayerUI
public void makeTabVisible(int tab)
TabDisplayerUI
makeTabVisible
in class TabDisplayerUI
tab
- 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()
BasicTabDisplayerUI
getTabAreaInsets
in class BasicTabDisplayerUI
protected final int getLastVisibleTab()
BasicTabDisplayerUI
getLastVisibleTab
in class BasicTabDisplayerUI
protected final int getFirstVisibleTab()
BasicTabDisplayerUI
getFirstVisibleTab
in class BasicTabDisplayerUI
protected void install()
BasicTabDisplayerUI
tabState
and defaultRenderer
.
install
in class BasicTabDisplayerUI
protected void uninstall()
AbstractTabDisplayerUI
uninstall
in class BasicTabDisplayerUI
protected LayoutManager createLayout()
protected Component getControlButtons()
protected ComponentListener createComponentListener()
AbstractTabDisplayerUI
createComponentListener
in class AbstractTabDisplayerUI
protected 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 BasicTabDisplayerUI
protected void installControlButtons()
public Dimension getMinimumSize(JComponent c)
getMinimumSize
in class ComponentUI
protected final ScrollingTabLayoutModel scroll()
protected void processMouseWheelEvent(MouseWheelEvent e)
processMouseWheelEvent
in class BasicTabDisplayerUI
public static Graphics2D getOffscreenGraphics()
protected Rectangle getControlButtonsRectangle(Container parent)
|
org.netbeans.swing.tabcontrol 1.8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |