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`

public class VisibleLayout extends JPanel
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:
  - Serialized Form

- ## 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

  Constructors
  Constructor
  Description
  `VisibleLayout(MainKFPerspective mainPerspective)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `connectSteps(StepManagerImpl source, StepManagerImpl target, String connectionType)`
  Connect the supplied source step to the supplied target step using the specified connection type
  `String`
  `environmentSubstitute(String source)`
  `void`
  `executeFlow(boolean sequential)`
  Execute the flow managed by this layout
  `boolean`
  `getEdited()`
  Get whether this flow has been altered since the last save operation
  `Environment`
  `getEnvironment()`
  Get the environment variables being used by this layout
  `File`
  `getFilePath()`
  Get the current path (if any) of the flow being edited in this layout
  `Flow`
  `getFlow()`
  Get the flow being edited by this layout
  `FlowExecutor`
  `getFlowExecutor()`
  Get the `FlowExecutor` being used for execution of this flow
  `weka.gui.knowledgeflow.VisibleLayout.KFLogPanel`
  `getLogPanel()`
  Get the log panel in use by this layout
  `int`
  `getZoomSetting()`
  Get the current zoom setting for this layout
  `boolean`
  `isExecuting()`
  Returns true if the flow managed by this layout is currently executing
  `static 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 flow
  `void`
  `setEnvironment(Environment env)`
  Set the environment variables to use with this layout
  `void`
  `setFilePath(File path)`
  Set the file path for the flow being edited by this layout
  `void`
  `setFlow(Flow flow)`
  Set the flow to edit in this layout
  `void`
  `setFlowExecutor(FlowExecutor executor)`
  Set the `FlowExcecutor` to use for executing the flow
  `void`
  `setZoomSetting(int zoom)`
  Set the current zoom setting for this layout
  `void`
  `stopFlow()`
  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`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### VisibleLayout

    public VisibleLayout(MainKFPerspective mainPerspective)
    Constructor
    Parameters:
      `mainPerspective` - the main Knowledge Flow perspective

- ## Method Details

  - ### 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, String connectionType)
    Connect the supplied source step to the supplied target step using the specified connection type
    Parameters:
      `source` - the `StepManager` instance managing the source step
      `target` - the `StepManager` instance managing the target step
      `connectionType` - 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 String environmentSubstitute(String source)

  - ### getFlowExecutor

    public FlowExecutor getFlowExecutor()
    Get the `FlowExecutor` being used for execution of this flow
    Returns:
      the `FlowExecutor` in use by this layout

  - ### setFlowExecutor

    public void setFlowExecutor(FlowExecutor executor)
    Set the `FlowExcecutor` to use for executing the flow
    Parameters:
      `executor` - the `FlowExecutor` to use for executing the flow in this layout

  - ### getFilePath

    public 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(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 WekaException
    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

    public static String serializeStepsToJSON(List<StepVisual> steps, String name) throws WekaException
    Utility method to serialize a list of steps (encapsulated in StepVisuals) to a JSON flow.
    Parameters:
      `steps` - the steps to serialize
      `name` - the name to set in the encapsulating Flow before serializing
    Returns:
      the serialized Flow
    Throws:
      `WekaException` - if a problem occurs