|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JSplitPane org.xnap.commons.gui.IconSplitPane
public class IconSplitPane
This class provides a tabbed pane like behaving widget. The
IconSplitPane
is split up in two parts. The left part is a
JList
that contains icons and their descriptions.
The right part can be any component. If the user selects on of the icons
from the list the respective panel is show at the right.
The names of the methods are modelled after the
JTabbedPane
.
TODO add ComponentOrientation support
TODO show empty icon instead of no icon? to separated list entries
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JSplitPane |
---|
JSplitPane.AccessibleJSplitPane |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
IconSplitPane()
|
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener l)
Adds a listener that gets notified when a tab is selected. |
void |
addTab(String description,
Icon icon,
Component c)
Adds a new tab. |
protected void |
fireStateChanged()
Send a ChangeEvent , whose source is this tabbedpane, to
each listener. |
String |
getDescriptionAt(int i)
Returns the description at index i . |
Icon |
getIconAt(int i)
Returns the icon at index i . |
Component |
getSelectedComponent()
Returns the currently selected tab. |
int |
getSelectedIndex()
Returns the index of the currently selected tab. |
Component |
getTabAt(int i)
Returns the tab at index i . |
int |
getTabCount()
Returns the number of tabs. |
Component[] |
getTabs()
Returns all tabs as an array. |
String |
getTitleAt(int i)
Returns the title at index i . |
int |
indexOfComponent(Component c)
Returns the index of c . |
void |
insertTab(String description,
Icon icon,
Component c,
int index)
Inserts a new tab at index . |
void |
remove(Component c)
Removes tab c . |
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener . |
void |
removeTabAt(int i)
Removes tab at index i . |
void |
setIconAt(int i,
Icon icon)
Sets the icon at index i to icon . |
void |
setSelectedComponent(Component c)
Selects c . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IconSplitPane()
Method Detail |
---|
public void addTab(String description, Icon icon, Component c)
public void insertTab(String description, Icon icon, Component c, int index)
index
.
public Component[] getTabs()
public Component getTabAt(int i)
i
.
public int getTabCount()
public String getDescriptionAt(int i)
i
.
public Icon getIconAt(int i)
i
.
public String getTitleAt(int i)
i
.
public void setIconAt(int i, Icon icon)
i
to icon
.
public int getSelectedIndex()
index
of the currently selected tab.
public void setSelectedComponent(Component c)
c
. The corresponding icon will also be selected.
public int indexOfComponent(Component c)
c
.
public void remove(Component c)
c
.
remove
in class JSplitPane
public void removeTabAt(int i)
i
.
public void addChangeListener(ChangeListener l)
public void removeChangeListener(ChangeListener l)
ChangeListener
.
l
- the ChangeListener to removefireStateChanged()
,
addChangeListener(javax.swing.event.ChangeListener)
protected void fireStateChanged()
ChangeEvent
, whose source is this tabbedpane, to
each listener. This method method is called each time
a ChangeEvent
is received from the model.
addChangeListener(javax.swing.event.ChangeListener)
public Component getSelectedComponent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |