net.sf.latexdraw.instruments
Class MetaShapeCustomiser

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.MetaShapeCustomiser
All Implemented Interfaces:
ActionHandler, Preferenciable, Modifiable, Reinitialisable, UndoHandler

public class MetaShapeCustomiser
extends ShapePropertyCustomiser

This meta-instrument manages the instruments that customises shape properties.

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.

10/31/10

Version:
3.0
Author:
Arnaud BLOUIN

Field Summary
protected  ShapeArcCustomiser arcCustomiser
          This instrument customises the arc parameters.
protected  ShapeArrowCustomiser arrowCustomiser
          This instrument customises the arrows.
protected  ShapeBorderCustomiser borderCustomiser
          This instrument customises the line properties of shapes and the pencil.
protected  ShapeCoordDimCustomiser dimPosCustomiser
          This instrument customises the dimensions and the position.
protected  ShapeDotCustomiser dotCustomiser
          This instrument customises the dot parameters.
protected  ShapeDoubleBorderCustomiser doubleBorderCustomiser
          This instrument customises the double line properties of shapes and the pencil.
protected  ShapeFillingCustomiser fillingCustomiser
          This instrument customises the filling properties of shapes and the pencil.
protected  ShapeGridCustomiser gridCustomiser
          This instrument customises grids and axes.
protected  ShapeRotationCustomiser rotationCustomiser
          This instrument customises the rotation angle.
protected  ShapeShadowCustomiser shadowCustomiser
          This instrument customises the shadow properties of shapes and the pencil.
protected  ShapeAxesCustomiser shapeAxesCustomiser
          This instrument that customises axes.
protected  ShapeGrouper shapeGrouper
          This instrument groups shapes.
protected  TextCustomiser textCustomiser
          This instrument customises the texts.
 
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
MetaShapeCustomiser(UIComposer<?> composer, Hand hand, Pencil pencil)
          Creates the instrument.
 
Method Summary
 void addEventable(Eventable eventable)
          Binds the interaction of the links of the instrument to a Eventable object that produces events used by the interactions.
 void clearEvents()
          Stops the interactions of the instrument and clears all its events waiting for a process.
 ShapeArcCustomiser getArcCustomiser()
           
 ShapeArrowCustomiser getArrowCustomiser()
           
 ShapeAxesCustomiser getAxesCustomiser()
           
 ShapeBorderCustomiser getBorderCustomiser()
           
 ShapeCoordDimCustomiser getDimPosCustomiser()
           
 ShapeDotCustomiser getDotCustomiser()
           
 ShapeDoubleBorderCustomiser getDoubleBorderCustomiser()
           
 ShapeFillingCustomiser getFillingCustomiser()
           
 ShapeGridCustomiser getGridCustomiser()
           
 ShapeRotationCustomiser getRotationCustomiser()
           
 ShapeShadowCustomiser getShadowCustomiser()
           
 ShapeGrouper getShapeGrouper()
           
 TextCustomiser getTextCustomiser()
           
protected  void initialiseLinks()
          Initialises the links of the instrument.
protected  void initialiseWidgets()
          Initialises the widgets of the instrument.
 void setActivated(boolean activated)
          Activates or deactivates 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, update
 
Methods inherited from class org.malai.instrument.WidgetInstrument
getComposer, setActivated
 
Methods inherited from class org.malai.instrument.Instrument
addLink, 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

borderCustomiser

protected ShapeBorderCustomiser borderCustomiser
This instrument customises the line properties of shapes and the pencil.


doubleBorderCustomiser

protected ShapeDoubleBorderCustomiser doubleBorderCustomiser
This instrument customises the double line properties of shapes and the pencil.


shadowCustomiser

protected ShapeShadowCustomiser shadowCustomiser
This instrument customises the shadow properties of shapes and the pencil.


fillingCustomiser

protected ShapeFillingCustomiser fillingCustomiser
This instrument customises the filling properties of shapes and the pencil.


textCustomiser

protected TextCustomiser textCustomiser
This instrument customises the texts.


rotationCustomiser

protected ShapeRotationCustomiser rotationCustomiser
This instrument customises the rotation angle.


arrowCustomiser

protected ShapeArrowCustomiser arrowCustomiser
This instrument customises the arrows.


dotCustomiser

protected ShapeDotCustomiser dotCustomiser
This instrument customises the dot parameters.


arcCustomiser

protected ShapeArcCustomiser arcCustomiser
This instrument customises the arc parameters.


dimPosCustomiser

protected ShapeCoordDimCustomiser dimPosCustomiser
This instrument customises the dimensions and the position.


gridCustomiser

protected ShapeGridCustomiser gridCustomiser
This instrument customises grids and axes.


shapeGrouper

protected ShapeGrouper shapeGrouper
This instrument groups shapes.


shapeAxesCustomiser

protected ShapeAxesCustomiser shapeAxesCustomiser
This instrument that customises axes.

Constructor Detail

MetaShapeCustomiser

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

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

addEventable

public void addEventable(Eventable eventable)
Description copied from class: Instrument
Binds the interaction of the links of the instrument to a Eventable object that produces events used by the interactions.

Overrides:
addEventable in class Instrument
Parameters:
eventable - The eventable object that gathers event used by the interactions.

setActivated

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

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

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.

clearEvents

public void clearEvents()
Description copied from class: Instrument
Stops the interactions of the instrument and clears all its events waiting for a process.

Overrides:
clearEvents in class Instrument

getAxesCustomiser

public ShapeAxesCustomiser getAxesCustomiser()
Returns:
The instrument that customises axes.
Since:
3.0

getGridCustomiser

public ShapeGridCustomiser getGridCustomiser()
Returns:
The instrument that customises grids and axes.
Since:
3.0

getBorderCustomiser

public ShapeBorderCustomiser getBorderCustomiser()
Returns:
The instrument that customises the line properties of shapes.
Since:
3.0

getDoubleBorderCustomiser

public ShapeDoubleBorderCustomiser getDoubleBorderCustomiser()
Returns:
The instrument that customises the double line properties of shapes.
Since:
3.0

getShadowCustomiser

public ShapeShadowCustomiser getShadowCustomiser()
Returns:
The instrument that customises the shadow properties of shapes.
Since:
3.0

getFillingCustomiser

public ShapeFillingCustomiser getFillingCustomiser()
Returns:
The instrument that customises the filling properties of shapes.
Since:
3.0

getTextCustomiser

public TextCustomiser getTextCustomiser()
Returns:
The instrument that customises the texts.
Since:
3.0

getRotationCustomiser

public ShapeRotationCustomiser getRotationCustomiser()
Returns:
The instrument that customises the rotation angle.
Since:
3.0

getArrowCustomiser

public ShapeArrowCustomiser getArrowCustomiser()
Returns:
The instrument that customises the arrows.
Since:
3.0

getDotCustomiser

public ShapeDotCustomiser getDotCustomiser()
Returns:
The instrument that customises the dots.
Since:
3.0

getArcCustomiser

public ShapeArcCustomiser getArcCustomiser()
Returns:
This instrument customises the arc parameters.
Since:
3.0

getDimPosCustomiser

public ShapeCoordDimCustomiser getDimPosCustomiser()
Returns:
This instrument customises the dimensions and the position.
Since:
3.0

getShapeGrouper

public ShapeGrouper getShapeGrouper()
Returns:
the shapeGrouper.
Since:
3.0

initialiseLinks

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

Specified by:
initialiseLinks in class Instrument

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.