# Class SHTMLPanelImpl

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.lightdev.app.shtm.SHTMLPanel
com.lightdev.app.shtm.SHTMLPanelImpl

All Implemented Interfaces:
  `SHTMLPrefsChangeListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CaretListener`

public class SHTMLPanelImpl extends SHTMLPanel implements CaretListener
Main component of application SimplyHTML.

This class constructs the main panel and all of its GUI elements such as menus, etc.

It defines a set of inner classes creating actions which can be connected to menus, buttons or instantiated individually.

See Also:
  - Serialized Form

## Nested Class Summary

### Nested classes/interfaces inherited from class JPanel

`JPanel.AccessibleJPanel`

### Nested classes/interfaces inherited from class JComponent

`JComponent.AccessibleJComponent`

### Nested classes/interfaces inherited from class Container

`Container.AccessibleAWTContainer`

### Nested classes/interfaces inherited from class Component

`Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`aboutAction`
`static final String`
`ACTION_SELECTED`
`static final String`
`ACTION_SELECTED_KEY`
`static final String`
`ACTION_UNSELECTED`
`static final String`
`APP_TEMP_DIR`
`static final String`
`appendTableColAction`
`static final String`
`appendTableRowAction`
`static final String`
`blackFontColorAction`
`static final String`
`blueFontColorAction`
`static final String`
`blueHighlightColorAction`
`static final String`
`clearFormatAction`
`static final String`
`copyAction`
`static final String`
`cutAction`
`static final String`
`decreaseFontSizeAction`
`static final String`
`deleteTableColAction`
`static final String`
`deleteTableRowAction`
`protected SHTMLDocument`
`doc`
currently active SHTMLDocument
`static final String`
`documentTitleAction`
`final com.lightdev.app.shtm.DynamicResource`
`dynRes`
single instance of a dynamic resource for use by all
`static final String`
`editAnchorsAction`
`static final String`
`editLinkAction`
`static final String`
`editNamedStyleAction`
`static final String`
`editPrefsAction`
`static final String`
`elemTreeAction`
`static final String`
`exitAction`
action names these have to correspond with the keys in the resource bundle to allow for dynamic menu creation and control
`static final String`
`FILE_LAST_OPEN`
`static final String`
`FILE_LAST_SAVE`
`static final String`
`findReplaceAction`
`static final String`
`fontAction`
`static final String`
`fontBoldAction`
`static final String`
`fontColorAction`
`static final String`
`fontFamilyAction`
`static final String`
`fontItalicAction`
`static final String`
`fontSizeAction`
`static final String`
`fontStrikeThroughAction`
`static final String`
`fontUnderlineAction`
`static final String`
`formatAsCodeAction`
`static final String`
`formatImageAction`
`static final String`
`formatListAction`
`static final String`
`formatParaAction`
`static final String`
`formatTableAction`
`static final String`
`gcAction`
`static final String`
`greenFontColorAction`
`static final String`
`greenHighlightColorAction`
`final String`
`helpMenuId`
help menu ID
`static final String`
`helpTopicsAction`
`static final String`
`highlightColorAction`
`static final String`
`increaseFontSizeAction`
`static final String`
`insertImageAction`
`static final String`
`insertLinkAction`
`static final String`
`insertTableAction`
`static final String`
`insertTableColAction`
`static final String`
`insertTableRowAction`
`static final String`
`insertTableRowHeaderAction`
`static final String`
`moveTableColumnLeftAction`
`static final String`
`moveTableColumnRightAction`
`static final String`
`moveTableRowDownAction`
`static final String`
`moveTableRowUpAction`
`static final String`
`nextTableCellAction`
`protected ActionListener`
`openHyperlinkHandler`
`static final String`
`openLinkAction`
`static final String`
`paraAlignCenterAction`
`static final String`
`paraAlignLeftAction`
`static final String`
`paraAlignRightAction`
`static final String`
`pasteAction`
`static final String`
`pasteOtherAction`
`static com.lightdev.app.shtm.PluginManager`
`pluginManager`
the plug-in manager of SimplyHTML
`final String`
`pluginMenuId`
plugin menu ID
`static final String`
`prevTableCellAction`
`static final String`
`printAction`
`static final String`
`redFontColorAction`
`static final String`
`redHighlightColorAction`
`static final String`
`redoAction`
`static final String`
`removeFontColorAction`
`static final String`
`removeHighlightColorAction`
`static final String`
`saveAllAction`
`static final String`
`selectAllAction`
`static final String`
`selectedFontColorAction`
`static final String`
`selectedHighlightColorAction`
`static final String`
`setDefaultStyleRefAction`
`static final String`
`setStyleAction`
`static final String`
`setTagAction`
`static final String`
`testAction`
`static final String`
`toggleBulletsAction`
`static final String`
`toggleNumbersAction`
`static final String`
`toggleTableHeaderCellAction`
`static final String`
`undoAction`
`static final String`
`yellowHighlightColorAction`

### Fields inherited from class SHTMLPanel

`DARK_BLUE, DARK_GREEN, DARK_RED, LIGHT_BLUE, LIGHT_GREEN, LIGHT_RED`

### Fields inherited from class JComponent

`listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

