- java.lang.Object
-
- javax.swing.AbstractAction
-
- devplugin.ContextMenuSeparatorAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
public final class ContextMenuSeparatorAction extends javax.swing.AbstractAction
A class that brings support for adding separators to the context menu of a plugin. Simply add the instance of this class to your context menu, it will be replaced with a separator so the user will see a separator in the context menu.- Author:
- René Mach
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
boolean
equals(java.lang.Object o)
static ContextMenuSeparatorAction
getDisabledOnTaskMenuInstance()
Gets an instance of this class.static ContextMenuSeparatorAction
getInstance()
Gets an instance of this class.int
hashCode()
void
putValue(java.lang.String key, java.lang.Object newValue)
Overwritten to disable changes of values of this class.-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, removePropertyChangeListener, setEnabled
-
-
-
-
Method Detail
-
getInstance
public static ContextMenuSeparatorAction getInstance()
Gets an instance of this class. The instance is also shown in task menu of the ProgramInfoDialog.- Returns:
- The instance of this class, that is shown in the task menu of the ProgramInfoDialog.
- See Also:
getDisabledOnTaskMenuInstance()
-
getDisabledOnTaskMenuInstance
public static ContextMenuSeparatorAction getDisabledOnTaskMenuInstance()
Gets an instance of this class. The instance is not shown in task menu of the ProgramInfoDialog.- Returns:
- The instance of this class, that is not shown in the task menu of the ProgramInfoDialog.
- See Also:
getInstance()
-
putValue
public void putValue(java.lang.String key, java.lang.Object newValue)
Overwritten to disable changes of values of this class. So use it or don't use it, it has no effect.- Specified by:
putValue
in interfacejavax.swing.Action
- Overrides:
putValue
in classjavax.swing.AbstractAction
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-