Class 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:
  • 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