### Fields inherited from class Component

`accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

### Fields inherited from interface ImageObserver

`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

## Method Summary

Modifier and Type
Method
Description
`void`
`addAction(String text, Action action)`
`void`
`adjustDividers()`
adjust the divider sizes of SimplyHTML's SplitPanel according to visibility
`void`
`caretUpdate(CaretEvent e)`
caret listener implementation to track format changes
`void`
`clearDockPanels()`
`static void`
`configureActionProperties(Action action, String cmd)`
get action properties from the associated resource bundle
`JMenuItem`
`createActionMenuItem(String actionName)`
Returns a new menu item for a named action of SimplyHTML.
`protected void`
`createToolbarItem(JToolBar toolBar, String itemKey)`
`protected void`
`customizeFrame()`
customize the frame to our needs
`Action`
`getAction(String actionName)`
`int`
`getCaretPosition()`
`HTMLDocument`
`getDocument()`
`com.lightdev.app.shtm.DocumentPane`
`getDocumentPane()`
`String`
`getDocumentText()`
Convenience method for obtaining the document text
`JEditorPane`
`getEditorPane()`
`AttributeSet`
`getMaxParagraphAttributes(int caretPosition)`
`JMenuBar`
`getMenuBar()`
`JEditorPane`
`getMostRecentFocusOwner()`
`static SHTMLPanelImpl`
`getOwnerSHTMLPanel(Component c)`
`SHTMLEditorPane`
`getSHTMLEditorPane()`
`JEditorPane`
`getSourceEditorPane()`
`static UIResources`
`getUiResources()`
`protected void`
`initActions()`
instantiate Actions and put them into the commands Hashtable for later use along with their action commands.
`protected void`
`initDocumentPane()`
`boolean`
`isHtmlEditorActive()`
`boolean`
`isWYSIWYGEditorActive()`
`boolean`
`needsSaving()`
indicates whether or not the document needs to be saved.
`void`
`openHyperlink(String linkURL)`
`protected boolean`
`processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)`
`void`
`refreshPluginDisplay(SHTMLPlugin pi)`
refresh the display for a given plug-in
`protected void`
`registerDocument()`
register FrmMain as an object which has interest in events from a given document pane
`static void`
`setActionBuilder(ActionBuilder ab)`
`void`
`setContentPanePreferredSize(Dimension prefSize)`
`void`
`setCurrentDocumentContent(String sText)`
Convenience method for setting the document text
`protected void`
`setEditorPane(SHTMLEditorPane editorPane)`
`static void`
`setInternalUiResources()`
`void`
`setOpenHyperlinkHandler(ActionListener openHyperlinkHandler)`
Sets the handler for the Open Hyperlink action.
`static void`
`setUiResources(UIResources uiResources)`
`void`
`shtmlPrefChanged(String propertyName, String newValue, String oldValue)`
`void`
`switchViews()`
Switches between the rich text view and the source view, given tabbed panes are not used.
`protected void`
`unregisterDocument()`
remove FrmMain as a registered object from a given document pane and its components remove all plug-ins owned by this FrmMain from SimplyHTML objects too
`void`
`updateActions()`
update all actions

### Methods inherited from class SHTMLPanel

`createSHTMLPanel, getResources, setResources`

### Methods inherited from class JPanel

`getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI`

### Methods inherited from class JComponent

`addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update`

### Methods inherited from class Container

`add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree`

### Methods inherited from class Component

