Class SHTMLPanel

All Implemented Interfaces:
SHTMLPrefsChangeListener, ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
SHTMLPanelImpl

public abstract class SHTMLPanel extends JPanel implements SHTMLPrefsChangeListener
Class for using SimplyHTML as as component
See Also:
  • Method Details

    • shtmlPrefChanged

      public void shtmlPrefChanged(String propertyName, String newValue, String oldValue)
      Specified by:
      shtmlPrefChanged in interface SHTMLPrefsChangeListener
    • createSHTMLPanel

      public static SHTMLPanel createSHTMLPanel()
    • getDocumentText

      public abstract String getDocumentText()
    • needsSaving

      public abstract boolean needsSaving()
    • setContentPanePreferredSize

      public abstract void setContentPanePreferredSize(Dimension dimension)
    • setCurrentDocumentContent

      public abstract void setCurrentDocumentContent(String sText)
    • setResources

      public static void setResources(UIResources resources)
    • setActionBuilder

      public static void setActionBuilder(ActionBuilder ab)
    • getDocument

      public abstract HTMLDocument getDocument()
    • getEditorPane

      public abstract JEditorPane getEditorPane()
    • getSourceEditorPane

      public abstract JEditorPane getSourceEditorPane()
    • getResources

      public static UIResources getResources()
    • getCaretPosition

      public abstract int getCaretPosition()
    • getMenuBar

      public abstract JMenuBar getMenuBar()
    • getMostRecentFocusOwner

      public abstract JEditorPane getMostRecentFocusOwner()
    • getAction

      public abstract Action getAction(String actionName)
    • addAction

      public abstract void addAction(String text, Action action)
    • createActionMenuItem

      public abstract JMenuItem createActionMenuItem(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.)
    • 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.
    • 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.