csheets.ext.style.ui
Class StyleAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by csheets.ui.ctrl.BaseAction
          extended by csheets.ui.ctrl.FocusOwnerAction
              extended by csheets.ext.style.ui.StyleAction
All Implemented Interfaces:
ActionListener, PropertyChangeListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
AlignBottomAction, AlignCenterAction, AlignLeftAction, AlignMiddleAction, AlignRightAction, AlignTopAction, BoldAction, ItalicAction, UnderlineAction

public abstract class StyleAction
extends FocusOwnerAction

A style operation.

Author:
Einar Pehrson
See Also:
Serialized Form

Field Summary
protected  UIController uiController
          The user interface controller
 
Fields inherited from class csheets.ui.ctrl.FocusOwnerAction
focusOwner
 
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
StyleAction(UIController uiController)
          Creates a new style action.
 
Method Summary
 void actionPerformed(ActionEvent event)
          Applies the style to the selected cells in the focus owner table.
protected abstract  void applyStyle(StylableCell cell)
          Applies the style to the given stylable cell
 
Methods inherited from class csheets.ui.ctrl.FocusOwnerAction
propertyChange
 
Methods inherited from class csheets.ui.ctrl.BaseAction
defineProperties, getName, requiresFile, requiresModification, showErrorDialog
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uiController

protected UIController uiController
The user interface controller

Constructor Detail

StyleAction

public StyleAction(UIController uiController)
Creates a new style action.

Parameters:
uiController - the user interface controller
Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)
Applies the style to the selected cells in the focus owner table.

Parameters:
event - the event that was fired

applyStyle

protected abstract void applyStyle(StylableCell cell)
Applies the style to the given stylable cell

Parameters:
cell - the cell to which style should be applied