|
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.ToolbarTabDisplayerUI
public class ToolbarTabDisplayerUI
A TabDisplayerUI which uses a JToolBar and JButtons. This look is used in various places such as the property sheet and component inspector.
| Nested Class Summary | |
|---|---|
class |
ToolbarTabDisplayerUI.IndexButton
A button which will get its content from an index in the datamodel which corresponds to its index in its parent's component hierarchy. |
| 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.AbstractTabDisplayerUI |
|---|
componentListener, hierarchyListener, layoutModel, modelListener, mouseListener, propertyChangeListener, selectionListener |
| Fields inherited from class org.netbeans.swing.tabcontrol.TabDisplayerUI |
|---|
displayer, selectionModel |
| Constructor Summary | |
|---|---|
ToolbarTabDisplayerUI(TabDisplayer disp)
Creates a new instance of ToolbarTabDisplayerUI |
|
| Method Summary | |
|---|---|
void |
cancelRequestAttention(int tab)
|
protected TabLayoutModel |
createLayoutModel()
Create an instance of TabLayoutModel which will provide coordinates for tabs |
protected MouseListener |
createMouseListener()
Create the mouse listener that will be responsible for changing the selection on mouse events, triggering repaints on mouse enter/exit/motion, etc. |
protected ChangeListener |
createSelectionListener()
Create a ChangeListener to be attached to the selection model. |
static ComponentUI |
createUI(JComponent jc)
|
Icon |
getButtonIcon(int buttonId,
int buttonState)
|
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. |
Dimension |
getMinimumSize(JComponent c)
|
Dimension |
getPreferredSize(JComponent c)
|
Rectangle |
getTabRect(int index,
Rectangle destination)
Configure the passed rectangle with the shape of the tab at the given index. |
protected void |
install()
Called after creating the layout model, selection model and mouse listener, but before installing the mouse listener and selection model. |
protected void |
modelChanged()
Convenience method called by ModelListener.stateChanged() when the data model changes. |
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. |
| Methods inherited from class org.netbeans.swing.tabcontrol.plaf.AbstractTabDisplayerUI |
|---|
createComponentListener, createFont, createHierarchyListener, createModelListener, createPropertyChangeListener, createSelectionModel, dropIndexOfPoint, installListeners, installUI, registerShortcuts, toDropPoint, uninstall, uninstallListeners, uninstallUI, unregisterShortcuts |
| Methods inherited from class org.netbeans.swing.tabcontrol.TabDisplayerUI |
|---|
createImageOfTab, makeTabVisible, postTabAction, shouldPerformAction |
| Methods inherited from class javax.swing.plaf.ComponentUI |
|---|
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, paint, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ToolbarTabDisplayerUI(TabDisplayer disp)
| Method Detail |
|---|
public static ComponentUI createUI(JComponent jc)
protected TabLayoutModel createLayoutModel()
AbstractTabDisplayerUI
createLayoutModel in class AbstractTabDisplayerUIprotected void install()
AbstractTabDisplayerUI
install in class AbstractTabDisplayerUIprotected void modelChanged()
AbstractTabDisplayerUIdisplayer.repaint().
modelChanged in class AbstractTabDisplayerUIprotected MouseListener createMouseListener()
AbstractTabDisplayerUI
createMouseListener in class AbstractTabDisplayerUIpublic void requestAttention(int tab)
requestAttention in class TabDisplayerUIpublic void cancelRequestAttention(int tab)
cancelRequestAttention in class TabDisplayerUIprotected ChangeListener createSelectionListener()
AbstractTabDisplayerUIChangeListener to be attached to the selection model. This
listener will be responsible for repainting the appropriate areas on selection changes.
createSelectionListener in class AbstractTabDisplayerUIpublic 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 Rectangle getTabRect(int index, Rectangle destination)
TabDisplayerUI
getTabRect in class TabDisplayerUIpublic int tabForCoordinate(Point p)
TabDisplayerUI
tabForCoordinate in class TabDisplayerUIpublic Dimension getPreferredSize(JComponent c)
getPreferredSize in class ComponentUIpublic Dimension getMinimumSize(JComponent c)
getMinimumSize in class ComponentUIpublic Icon getButtonIcon(int buttonId, int buttonState)
getButtonIcon 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 | |||||||||