net.sf.latexdraw.instruments
Class ShapeArrowCustomiser

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

public class ShapeArrowCustomiser
extends ShapePropertyCustomiser

This instrument customises the arrows of shapes or of the pencil.

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.

08/05/2011

Since:
3.0
Author:
Arnaud BLOUIN

Field Summary
protected  MSpinner arrowInset
          The field to set the arrow inset parameter of arrows.
protected  MComboBox arrowLeftCB
          Allows to change the style of the left-end of the shape.
protected  MSpinner arrowLength
          The field to set the arrow length parameter of arrows.
protected  MComboBox arrowRightCB
          Allows to change the style of the right-end of the shape.
protected  MSpinner arrowSizeDim
          The field to set the arrows size dim parameter of arrows.
protected  MSpinner arrowSizeNum
          The field to set the arrow size num parameter of arrows.
protected  MSpinner bracketNum
          The field to set the bracket num parameter of arrows.
protected  MSpinner dotSizeDim
          The field to set the dot size dim parameter of arrows.
protected  MSpinner dotSizeNum
          The field to set the dot size num parameter of arrows.
protected  MSpinner rbracketNum
          The field to set the rounded bracket num parameter of arrows.
protected  MSpinner tbarsizeDim
          The field to set the t bar size dim parameter of arrows.
protected  MSpinner tbarsizeNum
          The field to set the t bar size num parameter of arrows.
 
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
ShapeArrowCustomiser(UIComposer<?> composer, Hand hand, Pencil pencil)
          Creates the instrument.
 
Method Summary
static MComboBox createLeftArrowStyleList()
          Creates a list of the different styles of arrowhead (left).
static MComboBox createRightArrowStyleList()
          Creates a list of the different styles of arrowhead (right).
 MSpinner getArrowInset()
           
 MComboBox getArrowLeftCB()
           
 MSpinner getArrowLength()
           
 MComboBox getArrowRightCB()
           
 MSpinner getArrowSizeDim()
           
 MSpinner getArrowSizeNum()
           
 MSpinner getBracketNum()
           
 MSpinner getDotSizeDim()
           
 MSpinner getDotSizeNum()
           
 MSpinner getRbracketNum()
           
 MSpinner getTbarsizeDim()
           
 MSpinner getTbarsizeNum()
           
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

arrowLeftCB

protected MComboBox arrowLeftCB
Allows to change the style of the left-end of the shape.


arrowRightCB

protected MComboBox arrowRightCB
Allows to change the style of the right-end of the shape.


dotSizeNum

protected MSpinner dotSizeNum
The field to set the dot size num parameter of arrows.


dotSizeDim

protected MSpinner dotSizeDim
The field to set the dot size dim parameter of arrows.


bracketNum

protected MSpinner bracketNum
The field to set the bracket num parameter of arrows.


rbracketNum

protected MSpinner rbracketNum
The field to set the rounded bracket num parameter of arrows.


tbarsizeNum

protected MSpinner tbarsizeNum
The field to set the t bar size num parameter of arrows.


tbarsizeDim

protected MSpinner tbarsizeDim
The field to set the t bar size dim parameter of arrows.


arrowSizeDim

protected MSpinner arrowSizeDim
The field to set the arrows size dim parameter of arrows.


arrowSizeNum

protected MSpinner arrowSizeNum
The field to set the arrow size num parameter of arrows.


arrowLength

protected MSpinner arrowLength
The field to set the arrow length parameter of arrows.


arrowInset

protected MSpinner arrowInset
The field to set the arrow inset parameter of arrows.

Constructor Detail

ShapeArrowCustomiser

public ShapeArrowCustomiser(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 argument is null or if the drawing cannot be accessed from the hand.
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

createRightArrowStyleList

public static MComboBox createRightArrowStyleList()
Creates a list of the different styles of arrowhead (right).

Returns:
The created list.

createLeftArrowStyleList

public static MComboBox createLeftArrowStyleList()
Creates a list of the different styles of arrowhead (left).

Returns:
The created list.

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.

initialiseLinks

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

Specified by:
initialiseLinks in class Instrument

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.

getArrowLeftCB

public MComboBox getArrowLeftCB()
Returns:
The left arrow style combo box.
Since:
3.0

getArrowRightCB

public MComboBox getArrowRightCB()
Returns:
The right arrow style combo box.
Since:
3.0

getDotSizeNum

public MSpinner getDotSizeNum()
Returns:
the dotSizeNum.
Since:
3.0

getDotSizeDim

public MSpinner getDotSizeDim()
Returns:
the dotSizeDim.
Since:
3.0

getBracketNum

public MSpinner getBracketNum()
Returns:
the bracketNum.
Since:
3.0

getRbracketNum

public MSpinner getRbracketNum()
Returns:
the rbracketNum.
Since:
3.0

getTbarsizeNum

public MSpinner getTbarsizeNum()
Returns:
the tbarsizeNum.
Since:
3.0

getTbarsizeDim

public MSpinner getTbarsizeDim()
Returns:
the tbarsizeDim.
Since:
3.0

getArrowSizeDim

public MSpinner getArrowSizeDim()
Returns:
the arrowSizeDim.
Since:
3.0

getArrowSizeNum

public MSpinner getArrowSizeNum()
Returns:
the arrowSizeNum.
Since:
3.0

getArrowLength

public MSpinner getArrowLength()
Returns:
the arrowLength.
Since:
3.0

getArrowInset

public MSpinner getArrowInset()
Returns:
the arrowInset.
Since:
3.0