Package hec.script
Class AbstractScriptEditor
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
rma.swing.RmaJFrame
hec.script.AbstractScriptEditor
- All Implemented Interfaces:
ConfigChangeListener
,ScriptConstants
,ClipboardOwner
,ComponentListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,RootPaneContainer
,WindowConstants
,Modifiable
public abstract class AbstractScriptEditor
extends RmaJFrame
implements ScriptConstants, ConfigChangeListener, ClipboardOwner
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Title: General CWMS Projectclass
inner class for folder nodesclass
TextArea class that will set it's background to light gray when disabled.class
inner class for the Tree Modelclass
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.Type
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RmaJTextField
protected RmaJColorButton
protected JButton
protected JPanel
protected JMenuItem
protected JMenuItem
protected JMenuItem
protected RmaJTextArea
protected RmaJCheckBox
protected RmaJCheckBox
protected RmaJCheckBox
protected JButton
protected JButton
protected boolean
protected JMenuItem
protected boolean
protected JMenu
protected RmaJTextField
protected FindDialog
protected JMenuItem
protected JMenuItem
protected JPopupMenu
protected RmaJComboBox
protected JLabel
protected JSplitPane
protected RmaJComboBox
protected static Vector
protected JMenuItem
protected RmaJTextField
protected RmaJTextField
protected EventListenerList
protected LineNumberPanel
protected RmaJTextField
protected String
protected RmaJTextField
protected JPanel
protected JMenuItem
protected JPopupMenu
protected ButtonCmdPanel
protected boolean
protected JMenuItem
protected RmaJTextField
protected boolean
protected JMenuItem
protected JButton
protected JMenuItem
protected boolean
protected RmaJTextField
protected AbstractScriptEditor.ScriptTextArea
protected int
protected RmaJTextField
protected JButton
protected JMenuItem
protected ButtonCmdPanel
protected TreeSelectionListener
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected JTree
Fields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface hec.script.ScriptConstants
ALL_MODULES, ALL_WORKSPACES, BASE, CACHE_DIR_PROP, CLIENT_MODULE, CURRENT_MODULES, CURRENT_WORKSPACE, DSS_IMPORT, JAVA_IMPORT, ROOT, SCRIPT_ZIPFILE, SCRIPTS_CONF, SCRIPTS_DIR, STD_IMPORT, SYSTEM, USER
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addScriptableObjects
(AbstractScriptEditor.FolderNode parentNode, ScriptableObject so) recusively add scriptable objectsvoid
addScriptEventListener
(ScriptEventListener listener) protected void
buildDialog
(Frame parent) protected void
build the menus for this dialogprotected Script
buildScript
(int[] headLines) void
clear out the right panelsprotected void
called when the window closes.void
a config file changed.protected boolean
protected Vector
protected JTree
protected void
protected void
deleteScript
(boolean confirm) protected void
displayFolderPopup
(MouseEvent e, String name) display the popup for a folderprotected void
displayNodePopup
(MouseEvent e, String name) display the popup menu for script nodesprotected void
editScript
(TreePath path) edit the currently highlighted scriptprotected void
expandTree
(boolean expand) protected abstract void
protected void
void
finalize()
protected void
protected void
protected void
protected void
fireScriptEvent
(ScriptIdentifier sid, int eventType) void
protected abstract String
getFileName
(String name) protected TreeNode
protected String
return the path to the last folder in the selected pathprotected String
getModulePath
(TreePath tpath) return the path to the last folder in the TreePath pathprotected String
getScriptId
(TreePath tpath) return the Id that can be used to identify the object that the script belongs toprotected void
getScriptIds
(String pathStr, DefaultMutableTreeNode folderNode) protected void
getScriptIds
(TreePath path) protected abstract ScriptManager
protected ScriptIdentifierData
protected ScriptIdentifier
returns the selected ScriptIdentifierprotected ScriptIdentifier
return the ScriptIdentifier to the last folder in the TreePath pathprotected static Color
abstract void
import a scriptprotected boolean
isScriptableNode
(String nodeName) protected boolean
protected void
launchExternalEditor
(TreePath path) protected void
loadScript
(TreePath path) protected abstract boolean
lockScriptFile
(boolean lock, String path) void
lostOwnership
(Clipboard clipboard, Transferable contents) protected void
protected boolean
clear form for new scriptprotected void
void
protected void
void
void
removeScriptEventListener
(ScriptEventListener listener) protected void
removeScriptsFromGroup
(ScriptGroup group2Delete) remove the group setting from all the scriptsboolean
protected abstract void
saveBackgroundColor
(String color) protected abstract void
protected abstract void
saveForegroundColor
(String color) protected void
protected void
protected abstract void
protected abstract void
saveTabSize
(int tabsize) protected void
protected void
protected void
protected abstract void
selectScript
(TreePath path) allow the user to select a scriptprotected void
setEditPanelEnabled
(boolean b) protected boolean
setEditScript
(boolean edit) protected void
setMenusState
(boolean isFolder) void
setModified
(boolean modified) void
set the tree to display the ScriptIdentifier nodevoid
setSelectedNode
(String nodeName, String underNodeName) set the tree to display the String nodeprotected void
void
setVisible
(boolean b) protected void
void
protected void
treePathSelected
(TreePath path, TreePath oldPath, boolean enable) protected void
Methods inherited from class rma.swing.RmaJFrame
clearForm, clickButton, clickButton, clickCheckBox, clickRadioButton, componentHidden, componentMoved, componentResized, componentShown, createRootPane, enterKeyPressed, escapeKeyPressed, getDefaultIconImage, getOpenWindows, getTimeZone, getTopWindow, getUnitDisplaySystem, getUnitSystem, getWindow, invokeFormManagementMethod, isEditable, isIgnoringModifiedEvents, isModified, isSystemClosable, registerEnterKey, registerEscapeKey, setComponentsEditable, setComponentsEditable, setDefaultIconImage, setDefaultSize, setDisplayScale, setEditable, setIgnoreModifiedEvents, setLocation, setSystemClosable, setTimeZone, setUnitSystem, stayOpen, updateDisplayScale, updateTimeZone, updateTimeZone, updateUnitSystem, validateComponents, validateComponents
Methods inherited from class javax.swing.JFrame
addImpl, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
_iconList
-
NO_ICON
- See Also:
-
FONT_PROP
- See Also:
-
BACKGROUND_PROP
- See Also:
-
FOREGROUND_PROP
- See Also:
-
SIZE_PROP
- See Also:
-
LOCATION_PROP
- See Also:
-
TABSIZE_PROP
- See Also:
-
_lnPanel
-
tree
-
_scriptNameText
-
_fileNameText
-
_argumentText
-
_descriptionText
-
_scriptText
-
_hSplitter
-
_displayScript
-
_displayScriptInMenu
-
_displayScriptInSelector
-
_labelDisplayText
-
_browseButton
-
_nodePopup
-
_folderPopup
-
_fileMenu
-
_newMenuItem
-
_editMenuItem
-
_importMenuItem
-
_saveMenuItem
-
_saveAsMenuItem
-
_deleteMenuItem
-
_testMenuItem
-
_cutScriptMenuItem
-
_copyScriptMenuItem
-
_pasteScriptMenuItem
-
_findMenuItem
-
_findNextMenuItem
-
_treeSelectListener
-
_statusLine
-
_modifiedField
-
_lockedField
-
_insertField
-
_positionField
-
_iconCombo
-
_buttonPanel
-
_testPanel
-
_okPanel
-
_editButton
-
_editExternalButton
-
_saveButton
-
_testButton
-
_findDlg
-
_editingExistingScript
protected boolean _editingExistingScript -
_editScript
protected boolean _editScript -
_resetingPath
protected boolean _resetingPath -
_lockedPath
-
_scriptModified
protected boolean _scriptModified -
_splitterLocation
protected int _splitterLocation -
_overrodeScriptFile
protected boolean _overrodeScriptFile -
_listenerList
-
_namePanel
-
_bgColorBtn
-
_groupCombo
-
_groupLabel
-
-
Constructor Details
-
AbstractScriptEditor
constructor
-
-
Method Details
-
createJTree
-
buildDialog
-
redrawLineNumbers
protected void redrawLineNumbers() -
getSelectionMarginColor
-
flushScriptManager
public void flushScriptManager() -
buildMenus
protected void buildMenus()build the menus for this dialog -
removeScriptsFromGroup
remove the group setting from all the scripts- Parameters:
group2Delete
-
-
showWhiteSpaceAction
protected void showWhiteSpaceAction() -
editScript
edit the currently highlighted script -
launchExternalEditor
-
launchAndWait
-
newScript
protected boolean newScript()clear form for new script -
getLastFolderNode
-
getSelectedScriptIdentifier
returns the selected ScriptIdentifier- Returns:
- the selected ScriptIdentifier
-
getSelectedScriptIdentifier
return the ScriptIdentifier to the last folder in the TreePath path -
getModulePath
return the path to the last folder in the selected path -
getModulePath
return the path to the last folder in the TreePath path -
getScriptId
return the Id that can be used to identify the object that the script belongs to -
saveScript
protected void saveScript() -
saveScriptAs
protected void saveScriptAs() -
buildScript
-
deleteScript
protected void deleteScript(boolean confirm) -
closeFrame
protected void closeFrame()called when the window closes. -
fillFolderNodes
protected abstract void fillFolderNodes() -
addScriptableObjects
protected void addScriptableObjects(AbstractScriptEditor.FolderNode parentNode, ScriptableObject so) recusively add scriptable objects -
updateFileName
protected void updateFileName() -
getFileName
-
clearForm
public void clearForm()clear out the right panels -
getScriptIds
-
getScriptIds
-
fillGroupCombo
protected void fillGroupCombo() -
loadScript
-
setSelectedNode
set the tree to display the String node -
setSelectedNode
set the tree to display the ScriptIdentifier node -
setVisible
public void setVisible(boolean b) - Overrides:
setVisible
in classRmaJFrame
-
finalize
-
getScriptManager
-
isScriptableNode
-
setEditPanelEnabled
protected void setEditPanelEnabled(boolean b) -
treePathSelected
-
setEditScript
protected boolean setEditScript(boolean edit) -
lockScriptFile
-
expandTree
protected void expandTree(boolean expand) -
configFileChanged
a config file changed.- Specified by:
configFileChanged
in interfaceConfigChangeListener
-
refreshTree
public void refreshTree() -
cutTreeNode
protected void cutTreeNode() -
copyTreeNode
protected boolean copyTreeNode() -
pasteTreeNode
protected void pasteTreeNode() -
msgOut
-
getScriptToPaste
-
displayFolderPopup
display the popup for a folder -
displayNodePopup
display the popup menu for script nodes -
importScript
public abstract void importScript()import a script -
setMenusState
protected void setMenusState(boolean isFolder) -
selectScript
allow the user to select a script -
selectForeground
protected void selectForeground() -
selectBackground
protected void selectBackground() -
selectFont
protected void selectFont() -
setTabSize
protected void setTabSize() -
saveForegroundColor
-
saveBackgroundColor
-
saveFont
-
saveTabSize
protected abstract void saveTabSize(int tabsize) -
saveSizeAndLocation
protected abstract void saveSizeAndLocation() -
printScript
public void printScript() -
testScript
public void testScript() -
runScript
-
setModified
public void setModified(boolean modified) - Specified by:
setModified
in interfaceModifiable
- Overrides:
setModified
in classRmaJFrame
-
createImageList
-
fireScriptAdded
-
fireScriptDeleted
-
fireScriptChanged
-
fireScriptEvent
-
addScriptEventListener
-
removeScriptEventListener
-
lostOwnership
- Specified by:
lostOwnership
in interfaceClipboardOwner
-