Class RMEditorPane

All Implemented Interfaces:
PropertyChangeListener, EventListener

public class RMEditorPane extends RMViewerPane
This class is a container for an RMEditor in an enclosing scroll pane with tool bars for editing.
  • Constructor Details

    • RMEditorPane

      public RMEditorPane()
  • Method Details

    • getMainEditorPane

      public static RMEditorPane getMainEditorPane()
      Returns the editor pane that is the most recently activated.
    • getFrameIcon

      public static Image getFrameIcon()
      Returns the icon for the editor window frame.
    • getEditor

      public RMEditor getEditor()
      Returns the viewer as an editor.
    • createViewer

      protected RMViewer createViewer()
      Overridden to return an RMEditor.
      Overrides:
      createViewer in class RMViewerPane
    • getTopToolBar

      public RMEditorPaneToolBar getTopToolBar()
      Override to return as RMEditorPaneToolBar.
      Overrides:
      getTopToolBar in class RMViewerPane
    • createTopToolBar

      public SwingOwner createTopToolBar()
      Creates the top tool bar.
      Overrides:
      createTopToolBar in class RMViewerPane
    • getMenuBar

      public RMEditorPaneMenuBar getMenuBar()
      Returns the SwingOwner for the menu bar.
    • createMenuBar

      public RMEditorPaneMenuBar createMenuBar()
      Creates the RMEditorPaneMenuBar for the menu bar.
    • getDataSource

      public RMDataSource getDataSource()
      Returns the datasource associated with the editor's document.
    • setDataSource

      public void setDataSource(RMDataSource aDataSource)
      Sets the datasource for the panel.
    • setDataSource

      public void setDataSource(WebURL aurl, Point2D aPoint)
      Sets a datasource from a given URL at a given point (if dragged in).
    • getShowRulers

      public boolean getShowRulers()
      Returns whether editor pane shows rulers.
    • setShowRulers

      public void setShowRulers(boolean aValue)
      Sets whether editor pane shows rulers.
    • isEditing

      public boolean isEditing()
      Returns whether editor is really doing editing.
    • setEditing

      public void setEditing(boolean aFlag)
      Sets whether editor is really doing editing.
    • initUI

      protected void initUI()
      Override to configure Window.
      Overrides:
      initUI in class UIOwner<SwingEvent,JComponent>
    • resetUI

      protected void resetUI()
      Updates the editor's UI panels.
      Overrides:
      resetUI in class RMViewerPane
    • respondUI

      protected void respondUI(SwingEvent anEvent)
      Handles changes to the editor's UI controls.
      Overrides:
      respondUI in class RMViewerPane
    • createWindowX

      protected Window createWindowX()
      Creates the window.
    • getInspectorPanel

      public InspectorPanel getInspectorPanel()
      Returns the editor inspector (shared).
    • getAttributesPanel

      public AttributesPanel getAttributesPanel()
      Returns the editor attributes panel (shared).
    • getFileExtensions

      public String[] getFileExtensions()
      Returns extension for editor document.
    • getFileDescription

      public String getFileDescription()
      Returns the description for the editor document for use in open/save panels.
    • getWindowTitle

      public String getWindowTitle()
      Returns the window title.
    • newDocument

      public RMEditorPane newDocument()
      Creates a new default editor pane.
    • open

      public RMEditorPane open()
      Creates a new editor window from an open panel.
    • open

      public RMEditorPane open(Object aSource)
      Creates a new editor window by opening the document from the given source.
    • saveAs

      public void saveAs()
      Saves the current editor document, running the save panel.
    • save

      public void save()
      Saves the current editor document, running the save panel if needed.
      Overrides:
      save in class RMViewerPane
    • saveImpl

      protected void saveImpl() throws Exception
      The real save method.
      Throws:
      Exception
    • revert

      public void revert()
      Reloads the current editor document from the last saved version.
    • windowResized

      protected void windowResized()
      Window resized notification - if resized within 10 pts of preferred size, snap to preferred size.
    • setWindowMaximizedBounds

      protected void setWindowMaximizedBounds()
      Returns the suggested maximized bounds for window.
    • close

      public boolean close()
      Closes this editor pane
    • closeInspectors

      protected void closeInspectors()
      Called to close inspectors when window is closed.
    • editorClosed

      protected void editorClosed()
      Called when editor is closed.
    • propertyChange

      public void propertyChange(PropertyChangeEvent anEvent)
      Property change listener to respond to editor chanes.
      Specified by:
      propertyChange in interface PropertyChangeListener
      Overrides:
      propertyChange in class RMViewerPane
    • deepChange

      public void deepChange(PropertyChangeListener aShape, PropertyChangeEvent anEvent)
      Catch Editor DeepChanges to register resetUI.
    • quit

      public void quit()
      Called when the app is about to exit to gracefully handle any open documents.
    • loadPopupMenu

      public void loadPopupMenu(JPopupMenu popupMenu)
      Returns a popup menu for the editor.
      Overrides:
      loadPopupMenu in class RMViewerPane