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

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
                  extended by net.atlanticbb.tantlinger.ui.text.actions.HTMLBlockAction
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

public class HTMLBlockAction
extends HTMLTextEditAction

Action which formats HTML block level elements

Author:
Bob Tantlinger
See Also:
Serialized Form

Field Summary
static int BLOCKQUOTE
           
static int DIV
           
static java.lang.String[] ELEMENT_TYPES
           
static int H1
           
static int H2
           
static int H3
           
static int H4
           
static int H5
           
static int H6
           
static int OL
           
static int P
           
static int PRE
           
static int UL
           
 
Fields inherited from class net.atlanticbb.tantlinger.ui.text.actions.HTMLTextEditAction
DISABLED, EDITOR, SOURCE, 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
HTMLBlockAction(int type)
          Creates a new HTMLBlockAction
 
Method Summary
 javax.swing.text.html.HTML.Tag getTag()
          Gets the tag
protected  void sourceEditPerformed(java.awt.event.ActionEvent e, javax.swing.JEditorPane editor)
           
protected  void updateSourceContextState(javax.swing.JEditorPane ed)
           
protected  void updateWysiwygContextState(javax.swing.JEditorPane ed)
           
protected  void wysiwygEditPerformed(java.awt.event.ActionEvent e, javax.swing.JEditorPane editor)
           
 
Methods inherited from class net.atlanticbb.tantlinger.ui.text.actions.HTMLTextEditAction
actionPerformedCatch, contextChanged, execute, getCurrentEditor, getEditMode
 
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

DIV

public static final int DIV
See Also:
Constant Field Values

P

public static final int P
See Also:
Constant Field Values

H1

public static final int H1
See Also:
Constant Field Values

H2

public static final int H2
See Also:
Constant Field Values

H3

public static final int H3
See Also:
Constant Field Values

H4

public static final int H4
See Also:
Constant Field Values

H5

public static final int H5
See Also:
Constant Field Values

H6

public static final int H6
See Also:
Constant Field Values

PRE

public static final int PRE
See Also:
Constant Field Values

BLOCKQUOTE

public static final int BLOCKQUOTE
See Also:
Constant Field Values

OL

public static final int OL
See Also:
Constant Field Values

UL

public static final int UL
See Also:
Constant Field Values

ELEMENT_TYPES

public static final java.lang.String[] ELEMENT_TYPES
Constructor Detail

HTMLBlockAction

public HTMLBlockAction(int type)
                throws java.lang.IllegalArgumentException
Creates a new HTMLBlockAction

Parameters:
type - A block type - P, PRE, BLOCKQUOTE, H1, H2, etc
Throws:
java.lang.IllegalArgumentException
Method Detail

updateWysiwygContextState

protected void updateWysiwygContextState(javax.swing.JEditorPane ed)
Overrides:
updateWysiwygContextState in class HTMLTextEditAction

updateSourceContextState

protected void updateSourceContextState(javax.swing.JEditorPane ed)
Overrides:
updateSourceContextState in class HTMLTextEditAction

sourceEditPerformed

protected void sourceEditPerformed(java.awt.event.ActionEvent e,
                                   javax.swing.JEditorPane editor)
Specified by:
sourceEditPerformed in class HTMLTextEditAction

wysiwygEditPerformed

protected void wysiwygEditPerformed(java.awt.event.ActionEvent e,
                                    javax.swing.JEditorPane editor)
Specified by:
wysiwygEditPerformed in class HTMLTextEditAction

getTag

public javax.swing.text.html.HTML.Tag getTag()
Gets the tag

Returns: