Package adams.gui.tools.findinfiles
Class AbstractFindInFilesAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- adams.gui.action.AbstractBaseAction
-
- adams.gui.tools.findinfiles.AbstractFindInFilesAction
-
- All Implemented Interfaces:
CleanUpHandler
,BaseAction
,ActionListener
,Serializable
,Cloneable
,Comparable<AbstractFindInFilesAction>
,EventListener
,Action
public abstract class AbstractFindInFilesAction extends AbstractBaseAction implements Comparable<AbstractFindInFilesAction>
Ancestor for actions in the Find in files panel.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected FindInFilesPanel
m_Owner
the owner.-
Fields inherited from class adams.gui.action.AbstractBaseAction
ASYNCHRONOUS
-
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
-
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
-
Constructor Summary
Constructors Constructor Description AbstractFindInFilesAction()
Initializes the action.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Cleans up data structures, frees up memory.int
compareTo(AbstractFindInFilesAction o)
Compares with the other action using the menu item text.protected abstract void
doUpdate()
Updates the action with the current state of the owner.boolean
equals(Object obj)
Checks whether the two actions are the same (using the menu item text).protected abstract String
getMenuItemText()
Returns the text for the menu item.FindInFilesPanel
getOwner()
Returns the owning panel.void
setOwner(FindInFilesPanel value)
Sets the owning panel.void
update()
Updates the action with the current state of the owner.-
Methods inherited from class adams.gui.action.AbstractBaseAction
actionPerformed, doActionPerformed, getAccelerator, getIcon, getMnemonic, getName, getToolTipText, hasAccelerator, hasIcon, hasMnemonic, hasToolTipText, initialize, isAsynchronous, isSelected, postActionPerformed, preActionPerformed, setAccelerator, setAsynchronous, setIcon, setIcon, setMnemonic, setName, setSelected, setToolTipText
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.Action
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
m_Owner
protected FindInFilesPanel m_Owner
the owner.
-
-
Method Detail
-
setOwner
public void setOwner(FindInFilesPanel value)
Sets the owning panel.- Parameters:
value
- the owner
-
getOwner
public FindInFilesPanel getOwner()
Returns the owning panel.- Returns:
- the owner
-
getMenuItemText
protected abstract String getMenuItemText()
Returns the text for the menu item.- Returns:
- the text
-
doUpdate
protected abstract void doUpdate()
Updates the action with the current state of the owner.
-
update
public void update()
Updates the action with the current state of the owner.
-
compareTo
public int compareTo(AbstractFindInFilesAction o)
Compares with the other action using the menu item text.- Specified by:
compareTo
in interfaceComparable<AbstractFindInFilesAction>
- Parameters:
o
- the other action- Returns:
- less than zero, zero, or greater than zero if the menu item text is smaller, equal to, or greater than the other one
-
equals
public boolean equals(Object obj)
Checks whether the two actions are the same (using the menu item text).
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUp
in interfaceBaseAction
- Specified by:
cleanUp
in interfaceCleanUpHandler
- Overrides:
cleanUp
in classAbstractBaseAction
-
-