public class GenericObjectEditorHistory
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
GenericObjectEditorHistory.HistorySelectionEvent
Event that gets sent when a history item gets selected.
|
static interface |
GenericObjectEditorHistory.HistorySelectionListener
Interface for classes that listen to selections of history items.
|
Modifier and Type | Field and Description |
---|---|
static int |
MAX_HISTORY_COUNT
the maximum entries in the history.
|
static int |
MAX_HISTORY_LENGTH
the maximum length of a caption in the history.
|
static int |
MAX_LINE_LENGTH
the menu max line length.
|
Constructor and Description |
---|
GenericObjectEditorHistory()
Initializes the history.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Object obj)
Adds the object to the history.
|
void |
clear()
Clears the history.
|
void |
customizePopupMenu(javax.swing.JPopupMenu menu,
java.lang.Object current,
GenericObjectEditorHistory.HistorySelectionListener listener)
Adds a menu item with the history to the popup menu.
|
java.util.Vector<java.lang.Object> |
getHistory()
Returns the current history.
|
int |
size()
Returns the number of entries in the history.
|
public static final int MAX_HISTORY_COUNT
public static final int MAX_HISTORY_LENGTH
public static final int MAX_LINE_LENGTH
public GenericObjectEditorHistory()
public void clear()
public void add(java.lang.Object obj)
obj
- the object to addpublic int size()
public java.util.Vector<java.lang.Object> getHistory()
public void customizePopupMenu(javax.swing.JPopupMenu menu, java.lang.Object current, GenericObjectEditorHistory.HistorySelectionListener listener)
menu
- the menu to add the history tocurrent
- the current objectlistener
- the listener to attach to the menu items' ActionListener