Class NumberRangeFilter

All Implemented Interfaces:
Editable<NumberRangeFilter>, Focusable<NumberRangeFilter>

public class NumberRangeFilter extends FormItem<Number,NumberRangeFilter> implements Editable<NumberRangeFilter>
Author:
JBStrap
  • Constructor Details

  • Method Details

    • getValue

      public Number getValue()
      Description copied from class: FormItem
      Gets the form item’s current value.
      Overrides:
      getValue in class FormItem<Number,NumberRangeFilter>
      Returns:
      Current value of the form item
    • getMinValue

      public Number getMinValue()
    • getMaxValue

      public Number getMaxValue()
    • setValue

      public NumberRangeFilter setValue(Number value)
      Description copied from class: FormItem
      Sets the form item’s current value.
      Overrides:
      setValue in class FormItem<Number,NumberRangeFilter>
      Parameters:
      value - Current value of the form item
      Returns:
      Form item component
    • setRange

      public NumberRangeFilter setRange(Number minValue, Number maxValue)
    • onFormItemValueChanged

      public void onFormItemValueChanged(FormItemChangeEvent event)
      Overrides:
      onFormItemValueChanged in class FormItem<Number,NumberRangeFilter>
      Parameters:
      event - Form item value change event handler
    • init

      public void init() throws JavaScriptLoadError
      Description copied from class: Component
      The component initialization method.

      Empty method, only needs to be overwritten when making a custom component, that needs to call an initializing JavaScript on the client side. The method is called by the framework after the component is drawn, but before the afterDraw() method. The use of this method during application development is not allowed. This method is meant for inner use only.

      Overrides:
      init in class FormItem<Number,NumberRangeFilter>
      Throws:
      JavaScriptLoadError - If there was a JavaScript error during the initialization.
    • afterDraw

      public void afterDraw()
      Description copied from class: Component
      The operations to be executed after the drawing of the component

      By default, this is an empty method. It has to be overwritten on a component or page if additional operations have to be executed after the drawing process. One such operation is data retrieval, which shouldn't run in constructors so that the user could see results of an operation or navigation process.

      Overrides:
      afterDraw in class FormItem<Number,NumberRangeFilter>
    • writeHTML

      public boolean writeHTML(StringWriter writer)
      Description copied from class: Component
      Creates the component's HTML equivalent

      This method doesn't need to be used during application development. This method is used when developing a custom component. When creating a custom component, this method needs to be implemented. In the parameter (StringWriter class) the component's HTML equivalent must be specified, and the method has to return with a Boolean value. This boolean value determines if the component was drawn. If the user doesn't have access right to the component, or if the component couldn't be drawn, it should return with false. Otherwise, it must return with true.

      Overrides:
      writeHTML in class FormItem<Number,NumberRangeFilter>
      Returns:
      If the componentwas drawn, true, otherwise false
    • setDefaultValue

      public NumberRangeFilter setDefaultValue(Object defaultValue)
      Description copied from class: FormItem
      Sets the form item’s default value. By default, the form item does not have a default value.
      Specified by:
      setDefaultValue in class FormItem<Number,NumberRangeFilter>
      Parameters:
      defaultValue - Form item default value
      Returns:
      Form item component
    • drawEditor

      protected void drawEditor(StringWriter writer)
      Description copied from class: FormItem

      Draws the editor component.

      You do not need to use this method during development, but all components extending the form item must implement it. Use the method to generate the input field’s HTML code. This code is then inserted into the corresponding DOM code when drawing the form item.

      Specified by:
      drawEditor in class FormItem<Number,NumberRangeFilter>
      Parameters:
      writer - The HTML string writer class instance; write here the HTML code for the input field