Package adams.gui.goe.popupmenu
Class SwapActor
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.goe.popupmenu.AbstractGenericObjectEditorPopupMenuCustomizer
-
- adams.gui.goe.popupmenu.SwapActor
-
- All Implemented Interfaces:
LoggingSupporter
,SizeOfHandler
,GenericObjectEditorPopupMenuCustomizer
,Serializable
public class SwapActor extends AbstractGenericObjectEditorPopupMenuCustomizer
Allows the swapping of an actor.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description SwapActor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doCustomize(GenericObjectEditorPopupMenu menu, PropertyEditor editor, JComponent comp)
Customizes the GOE popup menu.String
getName()
The name used for sorting.protected boolean
handles(GenericObjectEditorPopupMenu menu, PropertyEditor editor, JComponent comp)
Customizes the GOE popup menu.protected void
swapActor(PropertyEditor editor, Actor source, Actor target)
Performs the swap.-
Methods inherited from class adams.gui.goe.popupmenu.AbstractGenericObjectEditorPopupMenuCustomizer
addSeparator, customize
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
getName
public String getName()
The name used for sorting.- Returns:
- the name
-
handles
protected boolean handles(GenericObjectEditorPopupMenu menu, PropertyEditor editor, JComponent comp)
Customizes the GOE popup menu.- Specified by:
handles
in classAbstractGenericObjectEditorPopupMenuCustomizer
- Parameters:
menu
- the menu to customizeeditor
- the current editorcomp
- the GUI context
-
swapActor
protected void swapActor(PropertyEditor editor, Actor source, Actor target)
Performs the swap.- Parameters:
editor
- the property editorsource
- the current actortarget
- the actor to replace the current one with
-
doCustomize
protected void doCustomize(GenericObjectEditorPopupMenu menu, PropertyEditor editor, JComponent comp)
Customizes the GOE popup menu.- Specified by:
doCustomize
in classAbstractGenericObjectEditorPopupMenuCustomizer
- Parameters:
menu
- the menu to customizeeditor
- the current editorcomp
- the GUI context
-
-