com.inet.html.actions
Class InsertHtmlAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by javax.swing.text.TextAction
          extended by javax.swing.text.StyledEditorKit.StyledTextAction
              extended by com.inet.html.actions.InetHtmlAction
                  extended by com.inet.html.actions.InsertHtmlAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class InsertHtmlAction
extends InetHtmlAction

A base action to insert any HTML on the current position.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
InsertHtmlAction(java.lang.String name, java.lang.String html)
          The Constructor of the action.
InsertHtmlAction(java.lang.String name, java.lang.String htmlAtStart, java.lang.String htmlInside, java.lang.String htmlAtEnd)
          The Constructor of the action.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ev)
          
 java.lang.String getHtml()
          get the HTML String. can be override to make it dynamicly
 
Methods inherited from class javax.swing.text.TextAction
augmentList
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsertHtmlAction

public InsertHtmlAction(java.lang.String name,
                        java.lang.String html)
The Constructor of the action.

Parameters:
name - the name of the action
html - the inserting html

InsertHtmlAction

public InsertHtmlAction(java.lang.String name,
                        java.lang.String htmlAtStart,
                        java.lang.String htmlInside,
                        java.lang.String htmlAtEnd)
The Constructor of the action.

Parameters:
name - the name of the action
htmlAtStart - HTML to be inserted, if the cursor is at the beginning of a paragraph / block
htmlInside - HTML to be inserted, if the cursor is inside a paragraph / block
htmlAtEnd - HTML to be inserted, if the cursor is at the end of a paragraph / block
Method Detail

getHtml

public java.lang.String getHtml()
get the HTML String. can be override to make it dynamicly

Returns:
the HTML string that should be insert

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ev)