public abstract class AbstractResultHistoryPlugin extends Object implements ResultHistoryList.ResultHistoryPopupMenuCustomizer, Serializable, Comparable<AbstractResultHistoryPlugin>
Modifier and Type | Field and Description |
---|---|
protected AbstractExplorerTab |
m_Owner
the tab this plugin belongs to (for accessing the session).
|
Constructor and Description |
---|
AbstractResultHistoryPlugin() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(AbstractResultHistoryPlugin o)
Comparison on the group and name.
|
void |
customizePopupMenu(ResultHistoryList history,
int index,
JPopupMenu menu)
Allows to customize the popup menu for the result history.
|
boolean |
equals(Object o)
Checks equality using the name of the plugin.
|
abstract ActionListener |
getActionListener(ResultHistoryList history,
int index)
Returns the action lister to use in the menu.
|
abstract String |
getGroup()
Returns the group of the plugin.
|
abstract String |
getName()
Returns the name of the plugin.
|
AbstractExplorerTab |
getOwner()
Returns the tab the plugin belongs to.
|
Object |
getSessionValue(String key)
Returns a session value, if present.
|
abstract boolean |
handles(ResultHistoryList history,
int index)
Checks whether the current item can be handled.
|
boolean |
hasSessionValue(String key)
Checks whether a session value is present.
|
static void |
populateMenu(AbstractExplorerTab tab,
List<String> classnames,
ResultHistoryList history,
int index,
JPopupMenu menu)
Allows to customize the popup menu for the result history.
|
void |
setOwner(AbstractExplorerTab value) |
void |
setSessionValue(String key,
Object value)
Sets a session value.
|
protected AbstractExplorerTab m_Owner
public void setOwner(AbstractExplorerTab value)
public AbstractExplorerTab getOwner()
public boolean hasSessionValue(String key)
key
- the key to look forpublic Object getSessionValue(String key)
key
- the key to look forpublic void setSessionValue(String key, Object value)
key
- the key to look forvalue
- the value to setpublic int compareTo(AbstractResultHistoryPlugin o)
compareTo
in interface Comparable<AbstractResultHistoryPlugin>
o
- the other plugingetGroup()
,
getName()
public boolean equals(Object o)
equals
in class Object
o
- the other objectgetGroup()
,
getName()
public abstract String getGroup()
public abstract String getName()
public abstract boolean handles(ResultHistoryList history, int index)
history
- the current historyindex
- the selected history itempublic abstract ActionListener getActionListener(ResultHistoryList history, int index)
history
- the current historyindex
- the selected history itempublic void customizePopupMenu(ResultHistoryList history, int index, JPopupMenu menu)
customizePopupMenu
in interface ResultHistoryList.ResultHistoryPopupMenuCustomizer
history
- the list this popup menu is forindex
- the index of the select item from the historymenu
- the menu to customizepublic static void populateMenu(AbstractExplorerTab tab, List<String> classnames, ResultHistoryList history, int index, JPopupMenu menu)
tab
- the tab the result history belongs toclassnames
- the plugins (classnames) to addhistory
- the list this popup menu is forindex
- the index of the select item from the historymenu
- the menu to customizeCopyright © 2017. All Rights Reserved.