org.odlabs.wiquery.ui.selectable

Class SelectableBehavior

    • Constructor Detail

      • SelectableBehavior

        public SelectableBehavior()
        Default constructor
    • Method Detail

      • bind

        public void bind(org.apache.wicket.Component component)
        Specified by:
        bind in interface org.apache.wicket.behavior.IBehavior
        Overrides:
        bind in class WiQueryAbstractBehavior
      • detach

        public void detach(org.apache.wicket.Component component)
        Specified by:
        detach in interface org.apache.wicket.behavior.IBehavior
        Overrides:
        detach in class org.apache.wicket.behavior.AbstractBehavior
      • getCancel

        public String getCancel()
        Returns:
        the cancel option value
      • getDelay

        public int getDelay()
        Returns:
        the delay option value
      • getDistance

        public int getDistance()
        Returns:
        the distance option value
      • getFilter

        public String getFilter()
        Returns:
        the cancel option value
      • getOptions

        protected Options getOptions()
        Method retrieving the options of the component
        Returns:
        the options
      • isAutoRefresh

        public boolean isAutoRefresh()
        Returns:
        the autoRefresh option enum
      • setAutoRefresh

        public SelectableBehavior setAutoRefresh(boolean autoRefresh)
        This determines whether to refresh (recalculate) the position and size of each selected at the beginning of each select operation. If you have many many items, you may want to set this to false and call the refresh method manually.
        Parameters:
        autoRefresh -
        Returns:
        instance of the current behavior
      • setDisabled

        public SelectableBehavior setDisabled(boolean disabled)
        Disables (true) or enables (false) the selectable. Can be set when initialising (first creating) the selectable.
        Parameters:
        disabled -
        Returns:
        instance of the current behavior
      • isDisabled

        public boolean isDisabled()
        Returns:
        the disabled option
      • setCancel

        public SelectableBehavior setCancel(String cancel)
        Set's the prevent selecting if you start on elements matching the selector
        Parameters:
        cancel - Selector (default : ':input,option')
        Returns:
        instance of the current behavior
      • setDelay

        public SelectableBehavior setDelay(int delay)
        Set's the delay (in milliseconds) to define when the selecting should start
        Parameters:
        delay -
        Returns:
        instance of the current behavior
      • setDistance

        public SelectableBehavior setDistance(int distance)
        Set's the tolerance in pixels
        Parameters:
        distance -
        Returns:
        instance of the current behavior
      • setFilter

        public SelectableBehavior setFilter(String filter)
        Set's the matching child to be selectable
        Parameters:
        filter - Selector (default : '*')
        Returns:
        instance of the current behavior
      • setTolerance

        public SelectableBehavior setTolerance(SelectableBehavior.ToleranceEnum tolerance)
        Set's the tolerance
        • fit: draggable overlaps the droppable entirely
        • touch: draggable overlaps the droppable any amount
        Parameters:
        tolerance -
        Returns:
        instance of the current behavior
      • setSelectedEvent

        public SelectableBehavior setSelectedEvent(JsScopeUiEvent selected)
        Set's the selected event This event is triggered at the end of the select operation, on each element added to the selection.
        Parameters:
        selected - Associated JsScopeUiEvent
        Returns:
        instance of the current behavior
      • setSelectingEvent

        public SelectableBehavior setSelectingEvent(JsScopeUiEvent selecting)
        Set's the selecting event This event is triggered during the select operation, on each element added to the selection.
        Parameters:
        selecting - Associated JsScopeUiEvent
        Returns:
        instance of the current behavior
      • setStartEvent

        public SelectableBehavior setStartEvent(JsScopeUiEvent start)
        Set's the start event This event is triggered at the beginning of the select operation.
        Parameters:
        start - Associated JsScopeUiEvent
        Returns:
        instance of the current behavior
      • setStopEvent

        public SelectableBehavior setStopEvent(JsScopeUiEvent stop)
        Set's the stop event This event is triggered at the end of the select operation.
        Parameters:
        stop - Associated JsScopeUiEvent
        Returns:
        instance of the current behavior
      • setUnselectedEvent

        public SelectableBehavior setUnselectedEvent(JsScopeUiEvent unselected)
        Set's the unselected event This event is triggered at the end of the select operation, on each element removed from the selection.
        Parameters:
        unselected - Associated JsScopeUiEvent
        Returns:
        instance of the current behavior
      • setUnselectingEvent

        public SelectableBehavior setUnselectingEvent(JsScopeUiEvent unselecting)
        Set's the unselecting event This event is triggered during the select operation, on each element removed from the selection.
        Parameters:
        unselecting - Associated JsScopeUiEvent
        Returns:
        instance of the current behavior
      • destroy

        public JsStatement destroy()
        Method to destroy This will return the element back to its pre-init state.
        Returns:
        the associated JsStatement
      • destroy

        public void destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
        Method to destroy within the ajax request
        Parameters:
        ajaxRequestTarget -
      • disable

        public JsStatement disable()
        Method to disable
        Returns:
        the associated JsStatement
      • disable

        public void disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
        Method to disable within the ajax request
        Parameters:
        ajaxRequestTarget -
      • enable

        public JsStatement enable()
        Method to enable
        Returns:
        the associated JsStatement
      • enable

        public void enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
        Method to enable within the ajax request
        Parameters:
        ajaxRequestTarget -
      • refresh

        public JsStatement refresh()
        Method to refresh
        Returns:
        the associated JsStatement
      • refresh

        public void refresh(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
        Method to refresh within the ajax request
        Parameters:
        ajaxRequestTarget -
      • widget

        public JsStatement widget()
        Method to returns the .ui-selectable element
        Returns:
        the associated JsStatement
      • widget

        public void widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
        Method to returns the .ui-selectable element within the ajax request
        Parameters:
        ajaxRequestTarget -

Copyright © 2009-2012. All Rights Reserved.