|
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.AbstractViewTabDisplayerUI
public abstract class AbstractViewTabDisplayerUI
Basic UI class for view tabs - non scrollable tabbed displayer, which shows all tabs equally sized, proportionally. This class is independent on specific L&F, acts as base class for specific L&F descendants.
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.
Field Summary | |
---|---|
protected org.netbeans.swing.tabcontrol.plaf.AbstractViewTabDisplayerUI.Controller |
controller
|
protected TabState |
tabState
|
Fields inherited from class org.netbeans.swing.tabcontrol.TabDisplayerUI |
---|
displayer, selectionModel |
Constructor Summary | |
---|---|
AbstractViewTabDisplayerUI(TabDisplayer displayer)
|
Method Summary | |
---|---|
protected void |
cancelRequestAttention(int tab)
|
protected org.netbeans.swing.tabcontrol.plaf.AbstractViewTabDisplayerUI.Controller |
createController()
|
Image |
createImageOfTab(int index)
Paints the rectangle occupied by a tab into an image and returns the result |
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()
|
org.netbeans.swing.tabcontrol.plaf.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()
|
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 |
isSelected(int index)
|
void |
paint(Graphics g,
JComponent c)
|
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)
|
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 |
Methods inherited from class org.netbeans.swing.tabcontrol.TabDisplayerUI |
---|
getButtonIcon, makeTabVisible, postTabAction, shouldPerformAction |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.netbeans.swing.tabcontrol.plaf.AbstractViewTabDisplayerUI.Controller controller
protected final TabState tabState
Constructor Detail |
---|
public AbstractViewTabDisplayerUI(TabDisplayer displayer)
Method Detail |
---|
public void installUI(JComponent c)
installUI
in class TabDisplayerUI
protected void installControlButtons()
protected Component getControlButtons()
public void uninstallUI(JComponent c)
uninstallUI
in class TabDisplayerUI
protected org.netbeans.swing.tabcontrol.plaf.AbstractViewTabDisplayerUI.Controller createController()
public void paint(Graphics g, JComponent c)
paint
in class ComponentUI
protected final TabDataModel getDataModel()
public final TabLayoutModel getLayoutModel()
protected final TabDisplayer getDisplayer()
protected final SingleSelectionModel getSelectionModel()
public org.netbeans.swing.tabcontrol.plaf.AbstractViewTabDisplayerUI.Controller getController()
protected final boolean isSelected(int index)
protected final boolean isActive()
protected final boolean isFocused(int index)
protected final SingleSelectionModel createSelectionModel()
TabDisplayerUI
createSelectionModel
in class TabDisplayerUI
public int dropIndexOfPoint(Point p)
TabDisplayerUI
dropIndexOfPoint
in class TabDisplayerUI
p
- A point
protected Font getTxtFont()
protected 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)
public void unregisterShortcuts(JComponent comp)
unregisterShortcuts
in class TabDisplayerUI
public void registerShortcuts(JComponent comp)
registerShortcuts
in class TabDisplayerUI
public Polygon getExactTabIndication(int index)
TabDisplayerUI
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 depend on this.
getExactTabIndication
in class TabDisplayerUI
public Polygon getInsertTabIndication(int index)
TabDisplayerUI
The 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 TabDisplayerUI
public Image createImageOfTab(int index)
createImageOfTab
in class TabDisplayerUI
index
- A tab indexpublic Rectangle getTabRect(int index, Rectangle destination)
TabDisplayerUI
getTabRect
in class TabDisplayerUI
public int tabForCoordinate(Point p)
TabDisplayerUI
tabForCoordinate
in class TabDisplayerUI
protected int createRepaintPolicy()
protected boolean isAttention(int tab)
protected void requestAttention(int tab)
requestAttention
in class TabDisplayerUI
protected void cancelRequestAttention(int tab)
cancelRequestAttention
in class TabDisplayerUI
|
org.netbeans.swing.tabcontrol 1.8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |