|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.malai.instrument.Instrument
net.sf.latexdraw.instruments.TextSetter
public class TextSetter
This instrument allows to add and modify texts to the drawing.
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
Field Summary | |
---|---|
protected MLayeredPane |
layeredPanel
The pane where the text field must be added. |
protected Pencil |
pencil
The pencil used to create shapes. |
protected IPoint |
relativePoint
The point where texts are added. |
protected IText |
text
The text to modify throw this instrument. |
protected TextAreaAutoSize |
textField
The text field. |
Fields inherited from class org.malai.instrument.Instrument |
---|
activated, eventables, links, modified |
Constructor Summary | |
---|---|
TextSetter(MLayeredPane overlayedPanel)
Creates the instrument. |
Method Summary | |
---|---|
TextAreaAutoSize |
getTextField()
|
protected void |
initialiseLinks()
Initialises the links of the instrument. |
void |
setActivated(boolean activated)
Activates or deactivates the instrument. |
void |
setPencil(Pencil pencil)
|
void |
setRelativePoint(IPoint relativePoint)
|
void |
setText(IText text)
Sets the text to modify throw this instrument. |
Methods inherited from class org.malai.instrument.Instrument |
---|
addEventable, addLink, clearEvents, getLinks, getSizeLinks, hasLinks, interimFeedback, 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 |
---|
protected TextAreaAutoSize textField
protected MLayeredPane layeredPanel
protected Pencil pencil
protected IPoint relativePoint
protected IText text
Constructor Detail |
---|
public TextSetter(MLayeredPane overlayedPanel)
overlayedPanel
- The pane where the text field must be added.
java.lang.IllegalArgumentException
- If the given panel is null.Method Detail |
---|
public void setText(IText text)
text
- The text to modify. Can be null (a new text will be created).public void setPencil(Pencil pencil)
pencil
- The pencil to set to the text setter.protected void initialiseLinks()
Instrument
initialiseLinks
in class Instrument
public void setActivated(boolean activated)
Instrument
setActivated
in class Instrument
activated
- True = activation.public TextAreaAutoSize getTextField()
public void setRelativePoint(IPoint relativePoint)
relativePoint
- The point where texts are added. It may not corresponds with the location
of the text field since the text field position is absolute (does not consider
the zoom level).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |