Class RMEditorPane
java.lang.Object
com.inductiveautomation.snap.ui.UIOwner<SwingEvent,JComponent>
com.inductiveautomation.snap.swing.SwingOwner
com.inductiveautomation.rm.viewer.RMViewerPane
com.inductiveautomation.rm.editor.RMEditorPane
- All Implemented Interfaces:
PropertyChangeListener
,EventListener
This class is a container for an RMEditor in an enclosing scroll pane with tool bars for editing.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.rm.viewer.RMViewerPane
RMViewerPane.DynamicPopupMenu
-
Field Summary
Fields inherited from class com.inductiveautomation.rm.viewer.RMViewerPane
propertyChangeSupport
Fields inherited from class com.inductiveautomation.snap.ui.UIOwner
DragDrop, DragEnter, DragEvents, DragExit, DragOver, KeyEvents, KeyFinished, KeyPressed, KeyReleased, KeyTyped, MouseClicked, MouseDragged, MouseEntered, MouseEvents, MouseExited, MouseFinished, MouseMoved, MousePressed, MouseReleased
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
close()
Closes this editor paneprotected void
Called to close inspectors when window is closed.Creates the RMEditorPaneMenuBar for the menu bar.Creates the top tool bar.protected RMViewer
Overridden to return an RMEditor.protected Window
Creates the window.void
deepChange
(PropertyChangeListener aShape, PropertyChangeEvent anEvent) Catch Editor DeepChanges to register resetUI.protected void
Called when editor is closed.Returns the editor attributes panel (shared).Returns the datasource associated with the editor's document.Returns the viewer as an editor.Returns the description for the editor document for use in open/save panels.String[]
Returns extension for editor document.static Image
Returns the icon for the editor window frame.Returns the editor inspector (shared).static RMEditorPane
Returns the editor pane that is the most recently activated.Returns the SwingOwner for the menu bar.boolean
Returns whether editor pane shows rulers.Override to return as RMEditorPaneToolBar.Returns the window title.protected void
initUI()
Override to configure Window.boolean
Returns whether editor is really doing editing.void
loadPopupMenu
(JPopupMenu popupMenu) Returns a popup menu for the editor.Creates a new default editor pane.open()
Creates a new editor window from an open panel.Creates a new editor window by opening the document from the given source.void
propertyChange
(PropertyChangeEvent anEvent) Property change listener to respond to editor chanes.void
quit()
Called when the app is about to exit to gracefully handle any open documents.protected void
resetUI()
Updates the editor's UI panels.protected void
respondUI
(SwingEvent anEvent) Handles changes to the editor's UI controls.void
revert()
Reloads the current editor document from the last saved version.void
save()
Saves the current editor document, running the save panel if needed.void
saveAs()
Saves the current editor document, running the save panel.protected void
saveImpl()
The real save method.void
setDataSource
(RMDataSource aDataSource) Sets the datasource for the panel.void
setDataSource
(WebURL aurl, Point2D aPoint) Sets a datasource from a given URL at a given point (if dragged in).void
setEditing
(boolean aFlag) Sets whether editor is really doing editing.void
setShowRulers
(boolean aValue) Sets whether editor pane shows rulers.protected void
Returns the suggested maximized bounds for window.protected void
Window resized notification - if resized within 10 pts of preferred size, snap to preferred size.Methods inherited from class com.inductiveautomation.rm.viewer.RMViewerPane
addPropertyChangeListener, copy, createBottomToolBar, createUI, getBottomToolBar, getContent, getDocument, getScrollPane, getSourceURL, getViewer, getViewerShape, previewPDF, print, removePropertyChangeListener, setViewer
Methods inherited from class com.inductiveautomation.snap.swing.SwingOwner
addKeyActionEvent, createTimer, createUI, createWindow, getNode, getNode, getNodeHelper, getTimer, getTimer, getUI, getWindow, isEventThread, isWindowVisible, requestFocus, requestFocusImpl, runLater, sendEvent, setWindowVisible
Methods inherited from class com.inductiveautomation.snap.ui.UIOwner
addNodeBinding, disableEvents, enableEvents, getBindingModelValue, getBindingNodeValue, getConversionMap, getConversionMapKey, getConversionMaps, getConversionMapValue, getFirstFocus, getModelValue, getNode, getNodeAction, getNodeBoolValue, getNodeFloatValue, getNodeIntValue, getNodeItemDisplayKey, getNodeItems, getNodeSelectedIndex, getNodeSelectedItem, getNodeStringValue, getNodeText, getNodeValue, getUI, getUIHpr, initUI, isNodeEnabled, isNodeValueAdjusting, isSendEventDisabled, isUISet, processResetUI, processRespondUI, resetLater, resetNodeBindings, runLaterDelayed, runLaterOnce, sendEvent, sendNodeAction, setBindingModelValue, setBindingNodeValue, setFirstFocus, setModelValue, setNodeAction, setNodeEnabled, setNodeItemDisplayKey, setNodeItems, setNodeItems, setNodeSelectedIndex, setNodeSelectedItem, setNodeText, setNodeValue, setSendEventDisabled
-
Constructor Details
-
RMEditorPane
public RMEditorPane()
-
-
Method Details
-
getMainEditorPane
Returns the editor pane that is the most recently activated. -
getFrameIcon
Returns the icon for the editor window frame. -
getEditor
Returns the viewer as an editor. -
createViewer
Overridden to return an RMEditor.- Overrides:
createViewer
in classRMViewerPane
-
getTopToolBar
Override to return as RMEditorPaneToolBar.- Overrides:
getTopToolBar
in classRMViewerPane
-
createTopToolBar
Creates the top tool bar.- Overrides:
createTopToolBar
in classRMViewerPane
-
getMenuBar
Returns the SwingOwner for the menu bar. -
createMenuBar
Creates the RMEditorPaneMenuBar for the menu bar. -
getDataSource
Returns the datasource associated with the editor's document. -
setDataSource
Sets the datasource for the panel. -
setDataSource
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 classUIOwner<SwingEvent,
JComponent>
-
resetUI
protected void resetUI()Updates the editor's UI panels.- Overrides:
resetUI
in classRMViewerPane
-
respondUI
Handles changes to the editor's UI controls.- Overrides:
respondUI
in classRMViewerPane
-
createWindowX
Creates the window. -
getInspectorPanel
Returns the editor inspector (shared). -
getAttributesPanel
Returns the editor attributes panel (shared). -
getFileExtensions
Returns extension for editor document. -
getFileDescription
Returns the description for the editor document for use in open/save panels. -
getWindowTitle
Returns the window title. -
newDocument
Creates a new default editor pane. -
open
Creates a new editor window from an open panel. -
open
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 classRMViewerPane
-
saveImpl
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
Property change listener to respond to editor chanes.- Specified by:
propertyChange
in interfacePropertyChangeListener
- Overrides:
propertyChange
in classRMViewerPane
-
deepChange
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
Returns a popup menu for the editor.- Overrides:
loadPopupMenu
in classRMViewerPane
-