|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.AbstractAction | +--com.bigzip.plugin.ArchiveAction
Archive plugins need to subclass this class to provide the user with access to the operations that can be performed on the archive. The various properties describe the action for the benifit of the user interface. The actionPerformed methods needs to be implemented and will be called when the user invokes the action through the menu bar or toolbar. The class provides convenience methods for access the properties. It is recommended that subclass implementors use these methods instead of setting and getting the properties directory to insure that the correct type of objects are stored in the properties.
Field Summary | |
static java.lang.String |
ACCELERATOR
|
static java.lang.String |
ANIMATED_ICON
|
static java.lang.String |
ICON
|
static java.lang.String |
MNEMONIC
|
static java.lang.String |
SEPARATOR_BEFORE
|
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
ArchiveAction()
|
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
Performs the action when the user chooses the action in the toolbar or menu bar. |
javax.swing.KeyStroke |
getAccelerator()
|
protected ArchiveEntry[] |
getAllEntries()
|
javax.swing.ImageIcon |
getAnimatedIcon()
|
javax.swing.ImageIcon |
getAnimatedMediumIcon()
|
javax.swing.ImageIcon |
getLargeIcon()
|
java.lang.String |
getLongDescription()
|
javax.swing.ImageIcon |
getMediumIcon()
|
javax.swing.AbstractButton |
getMenuItem()
Returns the menu item to be used in the menu. |
char |
getMnemonic()
|
java.lang.String |
getName()
|
protected ArchiveEntry[] |
getSelectedEntries()
|
java.lang.String |
getShortDescription()
|
javax.swing.ImageIcon |
getSmallIcon()
|
javax.swing.AbstractButton |
getToolbarButton()
Returns the button to be used on the toolbar. |
boolean |
isSeparatorBefore()
|
void |
setAccelerator(javax.swing.KeyStroke accelerator)
Sets the accelerator for the action. |
void |
setAnimatedIcon(java.awt.Image image)
Sets the large animated icon that will represent the action. |
void |
setAnimatedIcon(javax.swing.ImageIcon icon)
Sets the large animated icon that will represent the action. |
void |
setAnimatedIcon(java.lang.String iconPath)
Sets the large animated icon that will represent the action. |
void |
setEntryTablePane(com.bigzip.plugin.EntryTablePane entryTablePane)
Sets the entry table pane used in BiGZiP. |
void |
setIcon(java.awt.Image image)
Sets the large icon that will represent the action. |
void |
setIcon(javax.swing.ImageIcon icon)
Sets the large icon that will represent the action. |
void |
setIcon(java.lang.String iconPath)
Sets the large icon that will represent the action. |
void |
setLongDescription(java.lang.String description)
Sets the long description provided by the action. |
void |
setMnemonic(char mnemonic)
Sets the mnemonic used in the menu bar. |
void |
setName(java.lang.String name)
Sets the label of the action. |
void |
setSeparatorBefore(boolean separatorBefore)
Sets if a separator is to be placed before the action on the menu bar. |
void |
setShortDescription(java.lang.String description)
Sets the short description provided by the action. |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ACCELERATOR
public static final java.lang.String ANIMATED_ICON
public static final java.lang.String ICON
public static final java.lang.String MNEMONIC
public static final java.lang.String SEPARATOR_BEFORE
Constructor Detail |
public ArchiveAction()
Method Detail |
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in class javax.swing.AbstractAction
event
- The action event detailing the action.public javax.swing.KeyStroke getAccelerator()
protected final ArchiveEntry[] getAllEntries()
public java.lang.String getLongDescription()
public javax.swing.AbstractButton getMenuItem()
public char getMnemonic()
public java.lang.String getName()
protected final ArchiveEntry[] getSelectedEntries()
public java.lang.String getShortDescription()
public javax.swing.ImageIcon getAnimatedIcon()
public javax.swing.ImageIcon getAnimatedMediumIcon()
public javax.swing.ImageIcon getLargeIcon()
public javax.swing.ImageIcon getMediumIcon()
public javax.swing.ImageIcon getSmallIcon()
public javax.swing.AbstractButton getToolbarButton()
public boolean isSeparatorBefore()
public void setAccelerator(javax.swing.KeyStroke accelerator)
accelerator
- The accelerator.public void setLongDescription(java.lang.String description)
description
- The long description.public void setName(java.lang.String name)
name
- The action label.public void setAnimatedIcon(javax.swing.ImageIcon icon)
icon
- The large animated icon, size should be 45x45 or there about.public void setAnimatedIcon(java.awt.Image image)
icon
- The large animated icon, size should be 45x45 or there about.public void setAnimatedIcon(java.lang.String iconPath)
iconPath
- The path to the large animated icon, size should be 45x45 or there about.public void setIcon(javax.swing.ImageIcon icon)
icon
- The large icon, size should be 45x45 or there about.public void setIcon(java.awt.Image image)
image
- The large image, size should be 45x45 or there about.public void setIcon(java.lang.String iconPath)
iconPath
- The path to the large icon, size should be 45x45 or there about.public void setMnemonic(char mnemonic)
mnemonic
- The mnemonic.public void setSeparatorBefore(boolean separatorBefore)
separatorBefore
- True if a separator is to appear.public void setShortDescription(java.lang.String description)
description
- The short description.public final void setEntryTablePane(com.bigzip.plugin.EntryTablePane entryTablePane)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |