Package org.apache.batik.bridge
Class ConcreteTextSelector
- java.lang.Object
-
- org.apache.batik.bridge.ConcreteTextSelector
-
- All Implemented Interfaces:
java.util.EventListener,GraphicsNodeChangeListener,GraphicsNodeKeyListener,GraphicsNodeMouseListener,Selector
public class ConcreteTextSelector extends java.lang.Object implements Selector
A simple implementation of GraphicsNodeMouseListener for text selection.
-
-
Constructor Summary
Constructors Constructor Description ConcreteTextSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSelectionListener(SelectionListener l)Add a SelectionListener to this Selector's notification list.voidchangeCompleted(GraphicsNodeChangeEvent gnce)Invoked when a change on a graphics node has completedvoidchangeStarted(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 voidcheckSelectGesture(GraphicsNodeEvent evt)voidclearSelection()voiddispatchSelectionEvent(SelectionEvent e)Reports whether the current selection contains any objects.java.lang.ObjectgetSelection()Get the contents of the current selection buffer.booleanisEmpty()Reports whether the current selection contains any objects.voidkeyPressed(GraphicsNodeKeyEvent evt)Invoked when a key has been pressed.voidkeyReleased(GraphicsNodeKeyEvent evt)Invoked when a key has been released.voidkeyTyped(GraphicsNodeKeyEvent evt)Invoked when a key has been typed.voidmouseClicked(GraphicsNodeMouseEvent evt)Invoked when the mouse has been clicked on a graphics node.voidmouseDragged(GraphicsNodeMouseEvent evt)Invoked when a mouse button is pressed on a graphics node and then dragged.voidmouseEntered(GraphicsNodeMouseEvent evt)Invoked when the mouse enters a graphics node.voidmouseExited(GraphicsNodeMouseEvent evt)Invoked when the mouse exits a graphics node.voidmouseMoved(GraphicsNodeMouseEvent evt)Invoked when the mouse button has been moved on a node.voidmousePressed(GraphicsNodeMouseEvent evt)Invoked when a mouse button has been pressed on a graphics node.voidmouseReleased(GraphicsNodeMouseEvent evt)Invoked when a mouse button has been released on a graphics node.voidremoveSelectionListener(SelectionListener l)Remove a SelectionListener from this Selector's notification list.voidsetSelection(Mark begin, Mark end)
-
-
-
Method Detail
-
mouseClicked
public void mouseClicked(GraphicsNodeMouseEvent evt)
Description copied from interface:GraphicsNodeMouseListenerInvoked when the mouse has been clicked on a graphics node.- Specified by:
mouseClickedin interfaceGraphicsNodeMouseListener- Parameters:
evt- the graphics node mouse event
-
mouseDragged
public void mouseDragged(GraphicsNodeMouseEvent evt)
Description copied from interface:GraphicsNodeMouseListenerInvoked when a mouse button is pressed on a graphics node and then dragged.- Specified by:
mouseDraggedin interfaceGraphicsNodeMouseListener- Parameters:
evt- the graphics node mouse event
-
mouseEntered
public void mouseEntered(GraphicsNodeMouseEvent evt)
Description copied from interface:GraphicsNodeMouseListenerInvoked when the mouse enters a graphics node.- Specified by:
mouseEnteredin interfaceGraphicsNodeMouseListener- Parameters:
evt- the graphics node mouse event
-
mouseExited
public void mouseExited(GraphicsNodeMouseEvent evt)
Description copied from interface:GraphicsNodeMouseListenerInvoked when the mouse exits a graphics node.- Specified by:
mouseExitedin interfaceGraphicsNodeMouseListener- Parameters:
evt- the graphics node mouse event
-
mouseMoved
public void mouseMoved(GraphicsNodeMouseEvent evt)
Description copied from interface:GraphicsNodeMouseListenerInvoked when the mouse button has been moved on a node.- Specified by:
mouseMovedin interfaceGraphicsNodeMouseListener- Parameters:
evt- the graphics node mouse event
-
mousePressed
public void mousePressed(GraphicsNodeMouseEvent evt)
Description copied from interface:GraphicsNodeMouseListenerInvoked when a mouse button has been pressed on a graphics node.- Specified by:
mousePressedin interfaceGraphicsNodeMouseListener- Parameters:
evt- the graphics node mouse event
-
mouseReleased
public void mouseReleased(GraphicsNodeMouseEvent evt)
Description copied from interface:GraphicsNodeMouseListenerInvoked when a mouse button has been released on a graphics node.- Specified by:
mouseReleasedin interfaceGraphicsNodeMouseListener- Parameters:
evt- the graphics node mouse event
-
keyPressed
public void keyPressed(GraphicsNodeKeyEvent evt)
Description copied from interface:GraphicsNodeKeyListenerInvoked when a key has been pressed.- Specified by:
keyPressedin interfaceGraphicsNodeKeyListener- Parameters:
evt- the graphics node key event
-
keyReleased
public void keyReleased(GraphicsNodeKeyEvent evt)
Description copied from interface:GraphicsNodeKeyListenerInvoked when a key has been released.- Specified by:
keyReleasedin interfaceGraphicsNodeKeyListener- Parameters:
evt- the graphics node key event
-
keyTyped
public void keyTyped(GraphicsNodeKeyEvent evt)
Description copied from interface:GraphicsNodeKeyListenerInvoked when a key has been typed.- Specified by:
keyTypedin interfaceGraphicsNodeKeyListener- Parameters:
evt- the graphics node key event
-
changeStarted
public void changeStarted(GraphicsNodeChangeEvent gnce)
Description copied from interface:GraphicsNodeChangeListenerInvoked when a change has started on a graphics node, but before any changes occure in the graphics node it's self.- Specified by:
changeStartedin interfaceGraphicsNodeChangeListener- Parameters:
gnce- the graphics node change event
-
changeCompleted
public void changeCompleted(GraphicsNodeChangeEvent gnce)
Description copied from interface:GraphicsNodeChangeListenerInvoked when a change on a graphics node has completed- Specified by:
changeCompletedin interfaceGraphicsNodeChangeListener- Parameters:
gnce- the graphics node change event
-
clearSelection
public void clearSelection()
-
checkSelectGesture
protected void checkSelectGesture(GraphicsNodeEvent evt)
-
getSelection
public java.lang.Object getSelection()
Description copied from interface:SelectorGet the contents of the current selection buffer.- Specified by:
getSelectionin interfaceSelector
-
isEmpty
public boolean isEmpty()
Reports whether the current selection contains any objects.
-
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:
addSelectionListenerin interfaceSelector- Parameters:
l- the SelectionListener to add.
-
removeSelectionListener
public void removeSelectionListener(SelectionListener l)
Remove a SelectionListener from this Selector's notification list.- Specified by:
removeSelectionListenerin interfaceSelector- Parameters:
l- the SelectionListener to be removed.
-
-