Class SelectData

  • All Implemented Interfaces:
    java.io.Serializable, ActionData

    public class SelectData
    extends java.lang.Object
    implements ActionData
    Represents an action is triggered by a user to do a list selection being changed at the client.
    Author:
    jumperchen
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALT_KEY
      Indicates whether the Alt key is pressed.
      static int CTRL_KEY
      Indicates whether the Ctrl key is pressed.
      static int SHIFT_KEY
      Indicates whether the Shift key is pressed.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SelectData​(java.util.Map data)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getKeys()
      Returns what keys were pressed when the mouse is clicked, or 0 if none of them was pressed.
      int getReference()
      Returns the reference item that is the component causing the onSelect event(select or deselect) to be fired.
      java.util.List<java.lang.Integer> getReferencePath()
      Returns the reference item path that is the component causing the onSelect event(select or deselect) to be fired, such as ITree Note: if not multiple, the getReferencePath() is the same with the first item of getSelectionPaths().
      java.util.List<java.lang.Integer> getSelectedItems()
      Returns the selected items (never null).
      java.util.List<java.util.List<java.lang.Integer>> getSelectionPaths()
      Returns the selected paths of ITree (never null).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ALT_KEY

        public static final int ALT_KEY
        Indicates whether the Alt key is pressed. It might be returned as part of getKeys().
        See Also:
        Constant Field Values
      • CTRL_KEY

        public static final int CTRL_KEY
        Indicates whether the Ctrl key is pressed. It might be returned as part of getKeys().
        See Also:
        Constant Field Values
      • SHIFT_KEY

        public static final int SHIFT_KEY
        Indicates whether the Shift key is pressed. It might be returned as part of getKeys().
        See Also:
        Constant Field Values
    • Constructor Detail

      • SelectData

        protected SelectData​(java.util.Map data)
    • Method Detail

      • getSelectedItems

        public java.util.List<java.lang.Integer> getSelectedItems()
        Returns the selected items (never null).
      • getSelectionPaths

        public java.util.List<java.util.List<java.lang.Integer>> getSelectionPaths()
        Returns the selected paths of ITree (never null).
      • getReference

        public int getReference()
        Returns the reference item that is the component causing the onSelect event(select or deselect) to be fired. Note: if not multiple, the getReference() is the same with the first item of getSelectedItems().
      • getReferencePath

        public java.util.List<java.lang.Integer> getReferencePath()
        Returns the reference item path that is the component causing the onSelect event(select or deselect) to be fired, such as ITree Note: if not multiple, the getReferencePath() is the same with the first item of getSelectionPaths().
      • getKeys

        public final int getKeys()
        Returns what keys were pressed when the mouse is clicked, or 0 if none of them was pressed. It is a combination of CTRL_KEY, SHIFT_KEY and ALT_KEY.