SWT LPEX
v3.0.5

com.ibm.lpex.samples
Class BlockNewMarkToMouseAction

java.lang.Object
  extended bycom.ibm.lpex.samples.BlockNewMarkToMouseAction
All Implemented Interfaces:
LpexAction

public class BlockNewMarkToMouseAction
extends Object
implements LpexAction

Sample action blockNewMarkToMouse - start new selections on new drags of mouse button 1.

LPEX non-stream selections are by default extended on mouse drags. They must be explicitly cleared (with, for example, Alt+U) before marking a new block. This action is similar to the blockMarkToMouse default editor action, but it makes a new mouse drag start a new selection.

Here is the BlockNewMarkToMouseAction source code.

To redefine the default blockMarkToMouse action:

See Also:
MouseReselect, All the samples

Constructor Summary
BlockNewMarkToMouseAction()
           
 
Method Summary
 boolean available(LpexView lpexView)
          Returns the availability of this action.
 void doAction(LpexView lpexView)
          Runs the action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockNewMarkToMouseAction

public BlockNewMarkToMouseAction()
Method Detail

doAction

public void doAction(LpexView lpexView)
Runs the action. It ensures that our mouse-reselect tracking of mouse events is installed in this view, and lets the editor do its regular blockMarkToMouse action.

Specified by:
doAction in interface LpexAction
Parameters:
lpexView - the document view in which the action is issued

available

public boolean available(LpexView lpexView)
Returns the availability of this action. This action can be run whenever editor's default blockMarkToMouse can.

Specified by:
available in interface LpexAction
Parameters:
lpexView - the document view for which the action availability is queried

SWT LPEX
v3.0.5

(C) Copyright IBM Corporation 1998, 2005.  All Rights Reserved.