Class CFBinSet


  • public final class CFBinSet
    extends CFNamedItem
    Set of bins (categories) for classification.
    Author:
    Petr Hamernik
    • Field Detail

      • PROP_BINS

        public static final java.lang.String PROP_BINS
        Property name for bins property.
        See Also:
        Constant Field Values
    • Method Detail

      • getBins

        public java.util.List<CFBin> getBins()
        Get list of bins which belong to this bin set.
        Returns:
        list of bins
      • addBin

        public CFBin addBin​(java.lang.String displayName,
                            CFFormatter formatter)
        Add new bin to this bin set and return it.
        Parameters:
        displayName - Display name of a new bin
        formatter - Formatter for a new bin
        Returns:
        the newly created instance of bin.
      • restoreBin

        public CFBin restoreBin​(java.lang.String displayName,
                                java.lang.String id,
                                CFFormatter formatter)
        Do NOT use: only for persistence.
        Parameters:
        displayName - display name
        id - id of the bin
        formatter - formatting params
        Returns:
        new bin
      • removeBin

        public void removeBin​(CFBin bin)
        Remove the bin.
        Parameters:
        bin - The bin to be removed
      • contains

        public boolean contains​(CFBin bin)
        Does this bin set contains the given bin?
        Parameters:
        bin - The bin to be tested.
        Returns:
        true if bin is there, false otherwise.
      • findBinById

        public CFBin findBinById​(java.lang.String id)
        Find bin by its id. Can return null.
        Parameters:
        id - The id to be searched
        Returns:
        bin instance of null
      • getId

        public java.lang.String getId()
        Get unique ID of this bin set.
        Returns:
        unique ID in its classifier.
      • addChangeListener

        public void addChangeListener​(javax.swing.event.ChangeListener listener)
        Add change listener to know about any change in this CFBinSet and in all of its CFBins. It means you don't need to register PropertyChangeListener to each bin, but you can be notified through this single listener about all changes in the hierarchy (e.g. when some bin changes its CFFormatter)
        Parameters:
        listener - Listener to be added
      • removeChangeListener

        public void removeChangeListener​(javax.swing.event.ChangeListener listener)
      • getAsHTML

        public java.lang.String getAsHTML()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object