Package com.lightdev.app.shtm
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
,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.
- 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
-
-
Field Summary
Fields Modifier and Type Field Description 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
blackFontColorAction
static java.lang.String
blueFontColorAction
static java.lang.String
clearFormatAction
static java.lang.String
copyAction
static java.lang.String
cutAction
static java.lang.String
decreaseFontSizeAction
static java.lang.String
deleteTableColAction
static java.lang.String
deleteTableRowAction
protected SHTMLDocument
doc
currently active SHTMLDocumentstatic java.lang.String
documentTitleAction
com.lightdev.app.shtm.DynamicResource
dynRes
single instance of a dynamic resource for use by allstatic 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 controlstatic 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
static java.lang.String
greenFontColorAction
java.lang.String
helpMenuId
help menu IDstatic java.lang.String
helpTopicsAction
static java.lang.String
IMAGE_DIR
static java.lang.String
increaseFontSizeAction
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 SimplyHTMLjava.lang.String
pluginMenuId
plugin menu IDstatic java.lang.String
prevTableCellAction
static java.lang.String
printAction
static java.lang.String
redFontColorAction
static java.lang.String
redoAction
static java.lang.String
removeFontColorAction
static java.lang.String
saveAllAction
static java.lang.String
selectAllAction
static java.lang.String
selectedFontColorAction
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
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAction(java.lang.String text, javax.swing.Action action)
void
adjustDividers()
adjust the divider sizes of SimplyHTML's SplitPanel according to visibilityvoid
caretUpdate(javax.swing.event.CaretEvent e)
caret listener implementation to track format changesvoid
clearDockPanels()
static void
configureActionProperties(javax.swing.Action action, java.lang.String cmd)
get action properties from the associated resource bundlejavax.swing.JMenuItem
createActionMenuItem(java.lang.String actionName)
Returns a new menu item for a named action of SimplyHTML.protected void
createToolbarItem(javax.swing.JToolBar toolBar, java.lang.String itemKey)
protected void
customizeFrame()
customize the frame to our needsjavax.swing.Action
getAction(java.lang.String actionName)
int
getCaretPosition()
javax.swing.text.html.HTMLDocument
getDocument()
com.lightdev.app.shtm.DocumentPane
getDocumentPane()
java.lang.String
getDocumentText()
Convenience method for obtaining the document textjavax.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)
SHTMLEditorPane
getSHTMLEditorPane()
javax.swing.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(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-inprotected void
registerDocument()
register FrmMain as an object which has interest in events from a given document panestatic void
setActionBuilder(ActionBuilder ab)
void
setContentPanePreferredSize(java.awt.Dimension prefSize)
void
setCurrentDocumentContent(java.lang.String sText)
Convenience method for setting the document textprotected void
setEditorPane(SHTMLEditorPane editorPane)
static void
setInternalUiResources()
void
setOpenHyperlinkHandler(java.awt.event.ActionListener openHyperlinkHandler)
Sets the handler for the Open Hyperlink action.static void
setUiResources(UIResources uiResources)
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 toovoid
updateActions()
update all actions-
Methods inherited from class com.lightdev.app.shtm.SHTMLPanel
createSHTMLPanel, getResources, 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, 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 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, 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
-
-
-
-
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
-
increaseFontSizeAction
public static final java.lang.String increaseFontSizeAction
- See Also:
- Constant Field Values
-
decreaseFontSizeAction
public static final java.lang.String decreaseFontSizeAction
- 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
-
removeFontColorAction
public static final java.lang.String removeFontColorAction
- See Also:
- Constant Field Values
-
selectedFontColorAction
public static final java.lang.String selectedFontColorAction
- See Also:
- Constant Field Values
-
redFontColorAction
public static final java.lang.String redFontColorAction
- See Also:
- Constant Field Values
-
blueFontColorAction
public static final java.lang.String blueFontColorAction
- See Also:
- Constant Field Values
-
blackFontColorAction
public static final java.lang.String blackFontColorAction
- See Also:
- Constant Field Values
-
greenFontColorAction
public static final java.lang.String greenFontColorAction
- 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
-
getUiResources
public static UIResources getUiResources()
-
setUiResources
public static void setUiResources(UIResources uiResources)
-
setInternalUiResources
public static void setInternalUiResources()
-
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 classjavax.swing.JComponent
-
createActionMenuItem
public javax.swing.JMenuItem createActionMenuItem(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:
createActionMenuItem
in classSHTMLPanel
-
getAction
public javax.swing.Action getAction(java.lang.String actionName)
- Specified by:
getAction
in classSHTMLPanel
-
getDocumentText
public java.lang.String getDocumentText()
Convenience method for obtaining the document text- Specified by:
getDocumentText
in classSHTMLPanel
- 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 classSHTMLPanel
- 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 classSHTMLPanel
-
setContentPanePreferredSize
public void setContentPanePreferredSize(java.awt.Dimension prefSize)
- Specified by:
setContentPanePreferredSize
in classSHTMLPanel
-
getDocument
public javax.swing.text.html.HTMLDocument getDocument()
- Specified by:
getDocument
in classSHTMLPanel
- 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 incommands
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 classSHTMLPanel
-
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
-
isWYSIWYGEditorActive
public boolean isWYSIWYGEditorActive()
-
isHtmlEditorActive
public boolean isHtmlEditorActive()
-
configureActionProperties
public static void configureActionProperties(javax.swing.Action action, java.lang.String cmd)
get action properties from the associated resource bundle- Parameters:
action
- the action to apply properties tocmd
- 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 interfacejavax.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 classSHTMLPanel
-
getSourceEditorPane
public javax.swing.JEditorPane getSourceEditorPane()
- Specified by:
getSourceEditorPane
in classSHTMLPanel
-
getMostRecentFocusOwner
public javax.swing.JEditorPane getMostRecentFocusOwner()
- Specified by:
getMostRecentFocusOwner
in classSHTMLPanel
-
getCaretPosition
public int getCaretPosition()
- Specified by:
getCaretPosition
in classSHTMLPanel
-
getMenuBar
public javax.swing.JMenuBar getMenuBar()
- Specified by:
getMenuBar
in classSHTMLPanel
-
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 classSHTMLPanel
-
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 classSHTMLPanel
-
openHyperlink
public void openHyperlink(java.lang.String linkURL)
-
-