net.atlanticbb.tantlinger.ui.text.actions
Class HTMLTextEditAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.bushe.swing.action.BasicAction
          extended by net.atlanticbb.tantlinger.ui.DefaultAction
              extended by net.atlanticbb.tantlinger.ui.text.actions.HTMLTextEditAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, org.bushe.swing.action.Actionable, org.bushe.swing.action.ContextAware, org.bushe.swing.action.DelegatesEnabled, org.bushe.swing.action.EnabledUpdater, org.bushe.swing.action.ItemAction, org.bushe.swing.action.ShouldBeEnabledDelegate
Direct Known Subclasses:
BasicEditAction, ClearStylesAction, HTMLAlignAction, HTMLBlockAction, HTMLElementPropertiesAction, HTMLFontAction, HTMLFontColorAction, HTMLFontSizeAction, HTMLHorizontalRuleAction, HTMLImageAction, HTMLInlineAction, HTMLLineBreakAction, HTMLLinkAction, HTMLTableAction, IndentAction, PasteAction, PasteFormattedAction, TableEditAction

public abstract class HTMLTextEditAction
extends DefaultAction

Author:
Bob Tantlinger
See Also:
Serialized Form

Field Summary
static int DISABLED
           
static java.lang.String EDITOR
           
static int SOURCE
           
static int WYSIWYG
           
 
Fields inherited from class org.bushe.swing.action.BasicAction
DEFAULT_ENABLED_STATE
 
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
HTMLTextEditAction(java.lang.String name)
           
 
Method Summary
protected  void actionPerformedCatch(java.lang.Throwable t)
          Catch all for anything thrown in the execute() method.
protected  void contextChanged()
           
 void execute(java.awt.event.ActionEvent e)
           
protected  javax.swing.JEditorPane getCurrentEditor()
           
 int getEditMode()
           
protected abstract  void sourceEditPerformed(java.awt.event.ActionEvent e, javax.swing.JEditorPane editor)
           
protected  void updateSourceContextState(javax.swing.JEditorPane srcEditor)
           
protected  void updateWysiwygContextState(javax.swing.JEditorPane wysEditor)
           
protected abstract  void wysiwygEditPerformed(java.awt.event.ActionEvent e, javax.swing.JEditorPane editor)
           
 
Methods inherited from class net.atlanticbb.tantlinger.ui.DefaultAction
shouldBeEnabled, updateEnabled
 
Methods inherited from class org.bushe.swing.action.BasicAction
actionPerformed, actionPerformedFinally, actionPerformedTemplate, actionPerformedTry, addActionListener, addItemListener, addShouldBeEnabledDelegate, clearContext, createIcon, createIcon, getAccelerator, getActionCommandName, getActionName, getContext, getContextValue, getGroup, getId, getLongDescription, getMenuShowsIcon, getMnemonic, getRoles, getShortDescription, getSmallIcon, getToolbarShowsText, isSelected, propogateActionEvent, propogateItemEvent, putContextValue, putValue, removeActionListener, removeItemListener, removeShouldBeEnabledDelegate, setAccelerator, setActionCommandName, setActionName, setContext, setId, setLongDescription, setMenuShowsIcon, setMnemonic, setRoles, setSelected, setShortDescription, setSmallIcon, setToolbarShowsText, shouldBeEnabled, toString, updateEnabledState
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, removePropertyChangeListener, setEnabled
 

Field Detail

EDITOR

public static final java.lang.String EDITOR
See Also:
Constant Field Values

DISABLED

public static final int DISABLED
See Also:
Constant Field Values

WYSIWYG

public static final int WYSIWYG
See Also:
Constant Field Values

SOURCE

public static final int SOURCE
See Also:
Constant Field Values
Constructor Detail

HTMLTextEditAction

public HTMLTextEditAction(java.lang.String name)
Method Detail

execute

public void execute(java.awt.event.ActionEvent e)
             throws java.lang.Exception
Overrides:
execute in class org.bushe.swing.action.BasicAction
Throws:
java.lang.Exception

getEditMode

public int getEditMode()

getCurrentEditor

protected javax.swing.JEditorPane getCurrentEditor()

actionPerformedCatch

protected void actionPerformedCatch(java.lang.Throwable t)
Description copied from class: DefaultAction
Catch all for anything thrown in the execute() method. This implementation shows an ExceptionDialog. (non-Javadoc)

Overrides:
actionPerformedCatch in class DefaultAction
See Also:
BasicAction.actionPerformedCatch(java.lang.Throwable)

contextChanged

protected void contextChanged()
Overrides:
contextChanged in class org.bushe.swing.action.BasicAction

updateWysiwygContextState

protected void updateWysiwygContextState(javax.swing.JEditorPane wysEditor)

updateSourceContextState

protected void updateSourceContextState(javax.swing.JEditorPane srcEditor)

wysiwygEditPerformed

protected abstract void wysiwygEditPerformed(java.awt.event.ActionEvent e,
                                             javax.swing.JEditorPane editor)

sourceEditPerformed

protected abstract void sourceEditPerformed(java.awt.event.ActionEvent e,
                                            javax.swing.JEditorPane editor)