org.apache.batik.gvt.text
Class ConcreteTextSelector

java.lang.Object
  extended by org.apache.batik.gvt.text.ConcreteTextSelector
All Implemented Interfaces:
EventListener, GraphicsNodeChangeListener, GraphicsNodeKeyListener, GraphicsNodeMouseListener, Selector

public class ConcreteTextSelector
extends Object
implements Selector

A simple implementation of GraphicsNodeMouseListener for text selection.


Constructor Summary
ConcreteTextSelector()
           
 
Method Summary
 void addSelectionListener(SelectionListener l)
          Add a SelectionListener to this Selector's notification list.
 void changeCompleted(GraphicsNodeChangeEvent gnce)
          Invoked when a change on a graphics node has completed
 void changeStarted(GraphicsNodeChangeEvent gnce)
          Invoked when a change has started on a graphics node, but before any changes occure in the graphics node it's self.
protected  void checkSelectGesture(GraphicsNodeEvent evt)
           
 void clearSelection()
           
 void dispatchSelectionEvent(SelectionEvent e)
          Reports whether the current selection contains any objects.
 Object getSelection()
          Get the contents of the current selection buffer.
 boolean isEmpty()
          Reports whether the current selection contains any objects.
 void keyPressed(GraphicsNodeKeyEvent evt)
          Invoked when a key has been pressed.
 void keyReleased(GraphicsNodeKeyEvent evt)
          Invoked when a key has been released.
 void keyTyped(GraphicsNodeKeyEvent evt)
          Invoked when a key has been typed.
 void mouseClicked(GraphicsNodeMouseEvent evt)
          Invoked when the mouse has been clicked on a graphics node.
 void mouseDragged(GraphicsNodeMouseEvent evt)
          Invoked when a mouse button is pressed on a graphics node and then dragged.
 void mouseEntered(GraphicsNodeMouseEvent evt)
          Invoked when the mouse enters a graphics node.
 void mouseExited(GraphicsNodeMouseEvent evt)
          Invoked when the mouse exits a graphics node.
 void mouseMoved(GraphicsNodeMouseEvent evt)
          Invoked when the mouse button has been moved on a node.
 void mousePressed(GraphicsNodeMouseEvent evt)
          Invoked when a mouse button has been pressed on a graphics node.
 void mouseReleased(GraphicsNodeMouseEvent evt)
          Invoked when a mouse button has been released on a graphics node.
 void removeSelectionListener(SelectionListener l)
          Remove a SelectionListener from this Selector's notification list.
 void setSelection(Mark begin, Mark end)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcreteTextSelector

public ConcreteTextSelector()
Method Detail

mouseClicked

public void mouseClicked(GraphicsNodeMouseEvent evt)
Description copied from interface: GraphicsNodeMouseListener
Invoked when the mouse has been clicked on a graphics node.

Specified by:
mouseClicked in interface GraphicsNodeMouseListener
Parameters:
evt - the graphics node mouse event

mouseDragged

public void mouseDragged(GraphicsNodeMouseEvent evt)
Description copied from interface: GraphicsNodeMouseListener
Invoked when a mouse button is pressed on a graphics node and then dragged.

Specified by:
mouseDragged in interface GraphicsNodeMouseListener
Parameters:
evt - the graphics node mouse event

mouseEntered

public void mouseEntered(GraphicsNodeMouseEvent evt)
Description copied from interface: GraphicsNodeMouseListener
Invoked when the mouse enters a graphics node.

Specified by:
mouseEntered in interface GraphicsNodeMouseListener
Parameters:
evt - the graphics node mouse event

mouseExited

public void mouseExited(GraphicsNodeMouseEvent evt)
Description copied from interface: GraphicsNodeMouseListener
Invoked when the mouse exits a graphics node.

Specified by:
mouseExited in interface GraphicsNodeMouseListener
Parameters:
evt - the graphics node mouse event

mouseMoved

public void mouseMoved(GraphicsNodeMouseEvent evt)
Description copied from interface: GraphicsNodeMouseListener
Invoked when the mouse button has been moved on a node.

Specified by:
mouseMoved in interface GraphicsNodeMouseListener
Parameters:
evt - the graphics node mouse event

mousePressed

public void mousePressed(GraphicsNodeMouseEvent evt)
Description copied from interface: GraphicsNodeMouseListener
Invoked when a mouse button has been pressed on a graphics node.

Specified by:
mousePressed in interface GraphicsNodeMouseListener
Parameters:
evt - the graphics node mouse event

mouseReleased

public void mouseReleased(GraphicsNodeMouseEvent evt)
Description copied from interface: GraphicsNodeMouseListener
Invoked when a mouse button has been released on a graphics node.

Specified by:
mouseReleased in interface GraphicsNodeMouseListener
Parameters:
evt - the graphics node mouse event

keyPressed

public void keyPressed(GraphicsNodeKeyEvent evt)
Description copied from interface: GraphicsNodeKeyListener
Invoked when a key has been pressed.

Specified by:
keyPressed in interface GraphicsNodeKeyListener
Parameters:
evt - the graphics node key event

keyReleased

public void keyReleased(GraphicsNodeKeyEvent evt)
Description copied from interface: GraphicsNodeKeyListener
Invoked when a key has been released.

Specified by:
keyReleased in interface GraphicsNodeKeyListener
Parameters:
evt - the graphics node key event

keyTyped

public void keyTyped(GraphicsNodeKeyEvent evt)
Description copied from interface: GraphicsNodeKeyListener
Invoked when a key has been typed.

Specified by:
keyTyped in interface GraphicsNodeKeyListener
Parameters:
evt - the graphics node key event

changeStarted

public void changeStarted(GraphicsNodeChangeEvent gnce)
Description copied from interface: GraphicsNodeChangeListener
Invoked when a change has started on a graphics node, but before any changes occure in the graphics node it's self.

Specified by:
changeStarted in interface GraphicsNodeChangeListener
Parameters:
gnce - the graphics node change event

changeCompleted

public void changeCompleted(GraphicsNodeChangeEvent gnce)
Description copied from interface: GraphicsNodeChangeListener
Invoked when a change on a graphics node has completed

Specified by:
changeCompleted in interface GraphicsNodeChangeListener
Parameters:
gnce - the graphics node change event

setSelection

public void setSelection(Mark begin,
                         Mark end)

clearSelection

public void clearSelection()

checkSelectGesture

protected void checkSelectGesture(GraphicsNodeEvent evt)

getSelection

public Object getSelection()
Description copied from interface: Selector
Get the contents of the current selection buffer.

Specified by:
getSelection in interface Selector

isEmpty

public boolean isEmpty()
Reports whether the current selection contains any objects.

Specified by:
isEmpty in interface Selector

dispatchSelectionEvent

public void dispatchSelectionEvent(SelectionEvent e)
Reports whether the current selection contains any objects.


addSelectionListener

public void addSelectionListener(SelectionListener l)
Add a SelectionListener to this Selector's notification list.

Specified by:
addSelectionListener in interface Selector
Parameters:
l - the SelectionListener to add.

removeSelectionListener

public void removeSelectionListener(SelectionListener l)
Remove a SelectionListener from this Selector's notification list.

Specified by:
removeSelectionListener in interface Selector
Parameters:
l - the SelectionListener to be removed.


Copyright © 2008 Apache Software Foundation. All Rights Reserved.