|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.zfqjava.swing.JSidePane
com.zfqjava.swing.JSideBar
public class JSideBar
JSideBar provides a side bar.
ValueAction,
Serialized Form| Nested Class Summary | |
|---|---|
protected class |
JSideBar.AccessibleJSideBar
This class implements accessibility support for the JSideBar class. |
| Nested classes/interfaces inherited from class com.zfqjava.swing.JSidePane |
|---|
JSidePane.AccessibleJSidePane |
| 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
LARGE_ICON_VIEW_MODE
Identifies the large icon view mode. |
static int |
LIST_VIEW_MODE
Identifies the list view mode. |
static int |
SMALL_ICON_VIEW_MODE
Identifies the small icon view mode. |
static int |
THUMBNAILS_VIEW_MODE
Identifies the thumbnails view mode. |
| 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 | |
|---|---|
JSideBar()
Constructs a JSideBar with an empty model. |
|
| Method Summary | |
|---|---|
void |
addActionListener(ActionListener listener)
Adds an action listener to the JSideBar. |
void |
addGroup(ListModel model)
Adds the group listmodel. |
void |
addGroup(ListModel model,
Action action)
Adds the group componet with the group header action. |
void |
addGroupAt(ListModel model,
Action action,
int index)
Adds the group listmodel at the specify index with the group header action. |
protected JList |
createList(ListModel model)
Creates the JList for the specified ListModel. |
protected void |
fireActionPerformed(ActionEvent e)
Notifies all listeners that have registered interest for notification on this event type. |
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JSideBar. |
ActionListener[] |
getActionListeners()
Returns an array of all the action listeners registered on this JSideBar. |
DefaultCellEditor |
getCellEditor()
Returns the cell editor for render list item. |
CellProvider |
getCellProvider()
Returns the cell provider for renderer and editor. |
DefaultCellRenderer |
getCellRenderer()
Returns the cell renderer for render list item. |
protected JList |
getListAt(int index)
Returns the JList at the specified group index. |
Object |
getSelectedItem()
Returns the selected item. |
int |
getViewMode()
Gets the JSideBar display mode in use. |
protected int |
indexOfListModel(ListModel model)
Returns the group index for the specified list model. |
protected String |
paramString()
Returns a string representation of this JSideBar. |
void |
removeActionListener(ActionListener listener)
Removes the specified action listener from the JSideBar. |
void |
removeGroup(ListModel model)
Removes the group listmodel. |
void |
setCellEditor(DefaultCellEditor cellEditor)
Sets the cell editor for render list item. |
void |
setCellProvider(CellProvider cellProvider)
Sets the cell provider for renderer and editor. |
void |
setCellRenderer(DefaultCellRenderer cellRenderer)
Sets the cell renderer for render list item. |
void |
setSelectionMode(int selectionMode)
Determines whether single-item or multiple-item selections are allowed. |
void |
setViewMode(int mode)
Sets the JSideBar display mode. |
void |
updateUI()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SMALL_ICON_VIEW_MODE
public static final int LARGE_ICON_VIEW_MODE
public static final int LIST_VIEW_MODE
public static final int THUMBNAILS_VIEW_MODE
| Constructor Detail |
|---|
public JSideBar()
JSideBar with an empty model.
| Method Detail |
|---|
public void updateUI()
updateUI in class JSidePanepublic void setCellRenderer(DefaultCellRenderer cellRenderer)
cellRenderer - the cell renderergetCellRenderer()public DefaultCellRenderer getCellRenderer()
setCellRenderer(com.zfqjava.swing.cell.DefaultCellRenderer)public void setCellEditor(DefaultCellEditor cellEditor)
cellEditor - the cell editorgetCellEditor()public DefaultCellEditor getCellEditor()
setCellEditor(com.zfqjava.swing.cell.DefaultCellEditor)public void setCellProvider(CellProvider cellProvider)
cellProvider - the cell providergetCellProvider()public CellProvider getCellProvider()
setCellProviderpublic void setViewMode(int mode)
JSideBar display mode.
mode - one of 4 legal values:
IllegalArgumentException - if the mode illegalpublic int getViewMode()
JSideBar display mode in use.
public void setSelectionMode(int selectionMode)
JSidePaneselectionMode values are allowed:
ListSelectionModel.SINGLE_SELECTION
Only one list index can be selected at a time. In this
mode the setSelectionInterval and
addSelectionInterval
methods are equivalent, and only the second index
argument is used.
ListSelectionModel.SINGLE_INTERVAL_SELECTION
One contiguous index interval can be selected at a time.
In this mode setSelectionInterval and
addSelectionInterval
are equivalent.
ListSelectionModel.MULTIPLE_INTERVAL_SELECTION
In this mode, there's no restriction on what can be selected.
This is the default.
setSelectionMode in class JSidePaneselectionMode - an integer specifying the type of selections
that are permissibleJSidePane.getSelectionMode()public void addGroup(ListModel model)
model - the listmodel to add
public void addGroup(ListModel model,
Action action)
model - the group listmodelaction - the group action
public void addGroupAt(ListModel model,
Action action,
int index)
model - the listmodel to addaction - the group actionindex - the listmodel index
IndexOutOfBoundsExceptionpublic void removeGroup(ListModel model)
model - the listmodel to removeprotected JList createList(ListModel model)
mode - the list model
protected JList getListAt(int index)
JSidePane.getComponentAt(int)protected int indexOfListModel(ListModel model)
mode - the list model
public Object getSelectedItem()
public void addActionListener(ActionListener listener)
JSideBar.
listener - the listener to addJSideBar()public void removeActionListener(ActionListener listener)
JSideBar.
listener - the listener to removepublic ActionListener[] getActionListeners()
ActionListeners or an empty
array if no action listeners are currently registeredaddActionListener(java.awt.event.ActionListener),
removeActionListener(java.awt.event.ActionListener)protected void fireActionPerformed(ActionEvent e)
e - the action event to fireEventListenerListprotected String paramString()
null.
paramString in class JSidePanepublic AccessibleContext getAccessibleContext()
getAccessibleContext in interface AccessiblegetAccessibleContext in class JSidePane
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||