Class SimpleComponentEditorDialog

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

public class SimpleComponentEditorDialog extends JDialog
Editor for the variables of a SimpleSimComponent (FWSimpleSimComponent, Redmine #62). Left the variables in order of calculation (P = process step, I = after the integration) and the variables of the solution (double click or drag inserts ${name} into the rule); right the selected variable: id, data type, unit, description, default and the rule. The variables are checked while typing (see SimpleComponentModel.check(Predicate, Function)); errors must be fixed, warnings confirmed.
Author:
Andreas Enders, Claude (Anthropic), co-author
See Also:
  • Method Details

    • edit

      public static boolean edit(Component aParent, net.simplace.sim.FWSimSolution aSolution, net.simplace.sim.components.FWSimpleSimComponent aComponent, boolean aEditable)
      Opens the editor for an existing component and applies the result.
      Parameters:
      aParent - parent component
      aSolution - the solution (template)
      aComponent - the component
      aEditable - false for read-only
      Returns:
      true if the variables were changed
    • create

      public static org.jdom2.Element create(Component aParent, net.simplace.sim.FWSimSolution aSolution, String aId)
      Opens the editor for a new component.
      Parameters:
      aParent - parent component
      aSolution - the solution (template)
      aId - id of the new component
      Returns:
      the simcomponent element of the new component, or null if cancelled
    • isConfirmed

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