Class LabelsOptions

    • Constructor Detail

      • LabelsOptions

        public LabelsOptions()
        Creates new LabelsPlugin.ID plugin options.
      • LabelsOptions

        public LabelsOptions​(IsChart chart)
        Creates new LabelsPlugin.ID plugin options, relating to chart instance for default.
        Parameters:
        chart - chart instance related to the plugin options
    • Method Detail

      • createLabel

        public Label createLabel​(String id)
        Creates new label (if not exist) using the label if passed as argument.
        Parameters:
        id - label id to use
        Returns:
        new empty label object
      • createLabel

        public Label createLabel​(LabelId id)
        Creates new label (if not exist) using the label if passed as argument.
        Parameters:
        id - label id to use
        Returns:
        new empty label object
      • hasLabel

        public boolean hasLabel​(String id)
        Returns true if the label with the id passed as argument exists.
        Parameters:
        id - label id to check
        Returns:
        true if the label with the id passed as argument exists
      • hasLabel

        public boolean hasLabel​(LabelId id)
        Returns true if the label with the id passed as argument exists.
        Parameters:
        id - label id to check
        Returns:
        true if the label with the id passed as argument exists
      • removeLabel

        public void removeLabel​(String id)
        Removes the label by the id passed as argument, if exists.
        Parameters:
        id - label id to check
      • removeLabel

        public void removeLabel​(LabelId id)
        Removes the label by the id passed as argument, if exists.
        Parameters:
        id - label id to check
      • getLabels

        public List<Label> getLabels()
        Returns the collection of labels.
        Returns:
        the collection of labels
      • getLabel

        public Label getLabel​(String id)
        Returns the label with the id passed as argument or null if not exist.
        Parameters:
        id - label id to use to retrieve the label
        Returns:
        the label or null if not exist
      • getLabel

        public Label getLabel​(LabelId id)
        Returns the label with the id passed as argument or null if not exist.
        Parameters:
        id - label id to check
        Returns:
        the label with the id passed as argument or null if not exist