com.lightdev.app.shtm
Class SHTMLPanelImpl

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.lightdev.app.shtm.SHTMLPanel
                      extended by com.lightdev.app.shtm.SHTMLPanelImpl
All Implemented Interfaces:
SHTMLPrefsChangeListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.CaretListener

public class SHTMLPanelImpl
extends SHTMLPanel
implements javax.swing.event.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.

Author:
Ulrich Hilger, Dimitri Polivaev, Light Development, http://www.lightdev.com, info@lightdev.com, published under the terms and conditions of the GNU General Public License, for details see file gpl.txt in the distribution package of this software
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String aboutAction
           
static java.lang.String ACTION_SELECTED
           
static java.lang.String ACTION_SELECTED_KEY
           
static java.lang.String ACTION_UNSELECTED
           
static java.lang.String APP_TEMP_DIR
           
static java.lang.String appendTableColAction
           
static java.lang.String appendTableRowAction
           
static java.lang.String clearFormatAction
           
static java.lang.String copyAction
           
static java.lang.String cutAction
           
static java.lang.String deleteTableColAction
           
static java.lang.String deleteTableRowAction
           
protected  SHTMLDocument doc
          currently active SHTMLDocument
static java.lang.String documentTitleAction
           
 com.lightdev.app.shtm.DynamicResource dynRes
          single instance of a dynamic resource for use by all
static java.lang.String editAnchorsAction
           
static java.lang.String editLinkAction
           
static java.lang.String editNamedStyleAction
           
static java.lang.String editPrefsAction
           
static java.lang.String elemTreeAction
           
static java.lang.String exitAction
          action names these have to correspond with the keys in the resource bundle to allow for dynamic menu creation and control
static java.lang.String FILE_LAST_OPEN
           
static java.lang.String FILE_LAST_SAVE
           
static java.lang.String findReplaceAction
           
static java.lang.String fontAction
           
static java.lang.String fontBoldAction
           
static java.lang.String fontColorAction
           
static java.lang.String fontFamilyAction
           
static java.lang.String fontItalicAction
           
static java.lang.String fontSizeAction
           
static java.lang.String fontStrikethroughAction
           
static java.lang.String fontUnderlineAction
           
static java.lang.String formatAsCodeAction
           
static java.lang.String formatImageAction
           
static java.lang.String formatListAction
           
static java.lang.String formatParaAction
           
static java.lang.String formatTableAction
           
static java.lang.String gcAction
           
 java.lang.String helpMenuId
          help menu ID
static java.lang.String helpTopicsAction
           
static java.lang.String IMAGE_DIR
           
static java.lang.String insertImageAction
           
static java.lang.String insertLinkAction
           
static java.lang.String insertTableAction
           
static java.lang.String insertTableColAction
           
static java.lang.String insertTableRowAction
           
static java.lang.String insertTableRowHeaderAction
           
static java.lang.String moveTableColumnLeftAction
           
static java.lang.String moveTableColumnRightAction
           
static java.lang.String moveTableRowDownAction
           
static java.lang.String moveTableRowUpAction
           
static java.lang.String nextTableCellAction
           
protected  java.awt.event.ActionListener openHyperlinkHandler
           
static java.lang.String openLinkAction
           
static java.lang.String paraAlignCenterAction
           
static java.lang.String paraAlignLeftAction
           
static java.lang.String paraAlignRightAction
           
static java.lang.String pasteAction
           
static java.lang.String pasteOtherAction
           
static com.lightdev.app.shtm.PluginManager pluginManager
          the plug-in manager of SimplyHTML
 java.lang.String pluginMenuId
          plugin menu ID
static java.lang.String prevTableCellAction
           
static java.lang.String printAction
           
static java.lang.String redoAction
           
static java.lang.String saveAllAction
           
static java.lang.String selectAllAction
           
static java.lang.String setDefaultStyleRefAction
           
static java.lang.String setStyleAction
           
static java.lang.String setTagAction
           
static java.lang.String testAction
           
static java.lang.String toggleBulletsAction
           
static java.lang.String toggleNumbersAction
           
static java.lang.String toggleTableHeaderCellAction
           
static java.lang.String undoAction
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Method Summary
 void addAction(java.lang.String text, javax.swing.Action action)
           
 void adjustDividers()
          adjust the divider sizes of SimplyHTML's SplitPanel according to visibility
 void caretUpdate(javax.swing.event.CaretEvent e)
          caret listener implementation to track format changes
 void clearDockPanels()
           
protected  void createToolbarItem(javax.swing.JToolBar toolBar, java.lang.String itemKey)
           
protected  void customizeFrame()
          customize the frame to our needs
 javax.swing.Action getAction(java.lang.String actionName)
           
static void getActionProperties(javax.swing.Action action, java.lang.String cmd)
          get action properties from the associated resource bundle
 int getCaretPosition()
           
 javax.swing.text.html.HTMLDocument getDocument()
           
 com.lightdev.app.shtm.DocumentPane getDocumentPane()
           
 java.lang.String getDocumentText()
          Convenience method for obtaining the document text
 javax.swing.JEditorPane getEditorPane()
           
 javax.swing.text.AttributeSet getMaxAttributes(int caretPosition)
           
 javax.swing.JMenuBar getMenuBar()
           
 javax.swing.JEditorPane getMostRecentFocusOwner()
           
static SHTMLPanelImpl getOwnerSHTMLPanel(java.awt.Component c)
           