`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### APP_TEMP_DIR

public static final String APP_TEMP_DIR

See Also:
  - Constant Field Values

### ACTION_SELECTED_KEY

public static final String ACTION_SELECTED_KEY

See Also:
  - Constant Field Values

### ACTION_SELECTED

public static final String ACTION_SELECTED

See Also:
  - Constant Field Values

### ACTION_UNSELECTED

public static final String ACTION_UNSELECTED

See Also:
  - Constant Field Values

### FILE_LAST_OPEN

public static final String FILE_LAST_OPEN

See Also:
  - Constant Field Values

### FILE_LAST_SAVE

public static final String FILE_LAST_SAVE

See Also:
  - Constant Field Values

### dynRes

public final com.lightdev.app.shtm.DynamicResource dynRes
single instance of a dynamic resource for use by all

### pluginManager

public static com.lightdev.app.shtm.PluginManager pluginManager
the plug-in manager of SimplyHTML

### openHyperlinkHandler

protected ActionListener openHyperlinkHandler

### doc

protected SHTMLDocument doc
currently active SHTMLDocument

### pluginMenuId

public final String pluginMenuId
plugin menu ID

See Also:
  - Constant Field Values

### helpMenuId

public final String helpMenuId
help menu ID

See Also:
  - Constant Field Values

### exitAction

public static final String exitAction
action names these have to correspond with the keys in the resource bundle to allow for dynamic menu creation and control

See Also:
  - Constant Field Values

### undoAction

public static final String undoAction

See Also:
  - Constant Field Values

### redoAction

public static final String redoAction

See Also:
  - Constant Field Values

### cutAction

public static final String cutAction

See Also:
  - Constant Field Values

### copyAction

public static final String copyAction

See Also:
  - Constant Field Values

### pasteAction

public static final String pasteAction

See Also:
  - Constant Field Values

### pasteOtherAction

public static final String pasteOtherAction

See Also:
  - Constant Field Values

### selectAllAction

public static final String selectAllAction

See Also:
  - Constant Field Values

### clearFormatAction

public static final String clearFormatAction

See Also:
  - Constant Field Values

### fontAction

public static final String fontAction

See Also:
  - Constant Field Values

### fontFamilyAction

public static final String fontFamilyAction

See Also:
  - Constant Field Values

### fontSizeAction

public static final String fontSizeAction

See Also:
  - Constant Field Values

### increaseFontSizeAction

public static final String increaseFontSizeAction

See Also:
  - Constant Field Values

### decreaseFontSizeAction

public static final String decreaseFontSizeAction

See Also:
  - Constant Field Values

### fontBoldAction

public static final String fontBoldAction

See Also:
  - Constant Field Values

### fontStrikeThroughAction

public static final String fontStrikeThroughAction

See Also:
  - Constant Field Values

### fontItalicAction

public static final String fontItalicAction

See Also:
  - Constant Field Values

### fontUnderlineAction

public static final String fontUnderlineAction

See Also:
  - Constant Field Values

### fontColorAction

public static final String fontColorAction

See Also:
  - Constant Field Values

### removeFontColorAction

public static final String removeFontColorAction

See Also:
  - Constant Field Values

### selectedFontColorAction

public static final String selectedFontColorAction

See Also:
  - Constant Field Values

### redFontColorAction

public static final String redFontColorAction

See Also:
  - Constant Field Values

### blueFontColorAction

public static final String blueFontColorAction

See Also:
  - Constant Field Values

### blackFontColorAction

public static final String blackFontColorAction

See Also:
  - Constant Field Values

### greenFontColorAction

public static final String greenFontColorAction

See Also:
  - Constant Field Values

### highlightColorAction

public static final String highlightColorAction

See Also:
  - Constant Field Values

### removeHighlightColorAction

public static final String removeHighlightColorAction

See Also:
  - Constant Field Values

### selectedHighlightColorAction

public static final String selectedHighlightColorAction

See Also:
  - Constant Field Values

### redHighlightColorAction

public static final String redHighlightColorAction

See Also:
  - Constant Field Values

### blueHighlightColorAction

public static final String blueHighlightColorAction

See Also:
  - Constant Field Values

### greenHighlightColorAction

public static final String greenHighlightColorAction

See Also:
  - Constant Field Values

### yellowHighlightColorAction

public static final String yellowHighlightColorAction

See Also:
  - Constant Field Values

### helpTopicsAction

public static final String helpTopicsAction

See Also:
  - Constant Field Values

### aboutAction

public static final String aboutAction

See Also:
  - Constant Field Values

### gcAction

public static final String gcAction

See Also:
  - Constant Field Values

### elemTreeAction

public static final String elemTreeAction

See Also:
  - Constant Field Values

### testAction

public static final String testAction

See Also:
  - Constant Field Values

### insertTableAction

public static final String insertTableAction

See Also:
  - Constant Field Values

### formatTableAction

public static final String formatTableAction

See Also:
  - Constant Field Values

### toggleTableHeaderCellAction

public static final String toggleTableHeaderCellAction

See Also:
  - Constant Field Values

### insertTableColAction

public static final String insertTableColAction

See Also:
  - Constant Field Values

### insertTableRowAction

public static final String insertTableRowAction

See Also:
  - Constant Field Values

### insertTableRowHeaderAction

public static final String insertTableRowHeaderAction

See Also:
  - Constant Field Values

### appendTableRowAction

public static final String appendTableRowAction

See Also:
  - Constant Field Values

### appendTableColAction

public static final String appendTableColAction

See Also:
  - Constant Field Values

### deleteTableRowAction

public static final String deleteTableRowAction

See Also:
  - Constant Field Values

### deleteTableColAction

public static final String deleteTableColAction

See Also:
  - Constant Field Values

### nextTableCellAction

public static final String nextTableCellAction

See Also:
  - Constant Field Values

### prevTableCellAction

public static final String prevTableCellAction

See Also:
  - Constant Field Values

### moveTableRowUpAction

public static final String moveTableRowUpAction

See Also:
  - Constant Field Values

### moveTableColumnLeftAction

public static final String moveTableColumnLeftAction

See Also:
  - Constant Field Values

### moveTableColumnRightAction

public static final String moveTableColumnRightAction

See Also:
  - Constant Field Values

### moveTableRowDownAction

public static final String moveTableRowDownAction

See Also:
  - Constant Field Values

### toggleBulletsAction

public static final String toggleBulletsAction

See Also:
  - Constant Field Values

### toggleNumbersAction

public static final String toggleNumbersAction

See Also:
  - Constant Field Values

### formatListAction

public static final String formatListAction

See Also:
  - Constant Field Values

### editPrefsAction

public static final String editPrefsAction

See Also:
  - Constant Field Values

### insertImageAction

public static final String insertImageAction

See Also:
  - Constant Field Values

### formatImageAction

public static final String formatImageAction

See Also:
  - Constant Field Values

### formatParaAction

public static final String formatParaAction

See Also:
  - Constant Field Values

### editNamedStyleAction

public static final String editNamedStyleAction

See Also:
  - Constant Field Values

### paraAlignLeftAction

public static final String paraAlignLeftAction

See Also:
  - Constant Field Values

### paraAlignCenterAction

public static final String paraAlignCenterAction

See Also:
  - Constant Field Values

### paraAlignRightAction

public static final String paraAlignRightAction

See Also:
  - Constant Field Values

### insertLinkAction

public static final String insertLinkAction

See Also:
  - Constant Field Values

### editLinkAction

public static final String editLinkAction

See Also:
  - Constant Field Values

### openLinkAction

public static final String openLinkAction

See Also:
  - Constant Field Values

### setTagAction

public static final String setTagAction

See Also:
  - Constant Field Values

### editAnchorsAction

public static final String editAnchorsAction

See Also:
  - Constant Field Values

### saveAllAction

public static final String saveAllAction

See Also:
  - Constant Field Values

### documentTitleAction

public static final String documentTitleAction

See Also:
  - Constant Field Values

### setDefaultStyleRefAction

public static final String setDefaultStyleRefAction

See Also:
  - Constant Field Values

### findReplaceAction

public static final String findReplaceAction

See Also:
  - Constant Field Values

### setStyleAction

public static final String setStyleAction

See Also:
  - Constant Field Values

### formatAsCodeAction

public static final String formatAsCodeAction

See Also:
  - Constant Field Values

### printAction

public static final String printAction

See Also:
  - Constant Field Values

## Method Details

### getUiResources

public static UIResources getUiResources()

### setUiResources

public static void setUiResources(UIResources uiResources)

### setInternalUiResources

public static void setInternalUiResources()

### getOwnerSHTMLPanel

public static SHTMLPanelImpl getOwnerSHTMLPanel(Component c)

### shtmlPrefChanged

public void shtmlPrefChanged(String propertyName, String newValue, String oldValue)

Specified by:
  `shtmlPrefChanged` in interface `SHTMLPrefsChangeListener`
Overrides:
  `shtmlPrefChanged` in class `SHTMLPanel`

### processKeyBinding

protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)

Overrides:
  `processKeyBinding` in class `JComponent`

### createActionMenuItem

public JMenuItem createActionMenuItem(String actionName)
Description copied from class: `SHTMLPanel`
Returns a new menu item for a named action of SimplyHTML. (Can be used for building custom popup menu, or for invoking the action externally in another way.)

Specified by:
  `createActionMenuItem` in class `SHTMLPanel`

### getAction

public Action getAction(String actionName)

Specified by:
  `getAction` in class `SHTMLPanel`

### getDocumentText

public String getDocumentText()
Convenience method for obtaining the document text

Specified by:
  `getDocumentText` in class `SHTMLPanel`
Returns:
  returns the document text as string.

### needsSaving

public boolean needsSaving()
indicates whether or not the document needs to be saved.

Specified by:
  `needsSaving` in class `SHTMLPanel`
Returns:
  true, if changes need to be saved

### setCurrentDocumentContent

public void setCurrentDocumentContent(String sText)
Convenience method for setting the document text

Specified by:
  `setCurrentDocumentContent` in class `SHTMLPanel`

### setContentPanePreferredSize

public void setContentPanePreferredSize(Dimension prefSize)

Specified by:
  `setContentPanePreferredSize` in class `SHTMLPanel`

### getDocument

public HTMLDocument getDocument()

Specified by:
  `getDocument` in class `SHTMLPanel`
Returns:
  returns the currently used ExtendedHTMLDocument Object

### adjustDividers

public void adjustDividers()
adjust the divider sizes of SimplyHTML's SplitPanel according to visibility

### clearDockPanels

public void clearDockPanels()

### refreshPluginDisplay

public void refreshPluginDisplay(SHTMLPlugin pi)
refresh the display for a given plug-in

Parameters:
  `pi` - the plug-in to refresh

### initDocumentPane

protected void initDocumentPane()

### initActions

protected void initActions()
instantiate Actions and put them into the commands Hashtable for later use along with their action commands. This is hard coded as Actions need to be instantiated hard coded anyway, so we do the storage in `commands` right away.

### setActionBuilder

public static void setActionBuilder(ActionBuilder ab)

### addAction

public void addAction(String text, Action action)

Specified by:
  `addAction` in class `SHTMLPanel`

### updateActions

public void updateActions()
update all actions

### customizeFrame

protected void customizeFrame()
customize the frame to our needs

### createToolbarItem

protected void createToolbarItem(JToolBar toolBar, String itemKey)

### registerDocument

protected void registerDocument()
register FrmMain as an object which has interest in events from a given document pane

### unregisterDocument

protected void unregisterDocument()
remove FrmMain as a registered object from a given document pane and its components remove all plug-ins owned by this FrmMain from SimplyHTML objects too

### isWYSIWYGEditorActive

public boolean isWYSIWYGEditorActive()

### isHtmlEditorActive

public boolean isHtmlEditorActive()

### configureActionProperties

public static void configureActionProperties(Action action, String cmd)
get action properties from the associated resource bundle

Parameters:
  `action` - the action to apply properties to
  `cmd` - the name of the action to get properties for

### caretUpdate

public void caretUpdate(CaretEvent e)
caret listener implementation to track format changes

Specified by:
  `caretUpdate` in interface `CaretListener`

### getMaxParagraphAttributes

public AttributeSet getMaxParagraphAttributes(int caretPosition)

### getDocumentPane

public com.lightdev.app.shtm.DocumentPane getDocumentPane()

Returns:
  Returns the documentPane.

### setEditorPane

protected void setEditorPane(SHTMLEditorPane editorPane)

### getSHTMLEditorPane

public SHTMLEditorPane getSHTMLEditorPane()

Returns:
  Returns the editorPane.

### getEditorPane

public JEditorPane getEditorPane()

Specified by:
  `getEditorPane` in class `SHTMLPanel`

### getSourceEditorPane

public JEditorPane getSourceEditorPane()

Specified by:
  `getSourceEditorPane` in class `SHTMLPanel`

### getMostRecentFocusOwner

public JEditorPane getMostRecentFocusOwner()

Specified by:
  `getMostRecentFocusOwner` in class `SHTMLPanel`

### getCaretPosition

public int getCaretPosition()

Specified by:
  `getCaretPosition` in class `SHTMLPanel`

### getMenuBar

public JMenuBar getMenuBar()

Specified by:
  `getMenuBar` in class `SHTMLPanel`

### switchViews

public void switchViews()
Description copied from class: `SHTMLPanel`
Switches between the rich text view and the source view, given tabbed panes are not used. Has no corresponding action; calling this method is up to the caller application of SimplyHTML.

Specified by:
  `switchViews` in class `SHTMLPanel`

### setOpenHyperlinkHandler

public void setOpenHyperlinkHandler(ActionListener openHyperlinkHandler)
Description copied from class: `SHTMLPanel`
Sets the handler for the Open Hyperlink action. SimplyHTML itself has no ability to open hyperlinks, so it forwards the action to the caller application.

Specified by:
  `setOpenHyperlinkHandler` in class `SHTMLPanel`

### openHyperlink

public void openHyperlink(String linkURL)