Class FlowSetupManager

    • Field Detail

      • m_Modified

        protected boolean m_Modified
        whether manager got modified.
      • m_StatusMessageHandler

        protected StatusMessageHandler m_StatusMessageHandler
        the handler to use for displaying messages.
    • Constructor Detail

      • FlowSetupManager

        public FlowSetupManager()
        Initializes the setup manager.
      • FlowSetupManager

        public FlowSetupManager​(Collection<FlowSetup> collection)
        Initializes the setup manager.
        Parameters:
        collection - the collection to initialize with
    • Method Detail

      • setStatusMessageHandler

        public void setStatusMessageHandler​(StatusMessageHandler value)
        Sets the handler for status messages.
        Parameters:
        value - the handler
      • getStatusMessageHandler

        public StatusMessageHandler getStatusMessageHandler()
        Returns the current handler for status messages.
        Returns:
        the handler, null if none set
      • isModified

        public boolean isModified()
        Returns whether the manager was modified.
        Returns:
        true if modified
      • setModified

        public void setModified​(boolean value)
        Sets the modified state of the manager.
        Parameters:
        value - the modified state
      • modified

        protected void modified()
        Sets the modified state to TRUE and notifies all change listeners.
      • modified

        protected void modified​(boolean modified)
        Sets the modified state and notifies all change listeners.
        Parameters:
        modified - the modified state
      • add

        public void add​(int index,
                        FlowSetup element)
        Adds the setup at the specified location.
        Specified by:
        add in interface List<FlowSetup>
        Overrides:
        add in class Vector<FlowSetup>
        Parameters:
        index - the index to add the setup
        element - the setup to add
      • addAll

        public boolean addAll​(int index,
                              Collection<? extends FlowSetup> c)
        Adds all elements of the collection at the specified location.
        Specified by:
        addAll in interface List<FlowSetup>
        Overrides:
        addAll in class Vector<FlowSetup>
        Parameters:
        index - the index at which to add the setups
        c - the collection with the setups to add
        Returns:
        true if collection got modified
      • insertElementAt

        public void insertElementAt​(FlowSetup obj,
                                    int index)
        Inserts the setup at the specified location.
        Overrides:
        insertElementAt in class Vector<FlowSetup>
        Parameters:
        obj - the setup to insert
        index - the position
      • remove

        public FlowSetup remove​(int index)
        Removes the specified setup.
        Specified by:
        remove in interface List<FlowSetup>
        Overrides:
        remove in class Vector<FlowSetup>
        Parameters:
        index - the position of the setup to remove
        Returns:
        the element that was removed
      • removeElement

        public boolean removeElement​(Object obj)
        Removes the specified setup.
        Overrides:
        removeElement in class Vector<FlowSetup>
        Parameters:
        obj - the setup to remove
        Returns:
        true if removed successfully
      • removeElementAt

        public void removeElementAt​(int index)
        Removes the setup at the specified location.
        Overrides:
        removeElementAt in class Vector<FlowSetup>
        Parameters:
        index - the position of the setup to remove
      • removeRange

        protected void removeRange​(int fromIndex,
                                   int toIndex)
        Removes a range of setups.
        Overrides:
        removeRange in class Vector<FlowSetup>
        Parameters:
        fromIndex - starting index (incl)
        toIndex - ending index (excl)
      • set

        public FlowSetup set​(int index,
                             FlowSetup element)
        Sets the setup at the specified location.
        Specified by:
        set in interface List<FlowSetup>
        Overrides:
        set in class Vector<FlowSetup>
        Parameters:
        index - the position to set the setup
        element - the setup to set
        Returns:
        the element previously at this position
      • setElementAt

        public void setElementAt​(FlowSetup obj,
                                 int index)
        Sets the setup at the specified location.
        Overrides:
        setElementAt in class Vector<FlowSetup>
        Parameters:
        obj - the setup to set
        index - the position to place the setup
      • setSize

        public void setSize​(int newSize)
        Resizes the collection: if new size is larger, then null objects are added, otherwise the setups at the end discarded.
        Overrides:
        setSize in class Vector<FlowSetup>
        Parameters:
        newSize - the new size for the collection
      • write

        public boolean write​(String filename)
        Writes the setups to the given file.
        Parameters:
        filename - the file to write to
        Returns:
        true if successfully written
      • read

        public boolean read​(String filename)
        Reads and returns the setups from the given file.
        Parameters:
        filename - the file to read from
        Returns:
        true if successfully read
      • indexOf

        public int indexOf​(String name)
        Returns the index of the flowsetup with the given name.
        Parameters:
        name - the name to look for
        Returns:
        the index, -1 if not found
      • addChangeListener

        public void addChangeListener​(ChangeListener l)
        Adds the listener to the internal list.
        Parameters:
        l - the listener to add
      • removeChangeListener

        public void removeChangeListener​(ChangeListener l)
        Removes the listener from the internal list.
        Parameters:
        l - the listener to remove
      • notifyChangeListeners

        protected void notifyChangeListeners​(ChangeEvent e)
        Sends the event to all change listeners.
        Parameters:
        e - the event to send