net.sf.latexdraw.actions
Class InitTextSetter

java.lang.Object
  extended by org.malai.action.Action
      extended by org.malai.action.library.InstrumentAction
          extended by org.malai.action.library.ActivateInstrument
              extended by net.sf.latexdraw.actions.InitTextSetter

public class InitTextSetter
extends ActivateInstrument

This action activates and moves the text setter to a given position.

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.

20/12/2010

Since:
3.0
Author:
Arnaud BLOUIN

Nested Class Summary
 
Nested classes/interfaces inherited from class org.malai.action.Action
Action.ActionStatus
 
Field Summary
protected  IPoint absolutePoint
          The position that does not taks account of the zoom (for the text field).
protected  IPoint relativePoint
          The position that takes account of the zoom.
protected  TextSetter setter
          The text setter to move.
protected  java.lang.String text
          The text to set to the setter.
protected  IText textShape
          The text (shape) to modify throw the setter.
 
Fields inherited from class org.malai.action.library.InstrumentAction
instrument
 
Fields inherited from class org.malai.action.Action
status
 
Constructor Summary
InitTextSetter()
           
 
Method Summary
 boolean canDo()
           
protected  void doActionBody()
          This method contains the core code to execute when the action is executed.
 void flush()
          When an action is no more useful it can be flushes to release the used data.
 boolean isRegisterable()
          Specifies if the action must be saved in the action register.
 void setAbsolutePoint(IPoint pt)
           
 void setRelativePoint(IPoint pt)
           
 void setText(java.lang.String text)
          Sets the text to display into the text setter.
 void setTextSetter(TextSetter textSetter)
           
 void setTextShape(IText textShape)
          Sets the text shape to modify.
 
Methods inherited from class org.malai.action.library.InstrumentAction
getInstrument, setInstrument
 
Methods inherited from class org.malai.action.Action
abort, cancelledBy, doIt, done, getStatus, hadEffect, isDone, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

setter

protected TextSetter setter
The text setter to move.


text

protected java.lang.String text
The text to set to the setter.


relativePoint

protected IPoint relativePoint
The position that takes account of the zoom.


absolutePoint

protected IPoint absolutePoint
The position that does not taks account of the zoom (for the text field).


textShape

protected IText textShape
The text (shape) to modify throw the setter. Can be null.

Constructor Detail

InitTextSetter

public InitTextSetter()
Method Detail

flush

public void flush()
Description copied from class: Action
When an action is no more useful it can be flushes to release the used data. Should be overridden.

Overrides:
flush in class InstrumentAction

setTextShape

public void setTextShape(IText textShape)
Sets the text shape to modify.

Parameters:
textShape - The text (shape) to modify throw the setter. Can be null.
Since:
3.0

setText

public void setText(java.lang.String text)
Sets the text to display into the text setter.

Parameters:
text - The text to set.
Since:
3.0

setTextSetter

public void setTextSetter(TextSetter textSetter)
Parameters:
textSetter - the textSetter to set.
Since:
3.0

isRegisterable

public boolean isRegisterable()
Description copied from class: Action
Specifies if the action must be saved in the action register. For instance, some actions, such as a scroll of the scroll bars, should not be saved nor put in the undo/redo manager. Thus, they must not be registrable.

Overrides:
isRegisterable in class ActivateInstrument
Returns:
True: the action is registrable.

setRelativePoint

public void setRelativePoint(IPoint pt)
Parameters:
pt - The position that takes account of the zoom.
Since:
3.0

setAbsolutePoint

public void setAbsolutePoint(IPoint pt)
Parameters:
pt - The position that does not taks account of the zoom (for the text field).
Since:
3.0

canDo

public boolean canDo()
Overrides:
canDo in class InstrumentAction
Returns:
True if the action can be executed.

doActionBody

protected void doActionBody()
Description copied from class: Action
This method contains the core code to execute when the action is executed.

Overrides:
doActionBody in class ActivateInstrument