java.lang.Object
com.inductiveautomation.factorypmi.application.components.chart.easychart.Pen
All Implemented Interfaces:
Comparable<Pen>
Direct Known Subclasses:
CalcPen, DBPen, TagPen

public abstract class Pen extends Object implements Comparable<Pen>
A pen is the main unit of configuration for the EasyChart. Each pen will draw one line/series on the chart if enabled.
  • Constructor Details

    • Pen

      public Pen(Dataset ds, int row)
      Creates a pen object from the given dataset/row, pulling values for all attributes that apply to this pen's type
    • Pen

      public Pen()
      Creates a blank pen, using the default values for all attributes that apply to this pen's type.
    • Pen

      public Pen(Pen copy)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toDataset

      public static Dataset toDataset(List<Pen> pens, PenAttribute[] penAttributes, PenType type)
      Creates a dataset that represents the given list. All pens must be of the same type
    • getType

      public abstract PenType getType()
    • getDataGrouping

      public abstract IPenDatasourceFactory getDataGrouping(Set<String> dynamicGroups)
      An object that is hashable and unique to any parameters required to pull the data for this pen
      Parameters:
      dynamicGroups - The names of all configured dynamic groups.
    • getName

      public String getName()
    • getGroupAndName

      public String getGroupAndName()
      Returns the pen's group and name together as "Group\Name" or just "Name" if the group is blank.
    • getInt

      public int getInt(PenAttribute attr)
    • getSortOrder

      public Integer getSortOrder()
    • getFloat

      public float getFloat(PenAttribute attr)
    • getString

      public String getString(PenAttribute attr)
    • getColor

      public Color getColor(PenAttribute attr)
    • getBoolean

      public boolean getBoolean(PenAttribute attr)
    • set

      public void set(PenAttribute attr, Object value)
    • get

      public Object get(PenAttribute attr)
    • compareTo

      public int compareTo(Pen o)
      Specified by:
      compareTo in interface Comparable<Pen>