Class InputEditorDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class InputEditorDialog extends JDialog
Dialog for the inputs of a SimComponent (Redmine #62): left the possible sources (variables of the solution, with filter), right a table of the inputs and constants with source (link) or value. A source is taken over by double click in the tree (for the selected input) or by dragging it onto an input; "Link by name" proposes sources with the same name. The entries are checked while editing (see InputModel.check()); with OK the changes are written to the component and the solution.
Author:
Andreas Enders, Claude (Anthropic), co-author
See Also:
  • Constructor Details

    • InputEditorDialog

      public InputEditorDialog(Window aOwner, InputModel aModel, boolean aEditable)
      Creates the (modal) dialog.
      Parameters:
      aOwner - owner window, may be null
      aModel - the model, edited directly
      aEditable - false for read-only
  • Method Details

    • edit

      public static boolean edit(Component aParent, net.simplace.sim.FWSimSolution aSolution, net.simplace.sim.model.FWSimComponent aComponent, boolean aEditable, String aSourceFilter)
      Opens the dialog for a component and applies the result.
      Parameters:
      aParent - parent component
      aSolution - the solution (template)
      aComponent - the component
      aEditable - false for read-only
      aSourceFilter - initial filter of the sources (e.g. the name of a component linked by an arrow), may be null
      Returns:
      true if inputs were changed
    • isConfirmed

      public boolean isConfirmed()
      Returns:
      true if the dialog was closed with OK