com.inet.html.actions
Class InsertHtmlAction
java.lang.Object
javax.swing.AbstractAction
javax.swing.text.TextAction
javax.swing.text.StyledEditorKit.StyledTextAction
com.inet.html.actions.InetHtmlAction
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
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 |
InsertHtmlAction
public InsertHtmlAction(java.lang.String name,
java.lang.String html)
- The Constructor of the action.
- Parameters:
name
- the name of the actionhtml
- 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 actionhtmlAtStart
- HTML to be inserted, if the cursor is at the beginning of a paragraph / blockhtmlInside
- HTML to be inserted, if the cursor is inside a paragraph / blockhtmlAtEnd
- HTML to be inserted, if the cursor is at the end of a paragraph / block
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)
-