Class AbstractListingProcessor

    • Field Detail

      • m_List

        protected List<String> m_List
        for storing the list items.
    • Constructor Detail

      • AbstractListingProcessor

        public AbstractListingProcessor()
    • Method Detail

      • isValid

        protected abstract boolean isValid​(AbstractOption option,
                                           Object obj,
                                           OptionTraversalPath path)
        Checks whether the object is valid and should be added to the list.
        Parameters:
        option - the current option
        obj - the object to check
        path - the traversal path of properties
        Returns:
        true if valid
      • objectToString

        protected String objectToString​(AbstractOption option,
                                        Object obj,
                                        OptionTraversalPath path)
        Returns the string representation of the object that is to be added to the list.

        Default implementation only calls the toString() method.
        Parameters:
        option - the current option
        obj - the object to turn into a string
        path - the traversal path of properties
        Returns:
        the string representation, null if to ignore the item
      • objectToStrings

        protected String[] objectToStrings​(AbstractOption option,
                                           Object obj,
                                           OptionTraversalPath path)
        Returns the string array representation of the object that is to be added to the list.

        Default implementation only calls the toString() method.
        Parameters:
        option - the current option
        obj - the object to turn into a string
        path - the traversal path of properties
        Returns:
        the string representation, null if to ignore the item
      • process

        protected void process​(AbstractOption option,
                               Object obj,
                               OptionTraversalPath path)
        Processes the object.
        Parameters:
        option - the current option
        obj - the object
        path - the traversal path of properties
      • isSortedList

        protected abstract boolean isSortedList()
        Returns whether the list should be sorted.
        Returns:
        true if the list should get sorted
      • isUniqueList

        protected abstract boolean isUniqueList()
        Returns whether the list should not contain any duplicates.
        Returns:
        true if the list contains no duplicates
      • initializeList

        protected void initializeList()
        Initializes the list.

        Default implementation creates an empty vector.
      • processActor

        protected void processActor​(Actor actor)
        Performs the actual processing.
        Specified by:
        processActor in class AbstractActorProcessor
        Parameters:
        actor - the actor to process (is a copy of original for processors implementing ModifyingProcessor)
        See Also:
        ModifyingProcessor
      • finalizeList

        protected void finalizeList()
        Finishes up the list, e.g., sorts it.
        See Also:
        isSortedList()
      • getHeader

        protected abstract String getHeader()
        Returns the header to use in the dialog, i.e., the one-liner that explains the output.
        Returns:
        the header, null if no header available
      • getDefaultSize

        protected Dimension getDefaultSize()
        Returns the default sie of the dialog.

        The default is 400x300.
        Returns:
        the size