Class TableOrder

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

@Component public class TableOrder extends Control
The class implements an object to be inserted as a child of a TableView or a ServerTableView to identify a possible sorting, also composed, on the columns of the table. The presence of at least one TableOrder makes a button appear on the table header. The button is identified by two arrows placed one above the other; by clicking on the button which appears a menu containing as many rows as the number of TableOrder. Clicking on each row will activate the order identified on the table by the corresponding TableOrder.
See Also:
GCApi:
component
  • Field Details

    • _orderparams

      protected String _orderparams
    • _ordericon

      protected String _ordericon
    • _ordericonHD

      protected Icon _ordericonHD
    • _orderfield

      protected String _orderfield
    • _descorderfield

      protected String _descorderfield
    • _orderquery

      protected String _orderquery
    • _descorderquery

      protected String _descorderquery
  • Constructor Details

    • TableOrder

      public TableOrder()
  • Method Details

    • setORDERFIELD

      public void setORDERFIELD(String s)
      Defines an increasing order for the table
      Parameters:
      s - The name of a field of the table, or a list of field names separated by the comma, that will be used to obtain an increasing order for the table
    • setDESCORDERFIELD

      public void setDESCORDERFIELD(String s)
      Defines a decreasing order for the table
      Parameters:
      s - The name of a field of the table, or a list of field names separated by the comma, that will be used to obtain a decreasing order for the table
    • setORDERQUERY

      public void setORDERQUERY(String s)
      Sets the name of a query that will be executed to obtain an increasing order for the table
      Parameters:
      s - The name of an ordering query of the DABase associated with the table
    • setDESCORDERQUERY

      public void setDESCORDERQUERY(String s)
      Sets the name of a query that will be executed to obtain a decreasing order for the table
      Parameters:
      s - The name of an ordering query of the DABase associated with the table
    • getOrderParams

      public String getOrderParams()
      Returns the parameters used to order the table
      Returns:
      The string that defines the correct fields or query that will be used to order the table
    • getOrderIcon

      @Deprecated public String getOrderIcon()
      Deprecated.
      use getOrderIconHD() to get the icon and Icon.getSrc() to extract the icon's path.
      Returns the string that defines the icon for the TableOrder
      Returns:
      The string of the svg code that draws the icon
    • getOrderIconHD

      public Icon getOrderIconHD()
      Returns the Icon that defines the Svg for the TableOrder
      Returns:
      The Icon of the svg code that draws the icon
    • setAttributes

      protected void setAttributes(String order, String descorder, boolean hasOrderQuery)
    • getHtml

      public org.apache.ecs.Element getHtml(EntitySet es)
      Description copied from class: Component
      Abstract method that must be extended and returns the html code of the Component
      Specified by:
      getHtml in class Component
      Parameters:
      es - The EntitySet to which the element belongs
      Returns:
      The html of the Component
    • getStartSvg

      public static String getStartSvg(String style)
      Creates and returns the start svg string used to draws the icon
      Parameters:
      style - A string that defines a css style to apply to the svg icon
      Returns:
      The start svg string
    • getBothOrdersSvg

      public static String getBothOrdersSvg(boolean fillOrder, boolean fillDescOrder)
      Returns the inner part of the svg string used to draw the icon when there are an increasing order and a decreasing order for the TableOrder
      Parameters:
      fillOrder - Defines if the arrow for the increasing order must be filled or empty
      fillDescOrder - Defines is the arrow for the decreasing order must be filled or empty
      Returns:
      The inner part of the svg string
    • getOrderSvg

      public static String getOrderSvg(boolean fill)
      Returns the inner part of the svg string used to draw the icon when there is an increasing order
      Parameters:
      fill - Defines if the arrow must be filled or empty
      Returns:
      The inner part of the svg string
    • getDescOrderSvg

      public static String getDescOrderSvg(boolean fill)
      Returns the inner part of the svg string used to draw the icon when there is a decreasing order
      Parameters:
      fill - Defines if the arrow must be filled or empty
      Returns:
      The inner part of the svg string
    • getEndSvg

      public static String getEndSvg()
      Returns the end svg tag string used to draws the icon
      Returns:
      The end svg tag string
    • getMultiIcon

      public static IconHD getMultiIcon(boolean order, boolean descorder)
      Get the correct multi arrow icon to use in the header's column
      Parameters:
      order - true if you want the double arrow icon with the Up arrow selected, false otherwise.
      descorder - true if you want the double arrow icon with the Down arrow selected, false otherwise.
      Returns:
      The icon to use
    • getSingleIcon

      public static IconHD getSingleIcon(boolean up, boolean filled)
      Get the correct single arrow icon to use in the header's column
      Parameters:
      up - true if you want the up arrow icon ,false if you want the down arrow icon.
      filled - true if you want icon filled, false otherwise.
      Returns:
      The icon to use