Class Ranger

java.lang.Object
overit.geocall.ui.Ranger
All Implemented Interfaces:
Serializable, SingleUseComponent

public class Ranger extends Object implements SingleUseComponent, Serializable
The class, that implements the SingleUseComponent interface, implements the user interface element that appears in pop-up and allows the user to manage the ranges of the data of the diagram objects like for example the JFCSerie
See Also:
  • Field Details

    • _sequence

      protected static AtomicLong _sequence
    • _id

      protected String _id
    • _container

      protected Container _container
    • _values

      protected ListAttribute _values
    • _valuesMin

      protected double _valuesMin
    • _valuesMax

      protected double _valuesMax
    • _valuesStep

      protected double _valuesStep
    • _event

      protected String _event
    • _orientation

      protected String _orientation
    • _from

      protected int _from
    • _to

      protected int _to
  • Constructor Details

    • Ranger

      public Ranger(Container container, String event)
      Creates a new instance of Ranger
      Parameters:
      container - The Container that is creating the Ranger
      event - The event called when the user click on the Ranger
  • Method Details

    • setValues

      public void setValues(ListAttribute labels)
      Sets a list of values for the Ranger
      Parameters:
      labels - A ListAttribute of strings (separated by the character | ) each of which represents a value
    • setValues

      public void setValues(double min, double max, double step)
      Sets the values of the Ranger starting from a minimum value, a maximum value and a value that defines the step
      Parameters:
      min - The mimimum value
      max - The maximum value
      step - The step between one value and another
    • setRange

      public void setRange(int from, int to)
      Sets the range of values
      Parameters:
      from - The from value
      to - The to value
    • setOrientation

      public void setOrientation(String s)
      Sets the orientation (vertical or horizontal) of the Ranger
      Parameters:
      s - "h" for horizontal, "v" for vertical
    • getOrientation

      public String getOrientation()
      Returns the orientation (vertical or horizontal) of the Ranger
      Returns:
      "h" for horizontal, "v" for vertical
    • getHtml

      public org.apache.ecs.Element getHtml(EntitySet es, Window w)
      Returns the html code of the Ranger
      Specified by:
      getHtml in interface SingleUseComponent
      Parameters:
      es - The EntitySet to which the element belongs
      w - The Window currently displayed
      Returns:
      The html code of the Ranger
    • checkRange

      protected void checkRange()
    • getHorizontalTooltip

      protected org.apache.ecs.Element getHorizontalTooltip()
    • getVerticalTooltip

      protected org.apache.ecs.Element getVerticalTooltip()
    • buildSetupScript

      public void buildSetupScript(StringBuilder sb)
      Every component can add a script to the StringBuilder, script executed when the component is created The method add the script that manage the creation and showing of the Ranger
      Specified by:
      buildSetupScript in interface SingleUseComponent
      Parameters:
      sb - The StringBuilder on which we want to add the script
    • createOnClickString

      protected String createOnClickString(int tdPosition)