static TextResources getResources()
           
 SHTMLEditorPane getSHTMLEditorPane()
           
 javax.swing.JEditorPane getSourceEditorPane()
           
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 needsSaving()
          indicates whether or not the document needs to be saved.
 javax.swing.JMenuItem newActionMenuItem(java.lang.String actionName)
          Returns a new menu item for a named action of SimplyHTML.
 void openHyperlink(java.lang.String linkURL)
           
protected  boolean processKeyBinding(javax.swing.KeyStroke ks, java.awt.event.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(java.awt.Dimension prefSize)
           
 void setCurrentDocumentContent(java.lang.String sText)
          Convenience method for setting the document text
protected  void setEditorPane(SHTMLEditorPane editorPane)
           
 void setOpenHyperlinkHandler(java.awt.event.ActionListener openHyperlinkHandler)
          Sets the handler for the Open Hyperlink action.
static void setTextResources(TextResources textResources)
           
 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 com.lightdev.app.shtm.SHTMLPanel
createSHTMLPanel, setResources, shtmlPrefChanged
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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 java.awt.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 java.awt.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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

APP_TEMP_DIR

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

IMAGE_DIR

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

ACTION_SELECTED_KEY

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

ACTION_SELECTED

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

ACTION_UNSELECTED

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

FILE_LAST_OPEN

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

FILE_LAST_SAVE

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

dynRes

public 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 java.awt.event.ActionListener openHyperlinkHandler

doc

protected SHTMLDocument doc
currently active SHTMLDocument


pluginMenuId

public final java.lang.String pluginMenuId
plugin menu ID

See Also:
Constant Field Values

helpMenuId

public final java.lang.String helpMenuId
help menu ID

See Also:
Constant Field Values

exitAction

public static final java.lang.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 java.lang.String undoAction
See Also:
Constant Field Values

redoAction

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

cutAction

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

copyAction

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

pasteAction

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

pasteOtherAction

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

selectAllAction

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

clearFormatAction

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

fontAction

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

fontFamilyAction

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

fontSizeAction

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

fontBoldAction

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

fontStrikethroughAction

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

fontItalicAction

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

fontUnderlineAction

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

fontColorAction

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

helpTopicsAction

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

aboutAction

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

gcAction

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

elemTreeAction

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

testAction

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

insertTableAction

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

formatTableAction

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

toggleTableHeaderCellAction

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

insertTableColAction

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

insertTableRowAction

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

insertTableRowHeaderAction

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

appendTableRowAction

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

appendTableColAction

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

deleteTableRowAction

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

deleteTableColAction

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

nextTableCellAction

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

prevTableCellAction

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

moveTableRowUpAction

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

moveTableColumnLeftAction

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

moveTableColumnRightAction

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

moveTableRowDownAction

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

toggleBulletsAction

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

toggleNumbersAction

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

formatListAction

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

editPrefsAction

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

insertImageAction

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

formatImageAction

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

formatParaAction

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

editNamedStyleAction

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

paraAlignLeftAction

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

paraAlignCenterAction

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

paraAlignRightAction

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

insertLinkAction

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

editLinkAction

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

openLinkAction

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

setTagAction

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

editAnchorsAction

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

saveAllAction

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

documentTitleAction

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

setDefaultStyleRefAction

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

findReplaceAction

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

setStyleAction

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

formatAsCodeAction

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

printAction

public static final java.lang.String printAction
See Also:
Constant Field Values
Method Detail

getResources

public static TextResources getResources()

setTextResources

public static void setTextResources(TextResources textResources)

getOwnerSHTMLPanel

public static SHTMLPanelImpl getOwnerSHTMLPanel(java.awt.Component c)

processKeyBinding

protected boolean processKeyBinding(javax.swing.KeyStroke ks,
                                    java.awt.event.KeyEvent e,
                                    int condition,
                                    boolean pressed)
Overrides:
processKeyBinding in class javax.swing.JComponent

newActionMenuItem

public javax.swing.JMenuItem newActionMenuItem(java.lang.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:
newActionMenuItem in class SHTMLPanel

getAction

public javax.swing.Action getAction(java.lang.String actionName)
Specified by:
getAction in class SHTMLPanel

getDocumentText

public java.lang.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(java.lang.String sText)
Convenience method for setting the document text

Specified by:
setCurrentDocumentContent in class SHTMLPanel

setContentPanePreferredSize

public void setContentPanePreferredSize(java.awt.Dimension prefSize)
Specified by:
setContentPanePreferredSize in class SHTMLPanel

getDocument

public javax.swing.text.html.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(java.lang.String text,
                      javax.swing.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(javax.swing.JToolBar toolBar,
                                 java.lang.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


isHtmlEditorActive

public boolean isHtmlEditorActive()

getActionProperties

public static void getActionProperties(javax.swing.Action action,
                                       java.lang.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(javax.swing.event.CaretEvent e)
caret listener implementation to track format changes

Specified by:
caretUpdate in interface javax.swing.event.CaretListener

getMaxAttributes

public javax.swing.text.AttributeSet getMaxAttributes(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 javax.swing.JEditorPane getEditorPane()
Specified by:
getEditorPane in class SHTMLPanel

getSourceEditorPane

public javax.swing.JEditorPane getSourceEditorPane()
Specified by:
getSourceEditorPane in class SHTMLPanel

getMostRecentFocusOwner

public javax.swing.JEditorPane getMostRecentFocusOwner()
Specified by:
getMostRecentFocusOwner in class SHTMLPanel

getCaretPosition

public int getCaretPosition()
Specified by:
getCaretPosition in class SHTMLPanel

getMenuBar

public javax.swing.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(java.awt.event.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(java.lang.String linkURL)