Class SetupAssignments


  • @Deprecated
    public class SetupAssignments
    extends Object
    Deprecated.
    Manage a (fixed) set of ConverterSetups and (changing) set of MinMaxGroups, such that the following is always true:
    1. Every setup is assigned to exactly one group.
    2. No group is empty.
    Author:
    Tobias Pietzsch
    • Constructor Detail

      • SetupAssignments

        public SetupAssignments​(ArrayList<ConverterSetup> converterSetups,
                                double defaultRangeMin,
                                double defaultRangeMax)
        Deprecated.
      • SetupAssignments

        public SetupAssignments​(ArrayList<ConverterSetup> converterSetups,
                                double fullRangeMin,
                                double fullRangeMax,
                                double defaultRangeMin,
                                double defaultRangeMax)
        Deprecated.
      • SetupAssignments

        public SetupAssignments​(List<ConverterSetup> converterSetups,
                                double defaultRangeMin,
                                double defaultRangeMax)
        Deprecated.
      • SetupAssignments

        public SetupAssignments​(List<ConverterSetup> converterSetups,
                                double fullRangeMin,
                                double fullRangeMax,
                                double defaultRangeMin,
                                double defaultRangeMax)
        Deprecated.
        Parameters:
        converterSetups -
        fullRangeMin -
        fullRangeMax -
        defaultRangeMin -
        defaultRangeMax -
    • Method Detail

      • moveSetupToGroup

        public void moveSetupToGroup​(ConverterSetup setup,
                                     MinMaxGroup group)
        Deprecated.
        Add the specified setup to the specified group. The setup is removed from its previous group. If this previous group is made empty by this, it is removed from the list of groups.
      • removeSetupFromGroup

        public boolean removeSetupFromGroup​(ConverterSetup setup,
                                            MinMaxGroup group)
        Deprecated.
        Remove the specified setup from the specified group. If this group would be made empty by this, it is not removed from the group. Otherwise, after being removed, a new group is created containing only the specified setup, and this new group is added to the list of group. The settings of the new group are initialized with the settings of the old group.
        Returns:
        Whether or not removal was successful (so the corresponding checkbox can be re-checked)
      • getMinMaxGroups

        public List<MinMaxGroup> getMinMaxGroups()
        Deprecated.
        Returns:
        the list of MinMaxGroups, such that every setup is contained in exactly one group.
      • addSetup

        public void addSetup​(ConverterSetup setup)
        Deprecated.
        Add the setup in a new group.
        Parameters:
        setup -
      • removeSetup

        public void removeSetup​(ConverterSetup setup)
        Deprecated.
      • restoreFromXml

        public void restoreFromXml​(org.jdom2.Element parent)
        Deprecated.
        Restore the state of this SetupAssignments from XML. Note, that this only restores the assignments of setups to groups and group settings. The list of ConverterSetups is not restored.
      • getUnusedSetupId

        public static int getUnusedSetupId​(SetupAssignments setupAssignments)
        Deprecated.
        Get a setup id that is not used in the specified setupAssignments.
        Parameters:
        setupAssignments - the SetupAssignments for which to find an unused id. May be null, in which case a new id is returned that was not used in any previous call to getUnusedSetupId(null).
        Returns:
        a unused setup id