Package weka.gui.knowledgeflow
Class VisibleLayout
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- weka.gui.knowledgeflow.VisibleLayout
-
- All Implemented Interfaces:
java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,javax.accessibility.Accessible
public class VisibleLayout extends javax.swing.JPanelPanel that wraps a flow and makes it visible in the KnowledgeFlow, along with it's associated log panel- Version:
- $Revision: $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description VisibleLayout(MainKFPerspective mainPerspective)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnectSteps(StepManagerImpl source, StepManagerImpl target, java.lang.String connectionType)Connect the supplied source step to the supplied target step using the specified connection typejava.lang.StringenvironmentSubstitute(java.lang.String source)voidexecuteFlow(boolean sequential)Execute the flow managed by this layoutbooleangetEdited()Get whether this flow has been altered since the last save operationEnvironmentgetEnvironment()Get the environment variables being used by this layoutjava.io.FilegetFilePath()Get the current path (if any) of the flow being edited in this layoutFlowgetFlow()Get the flow being edited by this layoutFlowExecutorgetFlowExecutor()Get theFlowExecutorbeing used for execution of this flowweka.gui.knowledgeflow.VisibleLayout.KFLogPanelgetLogPanel()Get the log panel in use by this layoutintgetZoomSetting()Get the current zoom setting for this layoutbooleanisExecuting()Returns true if the flow managed by this layout is currently executingstatic java.lang.StringserializeStepsToJSON(java.util.List<StepVisual> steps, java.lang.String name)Utility method to serialize a list of steps (encapsulated in StepVisuals) to a JSON flow.voidsetEdited(boolean edited)Set the edited status of this flowvoidsetEnvironment(Environment env)Set the environment variables to use with this layoutvoidsetFilePath(java.io.File path)Set the file path for the flow being edited by this layoutvoidsetFlow(Flow flow)Set the flow to edit in this layoutvoidsetFlowExecutor(FlowExecutor executor)Set theFlowExcecutorto use for executing the flowvoidsetZoomSetting(int zoom)Set the current zoom setting for this layoutvoidstopFlow()Stop the flow from executing-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, update
-
Methods inherited from class java.awt.Container
add, 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, validate
-
Methods inherited from class java.awt.Component
action, 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, 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, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Constructor Detail
-
VisibleLayout
public VisibleLayout(MainKFPerspective mainPerspective)
Constructor- Parameters:
mainPerspective- the main Knowledge Flow perspective
-
-
Method Detail
-
getFlow
public Flow getFlow()
Get the flow being edited by this layout- Returns:
- the flow being edited by this layout
-
setFlow
public void setFlow(Flow flow)
Set the flow to edit in this layout- Parameters:
flow- the flow to edit in this layout
-
connectSteps
public void connectSteps(StepManagerImpl source, StepManagerImpl target, java.lang.String connectionType)
Connect the supplied source step to the supplied target step using the specified connection type- Parameters:
source- theStepManagerinstance managing the source steptarget- theStepManagerinstance managing the target stepconnectionType- the connection type to use
-
getEnvironment
public Environment getEnvironment()
Get the environment variables being used by this layout- Returns:
- the environment variables being used by this layout
-
setEnvironment
public void setEnvironment(Environment env)
Set the environment variables to use with this layout- Parameters:
env- the environment variables to use
-
environmentSubstitute
public java.lang.String environmentSubstitute(java.lang.String source)
-
getFlowExecutor
public FlowExecutor getFlowExecutor()
Get theFlowExecutorbeing used for execution of this flow- Returns:
- the
FlowExecutorin use by this layout
-
setFlowExecutor
public void setFlowExecutor(FlowExecutor executor)
Set theFlowExcecutorto use for executing the flow- Parameters:
executor- theFlowExecutorto use for executing the flow in this layout
-
getFilePath
public java.io.File getFilePath()
Get the current path (if any) of the flow being edited in this layout- Returns:
- the current path on disk of the flow
-
setFilePath
public void setFilePath(java.io.File path)
Set the file path for the flow being edited by this layout- Parameters:
path- the path on disk for the flow being edited
-
getLogPanel
public weka.gui.knowledgeflow.VisibleLayout.KFLogPanel getLogPanel()
Get the log panel in use by this layout- Returns:
- the log panel
-
getZoomSetting
public int getZoomSetting()
Get the current zoom setting for this layout- Returns:
- the current zoom setting
-
setZoomSetting
public void setZoomSetting(int zoom)
Set the current zoom setting for this layout- Parameters:
zoom- the current zoom setting
-
getEdited
public boolean getEdited()
Get whether this flow has been altered since the last save operation- Returns:
- true if the flow has been altered
-
setEdited
public void setEdited(boolean edited)
Set the edited status of this flow- Parameters:
edited- true if the flow has been altered
-
isExecuting
public boolean isExecuting()
Returns true if the flow managed by this layout is currently executing- Returns:
- true if the flow is executing
-
executeFlow
public void executeFlow(boolean sequential) throws WekaExceptionExecute the flow managed by this layout- Parameters:
sequential- true if the flow's start points are to be launched sequentially rather than in parallel- Throws:
WekaException- if a problem occurs
-
stopFlow
public void stopFlow()
Stop the flow from executing
-
serializeStepsToJSON
public static java.lang.String serializeStepsToJSON(java.util.List<StepVisual> steps, java.lang.String name) throws WekaException
Utility method to serialize a list of steps (encapsulated in StepVisuals) to a JSON flow.- Parameters:
steps- the steps to serializename- the name to set in the encapsulating Flow before serializing- Returns:
- the serialized Flow
- Throws:
WekaException- if a problem occurs
-
-