com.lightdev.app.shtm

Class SHTMLPanel

public abstract class SHTMLPanel extends JPanel

Class for using SimplyHTML as as component

Author: Dimitri Polivaev 14.01.2007

Method Summary
static SHTMLPanelcreateSHTMLPanel()
abstract ActiongetAction(String actionName)
abstract intgetCaretPosition()
abstract HTMLDocumentgetDocument()
abstract StringgetDocumentText()
abstract JEditorPanegetEditorPane()
abstract JMenuBargetMenuBar()
abstract JEditorPanegetMostRecentFocusOwner()
static TextResourcesgetResources()
abstract JEditorPanegetSourceEditorPane()
abstract booleanneedsSaving()
abstract JMenuItemnewActionMenuItem(String actionName)
Returns a new menu item for a named action of SimplyHTML.
abstract voidsetContentPanePreferredSize(Dimension dimension)
abstract voidsetCurrentDocumentContent(String sText)
abstract voidsetOpenHyperlinkHandler(ActionListener openHyperlinkHandler)
Sets the handler for the Open Hyperlink action.
static voidsetResources(TextResources resources)
abstract voidswitchViews()
Switches between the rich text view and the source view, given tabbed panes are not used.

Method Detail

createSHTMLPanel

public static SHTMLPanel createSHTMLPanel()

getAction

public abstract Action getAction(String actionName)

getCaretPosition

public abstract int getCaretPosition()

getDocument

public abstract HTMLDocument getDocument()

getDocumentText

public abstract String getDocumentText()

getEditorPane

public abstract JEditorPane getEditorPane()

getMenuBar

public abstract JMenuBar getMenuBar()

getMostRecentFocusOwner

public abstract JEditorPane getMostRecentFocusOwner()

getResources

public static TextResources getResources()

getSourceEditorPane

public abstract JEditorPane getSourceEditorPane()

needsSaving

public abstract boolean needsSaving()

newActionMenuItem

public abstract JMenuItem newActionMenuItem(String actionName)
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.)

setContentPanePreferredSize

public abstract void setContentPanePreferredSize(Dimension dimension)

setCurrentDocumentContent

public abstract void setCurrentDocumentContent(String sText)

setOpenHyperlinkHandler

public abstract void setOpenHyperlinkHandler(ActionListener openHyperlinkHandler)
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.

setResources

public static void setResources(TextResources resources)

switchViews

public abstract void switchViews()
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.