|
||||||||||
| 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.JPanel
ucar.unidata.ui.PersistentList
public class PersistentList
Utility for managing a list of persistent objects.
Uses a ListModel to manage a list of Objects.
The id for an object is the String from "toString" method.
Storing and fetching objects enforces id uniqueness.
An action event is sent when an object is selected. The event source
is the selected object, or the listener can call getSelected().
(TBD) The first token of toString() must be a unique id (like a name).
(TBD) Drag 'n Drop.
PersistentStore,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| 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 | |
|---|---|
PersistentList(String objectName,
PersistentStore store,
String header)
Constructor |
|
| Method Summary | |
|---|---|
void |
addActionListener(ActionListener l)
add a "New Selection" listener |
void |
appendElement(Object o)
_more_ |
boolean |
contains(String id)
check if this id already exists |
void |
deleteSelected()
delete the currently selected object |
int |
getNumElements()
return the currently selected object |
Object |
getSelected()
return the currently selected object |
void |
removeActionListener(ActionListener l)
remove a "New Selection" listener |
void |
replace(Object editedObject)
find the object in the list with the same id as editedObject if it exists, replace it with editedObject. |
void |
storePersistentData()
save the list to the PersistentStore |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PersistentList(String objectName,
PersistentStore store,
String header)
objectName - name of list object in the PersistentStorestore - where objects are storedheader - field names placed at the top of the list| Method Detail |
|---|
public void addActionListener(ActionListener l)
l - public void removeActionListener(ActionListener l)
l - public void appendElement(Object o)
o - public boolean contains(String id)
id -
public void replace(Object editedObject)
editedObject - the edited objectpublic void deleteSelected()
public int getNumElements()
public Object getSelected()
public void storePersistentData()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||