Class GUIValueFactory

    • Field Detail

      • createUpdatableCellEditors

        private static boolean createUpdatableCellEditors
    • Constructor Detail

      • GUIValueFactory

        public GUIValueFactory()
    • Method Detail

      • createVariable

        public static GUIVariable createVariable​(IDecisionVariable variable,
                                                 org.eclipse.swt.widgets.Composite parent,
                                                 GUIConfiguration config,
                                                 GUIVariable varParent)
        Creates a new GUIVariable.
        Parameters:
        variable - The IDecisionVariable represented by this GUIVariable
        parent - The controlling composite, needed for the creation of CellEditors
        config - The GUIConfiguration holding this BasisGUIVariable
        varParent - The parent GUIVariable holding this variable. Can be null if and only if this variable is a top level variable stored inside the configuration.
        Returns:
        A GUI representation of the IDecisionVariable
      • createVariable

        public static GUIVariable createVariable​(IDecisionVariable variable,
                                                 org.eclipse.swt.widgets.Composite parent,
                                                 GUIConfiguration config,
                                                 GUIVariable varParent,
                                                 java.util.List<IRangeRestriction> rangeRestrictors)
        Creates a new GUIVariable.
        Parameters:
        variable - The IDecisionVariable represented by this GUIVariable
        parent - The controlling composite, needed for the creation of CellEditors
        config - The GUIConfiguration holding this BasisGUIVariable
        varParent - The parent GUIVariable holding this variable. Can be null if and only if this variable is a top level variable stored inside the configuration.
        rangeRestrictors - Optional list to restrict values of some GUIVariable, e.g., to restrict values of combo box based variables.
        Returns:
        A GUI representation of the IDecisionVariable
      • makeUnique

        private static <T> java.util.List<T> makeUnique​(java.util.List<T> list)
        Returns a list of unique elements taken from list.
        Type Parameters:
        T - the element type
        Parameters:
        list - the list to be processed
        Returns:
        the list of unique elements from list in sequence of list
      • createComboItems

        public static ComboboxGUIVariable.ComboItem[] createComboItems​(IDecisionVariable variable,
                                                                       Reference reference)
        Creates combo items for the given variable of type reference.
        Parameters:
        variable - the variable to be considered
        reference - the (required) reference type of variable
        Returns:
        the combo items
      • createUpdatableCellEditors

        public static final void createUpdatableCellEditors​(boolean updatable)
        Defines whether updatable cell editors shall be created if possible.
        Parameters:
        updatable - if true, updatable cell editors shall be created, false for usual ones
      • createUpdatableCellEditors

        public static final boolean createUpdatableCellEditors()
        Returns whether updatable cell editors shall be created if possible.
        Returns:
        true if updatable cell editors shall be created, false for usual ones