net.sf.latexdraw.instruments
Class TextCustomiser

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

public class TextCustomiser
extends ShapePropertyCustomiser

This instrument modifies texts.

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.

12/27/2010

Since:
3.0
Author:
Arnaud BLOUIN

Field Summary
protected  MToggleButton bButton
          The button that selects the bottom text position.
protected  MToggleButton blButton
          The button that selects the bottom-left text position.
protected  MToggleButton brButton
          The button that selects the bottom-right text position.
protected  MTextArea packagesField
          This text field permits to add latex packages that will be used during compilation.
protected  javax.swing.JLabel packagesLabel
          The label used to explain the goal of the package text field.
protected  MToggleButton tButton
          The button that selects the top text position.
protected  MToggleButton tlButton
          The button that selects the top-left text position.
protected  MToggleButton trButton
          The button that selects the top-right text position.
 
Fields inherited from class net.sf.latexdraw.instruments.ShapePropertyCustomiser
hand, pencil
 
Fields inherited from class org.malai.instrument.WidgetInstrument
composer
 
Fields inherited from class org.malai.instrument.Instrument
activated, eventables, links, modified
 
Constructor Summary
TextCustomiser(UIComposer<?> composer, Hand hand, Pencil pencil)
          Creates the instrument.
 
Method Summary
 MToggleButton getBButton()
           
 MToggleButton getBlButton()
           
 MToggleButton getBrButton()
           
 MTextArea getPackagesField()
           
 javax.swing.JLabel getPackagesLabel()
           
 MToggleButton getTButton()
           
 MToggleButton getTlButton()
           
 MToggleButton getTrButton()
           
protected  void initialiseLinks()
          Initialises the links of the instrument.
protected  void initialiseWidgets()
          Initialises the widgets of the instrument.
protected  void setWidgetsVisible(boolean visible)
          Sets the widgets of the instrument visible or not.
protected  void update(IShape shape)
          Updates the widgets using the given shape.
 
Methods inherited from class net.sf.latexdraw.instruments.ShapePropertyCustomiser
getHand, getPencil, onActionExecuted, onUndoableRedo, onUndoableUndo, setActivated, update
 
Methods inherited from class org.malai.instrument.WidgetInstrument
getComposer, setActivated
 
Methods inherited from class org.malai.instrument.Instrument
addEventable, addLink, clearEvents, getLinks, getSizeLinks, hasLinks, interimFeedback, isActivated, isModified, load, onActionAborted, onActionAdded, onActionCancelled, onActionDone, onUndoableAdded, reinit, removeLink, save, setModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blButton

protected MToggleButton blButton
The button that selects the bottom-left text position.


bButton

protected MToggleButton bButton
The button that selects the bottom text position.


brButton

protected MToggleButton brButton
The button that selects the bottom-right text position.


tlButton

protected MToggleButton tlButton
The button that selects the top-left text position.


tButton

protected MToggleButton tButton
The button that selects the top text position.


trButton

protected MToggleButton trButton
The button that selects the top-right text position.


packagesLabel

protected javax.swing.JLabel packagesLabel
The label used to explain the goal of the package text field.


packagesField

protected MTextArea packagesField
This text field permits to add latex packages that will be used during compilation.

Constructor Detail

TextCustomiser

public TextCustomiser(UIComposer<?> composer,
                      Hand hand,
                      Pencil pencil)
Creates the instrument.

Parameters:
composer - The composer that manages the widgets of the instrument.
hand - The Hand instrument.
pencil - The Pencil instrument.
Throws:
java.lang.IllegalArgumentException - If one of the given parameters is null.
Since:
3.0
Method Detail

initialiseWidgets

protected void initialiseWidgets()
Description copied from class: WidgetInstrument
Initialises the widgets of the instrument.

Specified by:
initialiseWidgets in class WidgetInstrument

setWidgetsVisible

protected void setWidgetsVisible(boolean visible)
Description copied from class: ShapePropertyCustomiser
Sets the widgets of the instrument visible or not.

Specified by:
setWidgetsVisible in class ShapePropertyCustomiser
Parameters:
visible - True: they are visible.

update

protected void update(IShape shape)
Description copied from class: ShapePropertyCustomiser
Updates the widgets using the given shape.

Specified by:
update in class ShapePropertyCustomiser
Parameters:
shape - The shape used to update the widgets. If null, nothing is performed.

initialiseLinks

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

Specified by:
initialiseLinks in class Instrument

getBlButton

public MToggleButton getBlButton()
Returns:
The button that selects the bottom-left text position.
Since:
3.0

getBButton

public MToggleButton getBButton()
Returns:
The button that selects the bottom text position.
Since:
3.0

getBrButton

public MToggleButton getBrButton()
Returns:
The button that selects the bottom-right text position.
Since:
3.0

getTlButton

public MToggleButton getTlButton()
Returns:
The button that selects the top-left text position.
Since:
3.0

getTButton

public MToggleButton getTButton()
Returns:
The button that selects the top text position.
Since:
3.0

getTrButton

public MToggleButton getTrButton()
Returns:
The button that selects the top-right text position.
Since:
3.0

getPackagesLabel

public javax.swing.JLabel getPackagesLabel()
Returns:
the packagesLabel.
Since:
3.0

getPackagesField

public MTextArea getPackagesField()
Returns:
the packagesField.
Since:
3.0