public abstract class AbstractViewTabDisplayerUI extends TabDisplayerUI
XXX eventually this class should be deleted and a subclass of BasicTabDisplayer can be used; currently this is simply a port of the original code to the new API. Do not introduce any new subclasses of this.
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractViewTabDisplayerUI.Controller
Listen to mouse events and handles selection behaviour and close icon
button behaviour.
|
| Modifier and Type | Field and Description |
|---|---|
protected AbstractViewTabDisplayerUI.Controller |
controller |
protected TabState |
tabState |
displayer, selectionModel| Constructor and Description |
|---|
AbstractViewTabDisplayerUI(TabDisplayer displayer) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cancelRequestAttention(int tab) |
protected AbstractViewTabDisplayerUI.Controller |
createController() |
Image |
createImageOfTab(int index)
Paints the rectangle occupied by a tab into an image and returns the result
|
protected TabLayoutModel |
createLayoutModel()
Creates model to layout the tabs out within the displayer.
|
protected int |
createRepaintPolicy() |
protected SingleSelectionModel |
createSelectionModel()
Create the selection model which will handle selection for the
TabDisplayer.
|
int |
dropIndexOfPoint(Point p)
The index a tab would acquire if dropped at a given point
|
protected Component |
getControlButtons() |
AbstractViewTabDisplayerUI.Controller |
getController() |
protected TabDataModel |
getDataModel() |
protected TabDisplayer |
getDisplayer() |
Polygon |
getExactTabIndication(int index)
Get a shape representing the exact outline of the numbered tab.
|
Polygon |
getInsertTabIndication(int index)
Get a shape representing the area of visual feedback during a drag and
drop operation, which represents where a tab will be inserted if a drop
operation is performed over the indicated tab.
|
TabLayoutModel |
getLayoutModel() |
Dimension |
getMinimumSize(JComponent c) |
protected SingleSelectionModel |
getSelectionModel() |
Rectangle |
getTabRect(int index,
Rectangle destination)
Configure the passed rectangle with the shape of the tab at the given
index.
|
protected Font |
getTxtFont()
Specifies font to use for text and font metrics.
|
protected FontMetrics |
getTxtFontMetrics() |
protected void |
installControlButtons() |
void |
installUI(JComponent c) |
protected boolean |
isActive() |
protected boolean |
isAttention(int tab)
Determine if the tab should be flashing
|
protected boolean |
isFocused(int index) |
protected boolean |
isHighlight(int tab) |
protected boolean |
isSelected(int index) |
void |
paint(Graphics g,
JComponent c) |
protected void |
paintDisplayerBackground(Graphics g,
JComponent c)
Paint the background when using non-stretching tabs.
|
protected abstract void |
paintTabBackground(Graphics g,
int index,
int x,
int y,
int width,
int height) |
protected abstract void |
paintTabBorder(Graphics g,
int index,
int x,
int y,
int width,
int height) |
protected abstract void |
paintTabContent(Graphics g,
int index,
String text,
int x,
int y,
int width,
int height) |
void |
registerShortcuts(JComponent comp)
Registers shortcut for enable/ disable auto-hide functionality
|
protected void |
requestAttention(int tab) |
protected void |
setAttentionHighlight(int tab,
boolean highlight)
Turn tab highlight on/off
|
int |
tabForCoordinate(Point p)
Returns the index of the tab at the passed point, or -1 if no tab is at
that location.
|
void |
uninstallUI(JComponent c) |
void |
unregisterShortcuts(JComponent comp)
Registers shortcut for enable/ disable auto-hide functionality
|
getButtonIcon, isTabBusy, makeTabVisible, postTabAction, shouldPerformAction, shouldPerformActioncontains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getPreferredSize, updateprotected AbstractViewTabDisplayerUI.Controller controller
protected final TabState tabState
public AbstractViewTabDisplayerUI(TabDisplayer displayer)
public void installUI(JComponent c)
installUI in class TabDisplayerUIprotected TabLayoutModel createLayoutModel()
protected void installControlButtons()
protected Component getControlButtons()
public void uninstallUI(JComponent c)
uninstallUI in class TabDisplayerUIprotected AbstractViewTabDisplayerUI.Controller createController()
public void paint(Graphics g, JComponent c)
paint in class ComponentUIprotected final TabDataModel getDataModel()
public final TabLayoutModel getLayoutModel()
protected final TabDisplayer getDisplayer()
protected final SingleSelectionModel getSelectionModel()
public AbstractViewTabDisplayerUI.Controller getController()
protected final boolean isSelected(int index)
protected final boolean isActive()
protected final boolean isFocused(int index)
protected final SingleSelectionModel createSelectionModel()
TabDisplayerUIcreateSelectionModel in class TabDisplayerUIpublic int dropIndexOfPoint(Point p)
TabDisplayerUIdropIndexOfPoint in class TabDisplayerUIp - A pointprotected Font getTxtFont()
getTxtFont in class TabDisplayerUIprotected final FontMetrics getTxtFontMetrics()
protected abstract void paintTabContent(Graphics g, int index, String text, int x, int y, int width, int height)
protected abstract void paintTabBorder(Graphics g, int index, int x, int y, int width, int height)
protected abstract void paintTabBackground(Graphics g, int index, int x, int y, int width, int height)
protected void paintDisplayerBackground(Graphics g, JComponent c)
g - c - public void unregisterShortcuts(JComponent comp)
unregisterShortcuts in class TabDisplayerUIpublic void registerShortcuts(JComponent comp)
registerShortcuts in class TabDisplayerUIpublic Polygon getExactTabIndication(int index)
TabDisplayerUIEqualPolygon from this method; other implementations may
return what they want, but for performance reasons, it is highly
desirable that the shape object returned honor equals() and
hashCode(), as there are significant optimizations in
NetBeans' drag and drop support that depend on this.getExactTabIndication in class TabDisplayerUIpublic Polygon getInsertTabIndication(int index)
TabDisplayerUIThe implementations in
the package will return instances of EqualPolygon from this
method; other implementations may return what they want, but for
performance reasons, it is highly desirable that the shape object
returned honor equals() and hashCode(), as
there are significant optimizations in NetBeans' drag and drop support
that depened on this.
getInsertTabIndication in class TabDisplayerUIpublic Image createImageOfTab(int index)
createImageOfTab in class TabDisplayerUIindex - A tab indexpublic Rectangle getTabRect(int index, Rectangle destination)
TabDisplayerUIgetTabRect in class TabDisplayerUIpublic int tabForCoordinate(Point p)
TabDisplayerUItabForCoordinate in class TabDisplayerUIpublic Dimension getMinimumSize(JComponent c)
getMinimumSize in class ComponentUIprotected int createRepaintPolicy()
protected boolean isAttention(int tab)
protected boolean isHighlight(int tab)
tab - protected void requestAttention(int tab)
requestAttention in class TabDisplayerUIprotected void cancelRequestAttention(int tab)
cancelRequestAttention in class TabDisplayerUIprotected void setAttentionHighlight(int tab,
boolean highlight)
TabDisplayerUIsetAttentionHighlight in class TabDisplayerUIBuilt on May 21 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.