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.AccessibleJComponentNested 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_WINDOWFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnectSteps(StepManagerImpl source, StepManagerImpl target, String connectionType) Connect the supplied source step to the supplied target step using the specified connection typeenvironmentSubstitute(String source) voidexecuteFlow(boolean sequential) Execute the flow managed by this layoutbooleanGet 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 theFlowExecutorbeing used for execution of this flowweka.gui.knowledgeflow.VisibleLayout.KFLogPanelGet the log panel in use by this layoutintGet the current zoom setting for this layoutbooleanReturns true if the flow managed by this layout is currently executingstatic StringserializeStepsToJSON(List<StepVisual> steps, 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 flowvoidSet the environment variables to use with this layoutvoidsetFilePath(File path) Set the file path for the flow being edited by this layoutvoidSet 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 executingMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUIMethods 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, updateMethods 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, validateMethods 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- theStepManagerinstance managing the source steptarget- theStepManagerinstance 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 theFlowExecutorbeing used for execution of this flow- Returns:
- the
FlowExecutorin use by this layout
-
setFlowExecutor
Set theFlowExcecutorto use for executing the flow- Parameters:
executor- theFlowExecutorto 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
-