| java.lang.Object javax.swing.plaf.ComponentUI org.netbeans.swing.tabcontrol.TabbedContainerUI
All known Subclasses: org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI,
Field Summary | |
protected TabbedContainer | container The TabbedContainer this instance is acting as a ui delegate for.
do not alter the value in this field. |
Method Summary | |
abstract protected void | cancelRequestAttention(int tab) | abstract public Image | createImageOfTab(int idx) | abstract public int | dropIndexOfPoint(Point p) Index at which a tab would be inserted if a suitable object were dropped
at this point. | abstract public Rectangle | getContentArea() | abstract public Polygon | getExactTabIndication(int idx) | abstract public Polygon | getInsertTabIndication(int idx) Get a polygon indicating the insertion of a tab before the passed
index, unless the index is equal to the model size, in which case
it will return an indication for inserting a tab at the end. | abstract public SingleSelectionModel | getSelectionModel() Get the selection model that tracks and determines which tab is selected. | abstract public Rectangle | getTabRect(int tab, Rectangle r) Get the bounds of a tab. | abstract public Rectangle | getTabsArea() | public void | installUI(JComponent c) | abstract public boolean | isShowCloseButton() | abstract public void | makeTabVisible(int index) Make a tab visible. | abstract protected void | requestAttention(int tab) | abstract public void | setShowCloseButton(boolean val) | final protected boolean | shouldPerformAction(String command, int tab, MouseEvent event) Allows ActionListeners attached to the container to determine if the
event should be acted on. | final boolean | shouldReplaceUI() | abstract public int | tabForCoordinate(Point p) Get the tab at a given point in the coordinate space of the
container. | protected boolean | uichange() This method is called if TabbedContainer.updateUI() gets called after
a UI delegate has been installed (in other words, the user did something
like switch look and feels or switch the Windows desktop theme).
Normally, the only UI delegate that exists for TabbedContainer is
DefaultTabbedContainerUI, so it makes no sense to replace one with
another, since they do the same thing.
However, this method can be used to update the tab displayer component's
UI. |
container | protected TabbedContainer container(Code) | | The TabbedContainer this instance is acting as a ui delegate for.
do not alter the value in this field.
|
TabbedContainerUI | public TabbedContainerUI(TabbedContainer container)(Code) | | Creates a new instance of TabbedContainerUI
|
cancelRequestAttention | abstract protected void cancelRequestAttention(int tab)(Code) | | |
createImageOfTab | abstract public Image createImageOfTab(int idx)(Code) | | Create an image suitable for use in drag and drop operations, of a tab
|
dropIndexOfPoint | abstract public int dropIndexOfPoint(Point p)(Code) | | Index at which a tab would be inserted if a suitable object were dropped
at this point.
Parameters: p - A point A tab index which may be equal to the size of the model (past thelast tab index) if the tab should be inserted at the end. |
getContentArea | abstract public Rectangle getContentArea()(Code) | | Get a rectangle matching the area in which content is displayed
|
getExactTabIndication | abstract public Polygon getExactTabIndication(int idx)(Code) | | Get a polygon matching the shape of the tab
|
getInsertTabIndication | abstract public Polygon getInsertTabIndication(int idx)(Code) | | Get a polygon indicating the insertion of a tab before the passed
index, unless the index is equal to the model size, in which case
it will return an indication for inserting a tab at the end.
Parameters: idx - A tab index A shape representing the shape of the tab as it is displayed onscreen,in the coordinate space of the displayer |
getSelectionModel | abstract public SingleSelectionModel getSelectionModel()(Code) | | Get the selection model that tracks and determines which tab is selected.
The selection model (in the default implementation, this is the selection model of theembedded tab displayer) |
getTabRect | abstract public Rectangle getTabRect(int tab, Rectangle r)(Code) | | Get the bounds of a tab. Note that for non-rectangular tabs
this may not correspond exactly to the area in which it will
respond to mouse clicks.
Parameters: tab - A tab index Parameters: r - A rectangle to configure with the information, or null The passed rectangle, or a new one if null was passed |
getTabsArea | abstract public Rectangle getTabsArea()(Code) | | Get a rectangle matching the area in which tabs are displayed
|
isShowCloseButton | abstract public boolean isShowCloseButton()(Code) | | |
makeTabVisible | abstract public void makeTabVisible(int index)(Code) | | Make a tab visible. No-op except in the case of scrolling tabs,
in which case the tab may be scrolled offscreen.
Parameters: index - A tab index |
requestAttention | abstract protected void requestAttention(int tab)(Code) | | |
setShowCloseButton | abstract public void setShowCloseButton(boolean val)(Code) | | |
shouldPerformAction | final protected boolean shouldPerformAction(String command, int tab, MouseEvent event)(Code) | | Allows ActionListeners attached to the container to determine if the
event should be acted on. Delegates to displayer.postActionEvent() .
This method will create a TabActionEvent with the passed string as an
action command, and cause the displayer to fire this event. It will
return true if no listener on the displayer consumed the TabActionEvent;
consuming the event is the way a listener can veto a change, or provide
special handling for it.
Parameters: command - The action command - this should be TabDisplayer.COMMAND_SELECTor TabDisplayer.COMMAND_CLOSE, but private contractsbetween custom UIs and components are also an option. Parameters: tab - The index of the tab upon which the action should act, or-1 if non-applicable Parameters: event - A mouse event which initiated the action, or null true if the event posted was not consumed by any listener |
shouldReplaceUI | final boolean shouldReplaceUI()(Code) | | Accessor method for TabbedContainer
See Also: uichange |
tabForCoordinate | abstract public int tabForCoordinate(Point p)(Code) | | Get the tab at a given point in the coordinate space of the
container.
Parameters: p - A point The tab index at this point, or -1 if no tab |
uichange | protected boolean uichange()(Code) | | This method is called if TabbedContainer.updateUI() gets called after
a UI delegate has been installed (in other words, the user did something
like switch look and feels or switch the Windows desktop theme).
Normally, the only UI delegate that exists for TabbedContainer is
DefaultTabbedContainerUI, so it makes no sense to replace one with
another, since they do the same thing.
However, this method can be used to update the tab displayer component's
UI. Subclasses are expected to override this method to call
updateUI() on the displayer, or do whatever is appropriate to ensure that
the UI will look right after the change - or to return true from this
method, in which the entire UI delegate for the tabbed container will
be replaced.
false |
|
|