public abstract class FileScriptingPanel extends ScriptingPanel implements ScriptExecutionListener
| Modifier and Type | Class and Description |
|---|---|
protected class |
FileScriptingPanel.AboutAction
The About action.
|
class |
FileScriptingPanel.BasicAction
A slightly extended action class.
|
protected class |
FileScriptingPanel.ClearOutputAction
The Clear output action.
|
protected class |
FileScriptingPanel.CommandlineArgsAction
The Commandline args action.
|
protected class |
FileScriptingPanel.ExitAction
The Exit action.
|
protected class |
FileScriptingPanel.NewAction
The New action.
|
protected class |
FileScriptingPanel.OpenAction
The Open action.
|
protected class |
FileScriptingPanel.PrintAction
The Print action.
|
protected class |
FileScriptingPanel.RedoAction
The Redo action.
|
protected class |
FileScriptingPanel.SaveAction
The Save action.
|
protected class |
FileScriptingPanel.ScriptUndoableEditListener
This listener class listens for edits that can be undone.
|
protected class |
FileScriptingPanel.StartAction
The Start action.
|
protected class |
FileScriptingPanel.StopAction
The Stop action.
|
protected class |
FileScriptingPanel.UndoAction
The Undo action.
|
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
IMAGES_DIR
the directory with the scripting-specific images.
|
protected FileScriptingPanel.AboutAction |
m_AboutAction
the about action.
|
protected java.util.HashMap<java.lang.Object,javax.swing.Action> |
m_Actions
for storing the actions under their name.
|
protected java.lang.String[] |
m_Args
the commandline arguments to use.
|
protected FileScriptingPanel.CommandlineArgsAction |
m_ArgsAction
the arguments action.
|
protected FileScriptingPanel.ClearOutputAction |
m_ClearOutputAction
the clear output action.
|
protected javax.swing.Action |
m_CopyAction
the copy action.
|
protected javax.swing.Action |
m_CutAction
the cut action.
|
protected FileScriptingPanel.ExitAction |
m_ExitAction
the exit action.
|
protected javax.swing.JFileChooser |
m_FileChooser
for loading/saving file.
|
protected javax.swing.JLabel |
m_LabelInfo
for informing the user.
|
protected FileScriptingPanel.NewAction |
m_NewAction
the new action.
|
protected FileScriptingPanel.OpenAction |
m_OpenAction
the open action.
|
protected javax.swing.JTextArea |
m_OutputArea
the output area.
|
protected javax.swing.Action |
m_PasteAction
the paste action.
|
protected FileScriptingPanel.PrintAction |
m_PrintAction
the Print action.
|
protected FileScriptingPanel.RedoAction |
m_RedoAction
the redo action.
|
protected FileScriptingPanel.SaveAction |
m_SaveAction
the Save action.
|
protected FileScriptingPanel.SaveAction |
m_SaveAsAction
the Save as action.
|
protected Script |
m_Script
the script.
|
protected javax.swing.JTextArea |
m_ScriptArea
the script area.
|
protected FileScriptingPanel.StartAction |
m_StartAction
the start action.
|
protected FileScriptingPanel.StopAction |
m_StopAction
the stop action.
|
protected javax.swing.JTextPane |
m_TextCode
the text pane with the code.
|
protected javax.swing.JTextPane |
m_TextOutput
the text pane for the output.
|
protected javax.swing.undo.UndoManager |
m_Undo
the undo manager.
|
protected FileScriptingPanel.UndoAction |
m_UndoAction
the undo action.
|
m_Debug, m_ErrRedirector, m_OutRedirector, m_POE, m_POO, m_TitleUpdatedListenerslistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
FileScriptingPanel() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkModified()
Checks whether the script is modified and asks the user to save it or not.
|
protected java.util.HashMap<java.lang.Object,javax.swing.Action> |
createActionTable(javax.swing.text.JTextComponent comp)
The following two methods allow us to find an
action provided by the editor kit by its name.
|
protected abstract javax.swing.JPanel |
getAboutPanel()
Returns a panel to be displayed with the AboutAction.
|
javax.swing.JMenuBar |
getMenuBar()
Returns the menu bar to to be displayed in the frame.
|
javax.swing.JTextPane |
getOutput()
Returns the text area that is used for displaying output on stdout
and stderr.
|
abstract java.lang.String |
getPlainTitle()
Returns the title (without the filename).
|
java.lang.String |
getTitle()
Returns the current title for the frame/dialog.
|
protected void |
initFinish()
Finishes up after initializing members and setting up the GUI.
|
protected void |
initGUI()
Sets up the GUI after initializing the members.
|
protected void |
initialize()
For initializing member variables.
|
protected abstract javax.swing.JTextPane |
newCodePane()
Creates a new JTextPane for the code.
|
protected abstract Script |
newScript(javax.swing.text.Document doc)
Returns an initialized script object.
|
void |
open(java.io.File file)
Opens the specified file.
|
void |
scriptFinished(ScriptExecutionEvent e)
Gets sent when a script finishes execution.
|
protected void |
showInfo(java.lang.String msg)
Updates the info shown in the bottom panel.
|
protected javax.swing.Action |
updateAction(javax.swing.Action action,
java.lang.String name,
java.lang.String icon,
java.lang.String accel,
java.lang.Character mnemonic)
Updates the action and returns it.
|
addTitleUpdatedListener, getDebug, getIcon, notifyTitleUpdatedListeners, removeTitleUpdatedListener, setDebug, showPanel, showPanel, titleUpdatedgetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final java.lang.String IMAGES_DIR
protected javax.swing.JFileChooser m_FileChooser
protected Script m_Script
protected javax.swing.JTextArea m_ScriptArea
protected javax.swing.JTextArea m_OutputArea
protected javax.swing.JLabel m_LabelInfo
protected java.util.HashMap<java.lang.Object,javax.swing.Action> m_Actions
protected FileScriptingPanel.NewAction m_NewAction
protected FileScriptingPanel.OpenAction m_OpenAction
protected FileScriptingPanel.SaveAction m_SaveAction
protected FileScriptingPanel.SaveAction m_SaveAsAction
protected FileScriptingPanel.PrintAction m_PrintAction
protected FileScriptingPanel.ClearOutputAction m_ClearOutputAction
protected FileScriptingPanel.ExitAction m_ExitAction
protected FileScriptingPanel.UndoAction m_UndoAction
protected FileScriptingPanel.RedoAction m_RedoAction
protected javax.swing.Action m_CutAction
protected javax.swing.Action m_CopyAction
protected javax.swing.Action m_PasteAction
protected FileScriptingPanel.StartAction m_StartAction
protected FileScriptingPanel.StopAction m_StopAction
protected FileScriptingPanel.CommandlineArgsAction m_ArgsAction
protected FileScriptingPanel.AboutAction m_AboutAction
protected javax.swing.undo.UndoManager m_Undo
protected javax.swing.JTextPane m_TextCode
protected javax.swing.JTextPane m_TextOutput
protected java.lang.String[] m_Args
protected void initialize()
initialize in class ScriptingPanelprotected void initGUI()
initGUI in class ScriptingPanelScriptingPanel.initialize(),
ScriptingPanel.getOutput()protected void initFinish()
initFinish in class ScriptingPanelScriptingPanel.initialize(),
ScriptingPanel.initGUI(),
ScriptingPanel.getOutput()protected javax.swing.Action updateAction(javax.swing.Action action,
java.lang.String name,
java.lang.String icon,
java.lang.String accel,
java.lang.Character mnemonic)
action - the action to updatename - the name to be used as display, can be nullicon - the icon to use (if located in weka/gui/images, not path required), can be nullaccel - the accelerator command to use (e.g., "ctrl N"), can be nullmnemonic - the mnemonic character to use, can be nullprotected abstract javax.swing.JTextPane newCodePane()
protected abstract Script newScript(javax.swing.text.Document doc)
doc - the document to use as basispublic void scriptFinished(ScriptExecutionEvent e)
scriptFinished in interface ScriptExecutionListenere - the eventprotected java.util.HashMap<java.lang.Object,javax.swing.Action> createActionTable(javax.swing.text.JTextComponent comp)
comp - the component to get the actions fromprotected abstract javax.swing.JPanel getAboutPanel()
public abstract java.lang.String getPlainTitle()
public java.lang.String getTitle()
getTitle in class ScriptingPanelpublic javax.swing.JTextPane getOutput()
getOutput in class ScriptingPanelpublic javax.swing.JMenuBar getMenuBar()
getMenuBar in class ScriptingPanelprotected void showInfo(java.lang.String msg)
msg - the message to displaypublic void open(java.io.File file)
file - the file to openprotected boolean checkModified()