|
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
javax.swing.JList
com.zfqjava.swing.XList
public class XList
XList provides a editable JList.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JList |
|---|
JList.AccessibleJList, JList.DropLocation |
| 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.JList |
|---|
HORIZONTAL_WRAP, VERTICAL, VERTICAL_WRAP |
| 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 | |
|---|---|
XList()
|
|
XList(ListModel model)
|
|
XList(Object[] a)
|
|
| Method Summary | |
|---|---|
void |
addActionListener(ActionListener listener)
Adds an action listener to the XList. |
void |
cancelEditing()
Cancels the current editing. |
protected void |
fireActionPerformed(ActionEvent e)
Notifies all listeners that have registered interest for notification on this event type. |
int |
getActionClickCount()
|
ActionListener[] |
getActionListeners()
Returns an array of all the action listeners registered on this XList. |
AbstractCellEditor |
getCellEditor()
Retruns the cell editor. |
Dimension |
getCellPreferredSize(int viewMode)
Returns the cell preferred size for the specified view mode. |
int |
getEditingIndex()
Return the index of current editing. |
Component |
getEditorComponent()
|
int |
getViewMode()
Gets the XList display mode in use. |
boolean |
isEditing()
Returns true if the XList is being edited. |
boolean |
isIndexEditable(int index)
Returns true if the speified index is editable. |
boolean |
isIndexEditable(int index,
EventObject e)
|
void |
removeActionListener(ActionListener listener)
Removes the specified action listener from the XList. |
void |
setActionClickCount(int actionClickCount)
|
void |
setCellEditor(AbstractCellEditor cellEditor)
Sets the editor. |
void |
setCellPreferredSize(int viewMode,
Dimension size)
Sets the preferred cell size for the specified view mode. |
void |
setElementAt(Object o,
int index)
Sets the element at the specified index. |
void |
setViewMode(int mode)
Sets the XList display mode. |
void |
startEditingAtIndex(int index)
|
void |
startEditingAtIndex(int index,
EventObject e)
|
boolean |
stopEditing()
Stops the current editing. |
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 XList()
public XList(Object[] a)
public XList(ListModel model)
| Method Detail |
|---|
public void updateUI()
updateUI in class JListpublic void setViewMode(int mode)
XList display mode.
mode - one of 4 legal values:
IllegalArgumentException - if the mode illegalpublic int getViewMode()
XList display mode in use.
public void setCellPreferredSize(int viewMode,
Dimension size)
viewMode - the view mode, one of 4 legal values:
size - the preferred cell size
IllegalArgumentException - if the viewMode illegalgetCellPreferredSize(int)public Dimension getCellPreferredSize(int viewMode)
viewMode - the view mode, one of 4 legal values:
IllegalArgumentException - if the viewMode illegalsetCellPreferredSize(int, java.awt.Dimension)public void setCellEditor(AbstractCellEditor cellEditor)
cellEditor - the cell editorpublic AbstractCellEditor getCellEditor()
public int getActionClickCount()
public void setActionClickCount(int actionClickCount)
public void setElementAt(Object o,
int index)
Subclass should overide this methods to store
the editing value.
The default behavior is determines the model,
if it is a java.util.List, set it's
value.
o - the editing valueindex - the indexpublic boolean isIndexEditable(int index)
index - the index to determine
public boolean isIndexEditable(int index,
EventObject e)
index - e -
public boolean isEditing()
XList is being edited.
XList is being edited,
otherwise return falsepublic boolean stopEditing()
public void cancelEditing()
public void startEditingAtIndex(int index)
public void startEditingAtIndex(int index,
EventObject e)
public Component getEditorComponent()
public int getEditingIndex()
public void addActionListener(ActionListener listener)
XList.
listener - the listener to addXList(javax.swing.ListModel)public void removeActionListener(ActionListener listener)
XList.
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 fireEventListenerList
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||