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:
ImageObserver
,MenuContainer
,Serializable
,Accessible
Panel 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:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
-
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
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
connectSteps
(StepManagerImpl source, StepManagerImpl target, String connectionType) Connect the supplied source step to the supplied target step using the specified connection typeenvironmentSubstitute
(String source) void
executeFlow
(boolean sequential) Execute the flow managed by this layoutboolean
Get whether this flow has been altered since the last save operationGet the environment variables being used by this layoutGet the current path (if any) of the flow being edited in this layoutgetFlow()
Get the flow being edited by this layoutGet theFlowExecutor
being used for execution of this flowweka.gui.knowledgeflow.VisibleLayout.KFLogPanel
Get the log panel in use by this layoutint
Get the current zoom setting for this layoutboolean
Returns true if the flow managed by this layout is currently executingstatic String
serializeStepsToJSON
(List<StepVisual> steps, String name) Utility method to serialize a list of steps (encapsulated in StepVisuals) to a JSON flow.void
setEdited
(boolean edited) Set the edited status of this flowvoid
Set the environment variables to use with this layoutvoid
setFilePath
(File path) Set the file path for the flow being edited by this layoutvoid
Set the flow to edit in this layoutvoid
setFlowExecutor
(FlowExecutor executor) Set theFlowExcecutor
to use for executing the flowvoid
setZoomSetting
(int zoom) Set the current zoom setting for this layoutvoid
stopFlow()
Stop the flow from executingMethods 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 Details
-
VisibleLayout
Constructor- Parameters:
mainPerspective
- the main Knowledge Flow perspective
-
-
Method Details
-
getFlow
Get the flow being edited by this layout- Returns:
- the flow being edited by this layout
-
setFlow
Set the flow to edit in this layout- Parameters:
flow
- the flow to edit in this layout
-
connectSteps
Connect the supplied source step to the supplied target step using the specified connection type- Parameters:
source
- theStepManager
instance managing the source steptarget
- theStepManager
instance managing the target stepconnectionType
- the connection type to use
-
getEnvironment
Get the environment variables being used by this layout- Returns:
- the environment variables being used by this layout
-
setEnvironment
Set the environment variables to use with this layout- Parameters:
env
- the environment variables to use
-
environmentSubstitute
-
getFlowExecutor
Get theFlowExecutor
being used for execution of this flow- Returns:
- the
FlowExecutor
in use by this layout
-
setFlowExecutor
Set theFlowExcecutor
to use for executing the flow- Parameters:
executor
- theFlowExecutor
to use for executing the flow in this layout
-
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
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
Execute 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
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
-