CH.ifa.draw.figures
Class ConnectedTextTool

java.lang.Object
  extended by CH.ifa.draw.standard.AbstractTool
      extended by CH.ifa.draw.standard.CreationTool
          extended by CH.ifa.draw.figures.TextTool
              extended by CH.ifa.draw.figures.ConnectedTextTool
All Implemented Interfaces:
Tool

public class ConnectedTextTool
extends TextTool

Tool to create new or edit existing text figures. A new text figure is connected with the clicked figure.

See Also:
TextHolder

Field Summary
 
Fields inherited from class CH.ifa.draw.standard.AbstractTool
fAnchorX, fAnchorY, fView
 
Constructor Summary
ConnectedTextTool(DrawingView view, Figure prototype)
           
 
Method Summary
 void activate()
          If the pressed figure is a TextHolder it can be edited otherwise a new text figure is created.
 void mouseDown(java.awt.event.MouseEvent e, int x, int y)
          If the pressed figure is a TextHolder it can be edited otherwise a new text figure is created.
 
Methods inherited from class CH.ifa.draw.figures.TextTool
beginEdit, deactivate, endEdit, getTypingTarget, isActivated, mouseDrag, mouseUp, setTypingTarget
 
Methods inherited from class CH.ifa.draw.standard.CreationTool
createdFigure, createFigure
 
Methods inherited from class CH.ifa.draw.standard.AbstractTool
drawing, editor, keyDown, mouseMove, view
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectedTextTool

public ConnectedTextTool(DrawingView view,
                         Figure prototype)
Method Detail

mouseDown

public void mouseDown(java.awt.event.MouseEvent e,
                      int x,
                      int y)
If the pressed figure is a TextHolder it can be edited otherwise a new text figure is created.

Specified by:
mouseDown in interface Tool
Overrides:
mouseDown in class TextTool

activate

public void activate()
If the pressed figure is a TextHolder it can be edited otherwise a new text figure is created.

Specified by:
activate in interface Tool
Overrides:
activate in class TextTool