net.sf.latexdraw.instruments
Class Hand

java.lang.Object
  extended by org.malai.instrument.Instrument
      extended by net.sf.latexdraw.instruments.Hand
All Implemented Interfaces:
ActionHandler, Preferenciable, Modifiable, Reinitialisable, UndoHandler

public class Hand
extends Instrument

This instrument allows to manipulate (e.g. move or select) shapes.

This file is part of LaTeXDraw
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

LaTeXDraw is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

05/13/10

Version:
3.0
Author:
Arnaud BLOUIN

Field Summary
protected  ICanvas canvas
          The canvas that contains the shapes to handle.
protected  LMagneticGrid grid
          The magnetic grid used to create shapes.
protected  TextSetter textSetter
          The instrument used to edit texts.
protected  Zoomer zoomer
          The zoomer that is used to give the zoom level to compute coordinates of the created shapes.
 
Fields inherited from class org.malai.instrument.Instrument
activated, eventables, links, modified
 
Constructor Summary
Hand(ICanvas canvas, LMagneticGrid grid, Zoomer zoomer, TextSetter textSetter)
          Creates the Hand instrument.
 
Method Summary
protected  void initialiseLinks()
          Initialises the links of the instrument.
 void interimFeedback()
          Reinitialises the interim feedback of the instrument.
 void setActivated(boolean activated)
          Activates or deactivates the instrument.
 
Methods inherited from class org.malai.instrument.Instrument
addEventable, addLink, clearEvents, getLinks, getSizeLinks, hasLinks, isActivated, isModified, load, onActionAborted, onActionAdded, onActionCancelled, onActionDone, onActionExecuted, onUndoableAdded, onUndoableRedo, onUndoableUndo, reinit, removeLink, save, setModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

canvas

protected ICanvas canvas
The canvas that contains the shapes to handle.


grid

protected LMagneticGrid grid
The magnetic grid used to create shapes.


zoomer

protected Zoomer zoomer
The zoomer that is used to give the zoom level to compute coordinates of the created shapes.


textSetter

protected TextSetter textSetter
The instrument used to edit texts.

Constructor Detail

Hand

public Hand(ICanvas canvas,
            LMagneticGrid grid,
            Zoomer zoomer,
            TextSetter textSetter)
Creates the Hand instrument.

Parameters:
canvas - The canvas that contains the shapes to handle.
grid - The magnetic grid used to compute points.
zoomer - The zoomer used to computed points.
textSetter - The instrument used to add texts.
Throws:
java.lang.IllegalArgumentException - If on of the given argument is null.
Since:
3.0
Method Detail

initialiseLinks

protected void initialiseLinks()
Description copied from class: Instrument
Initialises the links of the instrument.

Specified by:
initialiseLinks in class Instrument

setActivated

public void setActivated(boolean activated)
Description copied from class: Instrument
Activates or deactivates the instrument.

Overrides:
setActivated in class Instrument
Parameters:
activated - True = activation.

interimFeedback

public void interimFeedback()
Description copied from class: Instrument
Reinitialises the interim feedback of the instrument. Must be overridden.

Overrides:
interimFeedback in class Instrument