Class ColumnProgress

All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Badgeable, Hideable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable

@Component @Configurable public class ColumnProgress extends ColumnDouble
This component extends ColumnDouble and must be used to insert a progress bar inside the column's cell. It is possible to set the minimum and maximum values of the progress bar for each row using a float value or value of another column.
See Also:
GCApi:
component
  • Field Details

    • _min

      protected Float _min
    • _max

      protected Float _max
    • _maxname

      protected String _maxname
    • _minname

      protected String _minname
    • _minnameIndex

      protected int _minnameIndex
    • _maxnameIndex

      protected int _maxnameIndex
    • _tf

      protected TextFormat _tf
  • Constructor Details

    • ColumnProgress

      public ColumnProgress()
      Creates a new instance of ColumnProgress
  • Method Details

    • setMAXNAME

      public void setMAXNAME(String s)
      Sets the maximum value of the progress bar with the value of another column. The column must contain a float value or a convertible value in float.
      Parameters:
      s - Name of the column to use to set the maximum value of the progress bar.
    • setMINNAME

      public void setMINNAME(String s)
      Sets the minimum value of the progress bar with the value of another column. The column must contain a float value or a convertible value in float.
      Parameters:
      s - Name of the column to use to set the minimum value of the progress bar.
    • setFORMAT

      public void setFORMAT(String s)
      Sets the format to show over the progress bar. To define the format we use TextFormat passing as the first value the current value of the progress bar, and as the second value the maximum.
      Pay attention that the value are interpreted as float, so if you want intercept a specific integer value you must use ".0" to the end of the value in the format string.
      Overrides:
      setFORMAT in class ColumnDouble
      Parameters:
      s - String to set the format. The first value passed is the current value of the progress bar, the second is the maximum. To more information on how to build the format string, see TextFormat.
    • setMIN

      public void setMIN(String s)
      Sets the minimum value of the progress bar with a specific value.
      Parameters:
      s - Float value to use to set the minimum value of the progress bar.
    • setMAX

      public void setMAX(String s)
      Sets the maximum value of the progress bar with a specific value.
      Parameters:
      s - Float value to use to set the maximum value of the progress bar.
    • toFloat

      protected Float toFloat(Object o)
    • setupMetaData

      public void setupMetaData(DBView dbv)
      Description copied from class: Column
      Called to init all the field starting form the DBView
      Overrides:
      setupMetaData in class Column
      Parameters:
      dbv - The DBView with all the field used in the init
    • calcValue

      protected Float calcValue(Object o)
    • calcMax

      protected Float calcMax(ArrayList al)
    • calcMin

      protected Float calcMin(ArrayList al)
    • getHtmlValue

      public org.apache.ecs.Element getHtmlValue(EntitySet es, Object o, ArrayList al)
      Returns the html element
      Parameters:
      es - The EntitySet to which the element belongs
      o - The value
      al - ArrayList containing the min and max
      Returns:
      The html element
    • prepareName

      protected String prepareName()
    • setStyle

      protected void setStyle(org.apache.ecs.ElementAttributes d)
    • getHtmlRow

      public org.apache.ecs.Element getHtmlRow(EntitySet es, int row, int pagerow, ArrayList al)
      Description copied from class: Column
      Returns the html element that defines the row
      Overrides:
      getHtmlRow in class ColumnDouble
      Parameters:
      es - The EntitySet to which the element belongs
      row - The number of the row
      pagerow - The number ofd the page
      al - The list of values of the row
      Returns:
      The html element that defines the row
    • buildSetupScript

      public void buildSetupScript(StringBuilder sb)
      Description copied from class: Component
      Every component can add a script to the StringBuilder, script executed when the component is created.
      Overrides:
      buildSetupScript in class Component
      Parameters:
      sb - The StringBuilder on which we want to add the script
    • getDefaultLayoutLabel

      public String getDefaultLayoutLabel()
      Overrides:
      getDefaultLayoutLabel in class ColumnDouble