@PerspectiveInfo(ID="simplecli", title="Simple CLI", toolTipText="Simple CLI for Weka", iconPath="weka/gui/weka_icon_new_small.png") public class SimpleCLIPanel extends ScriptingPanel implements java.awt.event.ActionListener, Perspective
| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleCLIPanel.CommandlineCompletion
A class for commandline completion of classnames.
|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
SimpleCLIPanel() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsInstances()
Returns true if this perspective can do something meaningful with a set of
instances
|
void |
actionPerformed(java.awt.event.ActionEvent e)
Only gets called when return is pressed in the input area, which starts the
command running.
|
void |
doCommandlineCompletion(java.awt.event.KeyEvent e)
performs commandline completion on packages and classnames.
|
void |
doHistory(java.awt.event.KeyEvent e)
Changes the currently displayed command line when certain keys are pressed.
|
Defaults |
getDefaultSettings()
Get the default settings for this perspective (or null if there are none)
|
javax.swing.ImageIcon |
getIcon()
Returns an icon to be used in a frame.
|
GUIApplication |
getMainApplication()
Get the main application that this perspective belongs to
|
javax.swing.JMenuBar |
getMenuBar()
Not supported.
|
java.util.List<javax.swing.JMenu> |
getMenus()
Get an ordered list of menus to appear in the main menu bar.
|
javax.swing.JTextPane |
getOutput()
Returns the text area that is used for displaying output on stdout and
stderr.
|
javax.swing.Icon |
getPerspectiveIcon()
Get the icon for this perspective
|
java.lang.String |
getPerspectiveID()
Get the ID of this perspective
|
java.lang.String |
getPerspectiveTipText()
Get the tool tip text for this perspective
|
java.lang.String |
getPerspectiveTitle()
Get the title of this perspective
|
java.lang.String |
getTitle()
Returns the current title for the frame/dialog.
|
void |
instantiationComplete()
Gets called when startup of the application has completed.
|
static void |
main(java.lang.String[] args)
Displays the panel in a frame.
|
boolean |
okToBeActive()
Returns true if this perspective is OK with being an active perspective -
i.e.
|
boolean |
requiresLog()
Whether this perspective requires a graphical log to write to
|
void |
runCommand(java.lang.String commands)
Executes a simple cli command.
|
void |
setActive(boolean active)
Set active status of this perspective.
|
void |
setInstances(Instances instances)
Set instances (if this perspective can use them)
|
void |
setLoaded(boolean loaded)
Set whether this perspective is "loaded" - i.e.
|
void |
setLog(Logger log)
Set a log to use (if required by the perspective)
|
void |
setMainApplication(GUIApplication main)
Set the main application.
|
void |
settingsChanged()
Called when the user alters settings.
|
addTitleUpdatedListener, getDebug, removeTitleUpdatedListener, setDebug, showPanel, showPanel, titleUpdatedgetAccessibleContext, getUI, getUIClassID, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validateaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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 void instantiationComplete()
PerspectiveinstantiationComplete in interface Perspectivepublic boolean okToBeActive()
PerspectiveokToBeActive in interface Perspectivepublic void setActive(boolean active)
PerspectivesetActive in interface Perspectiveactive - true if this perspective is the active onepublic void setLoaded(boolean loaded)
PerspectivesetLoaded in interface Perspectiveloaded - true if the perspective is available in the perspective
toolbar of the KnowledgeFlowpublic void setMainApplication(GUIApplication main)
PerspectivesetMainApplication in interface Perspectivemain - the main applicationpublic GUIApplication getMainApplication()
PerspectivegetMainApplication in interface Perspectivepublic java.lang.String getPerspectiveID()
PerspectivegetPerspectiveID in interface Perspectivepublic java.lang.String getPerspectiveTitle()
PerspectivegetPerspectiveTitle in interface Perspectivepublic javax.swing.Icon getPerspectiveIcon()
PerspectivegetPerspectiveIcon in interface Perspectivepublic java.lang.String getPerspectiveTipText()
PerspectivegetPerspectiveTipText in interface Perspectivepublic java.util.List<javax.swing.JMenu> getMenus()
PerspectivegetMenus in interface Perspectivepublic Defaults getDefaultSettings()
PerspectivegetDefaultSettings in interface Perspectivepublic void settingsChanged()
PerspectivesettingsChanged in interface Perspectivepublic boolean acceptsInstances()
PerspectiveacceptsInstances in interface Perspectivepublic void setInstances(Instances instances)
PerspectivesetInstances in interface Perspectiveinstances - the instancespublic boolean requiresLog()
PerspectiverequiresLog in interface Perspectivepublic void setLog(Logger log)
PerspectivesetLog in interface Perspectivelog - the graphical log to usepublic javax.swing.ImageIcon getIcon()
getIcon in class ScriptingPanelpublic java.lang.String getTitle()
getTitle in class ScriptingPanelpublic javax.swing.JTextPane getOutput()
getOutput in class ScriptingPanelpublic javax.swing.JMenuBar getMenuBar()
getMenuBar in class ScriptingPanelpublic void runCommand(java.lang.String commands)
throws java.lang.Exception
commands - the command stringjava.lang.Exception - if an error occurspublic void doHistory(java.awt.event.KeyEvent e)
e - a value of type 'KeyEvent'public void doCommandlineCompletion(java.awt.event.KeyEvent e)
e - a value of type 'KeyEvent'public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenere - a value of type 'ActionEvent'public static void main(java.lang.String[] args)
args - ignored