Class DefaultSelectionBehavior
java.lang.Object
com.levigo.jadice.web.client.tools.selectionbehavior.DefaultSelectionBehavior
- All Implemented Interfaces:
SelectionBehavior
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
onDown
(int index, boolean control, boolean shift, int button) React on mouse down.void
onDragStart
(int index, boolean control, boolean shift, int button) React on drag starts.void
onUp
(int index, boolean control, boolean shift, int button) React on mouse up.protected void
select
(int index, boolean control, boolean shift) void
setSelection
(int[] selection) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.levigo.jadice.web.client.tools.selectionbehavior.SelectionBehavior
onDown, onDragStart, onUp
-
Constructor Details
-
DefaultSelectionBehavior
public DefaultSelectionBehavior()
-
-
Method Details
-
clear
public void clear()- Specified by:
clear
in interfaceSelectionBehavior
-
setSelection
public void setSelection(int[] selection) - Specified by:
setSelection
in interfaceSelectionBehavior
-
getSelection
- Specified by:
getSelection
in interfaceSelectionBehavior
-
onDown
public void onDown(int index, boolean control, boolean shift, int button) Description copied from interface:SelectionBehavior
React on mouse down.- Specified by:
onDown
in interfaceSelectionBehavior
- Parameters:
index
- the page indexcontrol
-true
if control key is pressedshift
-true
if shift key is pressedbutton
- the mouse button (NativeEvent.BUTTON_LEFT
etc.)
-
onUp
public void onUp(int index, boolean control, boolean shift, int button) Description copied from interface:SelectionBehavior
React on mouse up.- Specified by:
onUp
in interfaceSelectionBehavior
- Parameters:
index
- the page indexcontrol
-true
if control key is pressedshift
-true
if shift key is pressedbutton
- the mouse button (NativeEvent.BUTTON_LEFT
etc.)
-
onDragStart
public void onDragStart(int index, boolean control, boolean shift, int button) Description copied from interface:SelectionBehavior
React on drag starts.- Specified by:
onDragStart
in interfaceSelectionBehavior
- Parameters:
index
- the page indexcontrol
-true
if control key is pressedshift
-true
if shift key is pressedbutton
- the mouse button (NativeEvent.BUTTON_LEFT
etc.)
-
select
protected void select(int index, boolean control, boolean shift)
-