net.sf.latexdraw.glib.models.impl
Class LArrow

java.lang.Object
  extended by net.sf.latexdraw.glib.models.impl.LArrow
All Implemented Interfaces:
IArrow, IArrowable

 class LArrow
extends java.lang.Object
implements IArrow

Defines a model of an arrow.

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.

02/14/2008

Since:
3.0
Version:
3.0
Author:
Arnaud BLOUIN

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sf.latexdraw.glib.models.interfaces.IArrow
IArrow.ArrowStyle
 
Field Summary
protected  double arrowInset
          The inset of the arrow.
protected  double arrowLength
          The length of the arrow.
protected  double arrowSizeDim
          The latex parameter arrowSize num.
protected  double arrowSizeNum
          The latex parameter arrowSize num.
protected  double bracketNum
          The latex parameter bracket num.
protected  double dotSizeDim
          The latex parameter dotsize dim.
protected  double dotSizeNum
          The latex parameter dotsize num.
protected  IShape owner
          The owner of the arrow.
protected  double rBracketNum
          The latex parameter rbracket num.
protected  IArrow.ArrowStyle style
          The style of the arrow.
protected  double tBarSizeDim
          The latex parameter tbarsize num.
protected  double tBarSizeNum
          The latex parameter tbarsize num.
 
Constructor Summary
protected LArrow(IArrow arrow, IShape owner)
          Creates an arrow from an other arrow.
protected LArrow(IShape owner)
          Creates an arrow.
 
Method Summary
 void copy(IArrow model)
          Copies the parameters of the given arrow to the current arrow.
 double getArrowInset()
           
 double getArrowLength()
           
 ILine getArrowLine()
           
 double getArrowShapedWidth()
           
 double getArrowSizeDim()
           
 double getArrowSizeNum()
           
 IArrow.ArrowStyle getArrowStyle()
           
 double getBarShapedArrowWidth()
           
 double getBracketNum()
           
 double getBracketShapedArrowLength()
           
 double getDotSizeDim()
           
 double getDotSizeNum()
           
 IPoint getPosition()
           
 double getRBracketNum()
           
 double getRoundShapedArrowRadius()
           
 IShape getShape()
           
 double getTBarSizeDim()
           
 double getTBarSizeNum()
           
 boolean hasStyle()
           
 boolean isInverted()
           
 boolean isLeftArrow()
           
 void setArrowInset(double inset)
          Defines the inset of the arrow.
 void setArrowLength(double lgth)
          Defines the length of the arrow.
 void setArrowSizeDim(double arrowSizeDim)
          Sets the latex parameter arrowSize num.
 void setArrowSizeNum(double arrowSizeNum)
          Sets the latex parameter arrowSize num.
 void setArrowStyle(IArrow.ArrowStyle arrowStyle)
          Defines the style of the arrow.
 void setBracketNum(double bracketNum)
          Sets the latex parameter bracket num.
 void setDotSizeDim(double dotSizeDim)
          Sets the latex parameter dotsize dim.
 void setDotSizeNum(double dotSizeNum)
          Sets the latex parameter dotsize num.
 void setRBracketNum(double rBracketNum)
          Sets the latex parameter rbracket num.
 void setShape(IShape shape)
          Defines the shape that contains the arrow.
 void setTBarSizeDim(double tbarSizeDim)
          Sets the latex parameter tbarsize num.
 void setTBarSizeNum(double tBarSizeNum)
          Sets the latex parameter tbarsize num.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

style

protected IArrow.ArrowStyle style
The style of the arrow.


arrowSizeDim

protected double arrowSizeDim
The latex parameter arrowSize num.


arrowSizeNum

protected double arrowSizeNum
The latex parameter arrowSize num.


arrowLength

protected double arrowLength
The length of the arrow.


arrowInset

protected double arrowInset
The inset of the arrow.


dotSizeDim

protected double dotSizeDim
The latex parameter dotsize dim.


dotSizeNum

protected double dotSizeNum
The latex parameter dotsize num.


tBarSizeDim

protected double tBarSizeDim
The latex parameter tbarsize num.


tBarSizeNum

protected double tBarSizeNum
The latex parameter tbarsize num.


bracketNum

protected double bracketNum
The latex parameter bracket num.


rBracketNum

protected double rBracketNum
The latex parameter rbracket num.


owner

protected IShape owner
The owner of the arrow.

Constructor Detail

LArrow

protected LArrow(IShape owner)
Creates an arrow.

Parameters:
owner - The shape that contains the arrow.

LArrow

protected LArrow(IArrow arrow,
                 IShape owner)
Creates an arrow from an other arrow.

Parameters:
arrow - The arrow to copy.
Throws:
java.lang.IllegalArgumentException - If the given arrow is null.
Method Detail

copy

public void copy(IArrow model)
Description copied from interface: IArrow
Copies the parameters of the given arrow to the current arrow. The owner of the arrow to copy is not copied to the current arrow.

Specified by:
copy in interface IArrow
Parameters:
model - The arrow to copy. Cannot be null.

getRoundShapedArrowRadius

public double getRoundShapedArrowRadius()
Specified by:
getRoundShapedArrowRadius in interface IArrow
Returns:
The radius of the rounded arrow styles.

getBarShapedArrowWidth

public double getBarShapedArrowWidth()
Specified by:
getBarShapedArrowWidth in interface IArrow
Returns:
The width of the bar arrow styles.

getBracketShapedArrowLength

public double getBracketShapedArrowLength()
Specified by:
getBracketShapedArrowLength in interface IArrow
Returns:
The length of the brackets of bracket arrow styles.

getArrowShapedWidth

public double getArrowShapedWidth()
Specified by:
getArrowShapedWidth in interface IArrow
Returns:
The width of arrow styles.

getArrowLine

public ILine getArrowLine()
Specified by:
getArrowLine in interface IArrow
Returns:
The line that can be used to locate the arrow.

getArrowInset

public double getArrowInset()
Specified by:
getArrowInset in interface IArrowable
Returns:
The inset of the arrow.

getArrowLength

public double getArrowLength()
Specified by:
getArrowLength in interface IArrowable
Returns:
The length of the arrow.

getArrowSizeDim

public double getArrowSizeDim()
Specified by:
getArrowSizeDim in interface IArrowable
Returns:
The arrowsize dim parameter.

getArrowSizeNum

public double getArrowSizeNum()
Specified by:
getArrowSizeNum in interface IArrowable
Returns:
The arrowsize num parameter.

getArrowStyle

public IArrow.ArrowStyle getArrowStyle()
Specified by:
getArrowStyle in interface IArrow
Returns:
The style of the arrow.

getBracketNum

public double getBracketNum()
Specified by:
getBracketNum in interface IArrowable
Returns:
The bracket num parameter.

getDotSizeDim

public double getDotSizeDim()
Specified by:
getDotSizeDim in interface IArrowable
Returns:
The dotsize dim parameter.

getDotSizeNum

public double getDotSizeNum()
Specified by:
getDotSizeNum in interface IArrowable
Returns:
The dotsize num parameter.

getPosition

public IPoint getPosition()
Specified by:
getPosition in interface IArrow
Returns:
The position of the arrow head.

getRBracketNum

public double getRBracketNum()
Specified by:
getRBracketNum in interface IArrowable
Returns:
The rbracket parameter.

getShape

public IShape getShape()
Specified by:
getShape in interface IArrow
Returns:
The shape that contains the arrow.

getTBarSizeDim

public double getTBarSizeDim()
Specified by:
getTBarSizeDim in interface IArrowable
Returns:
The tbarsize dim parameter.

getTBarSizeNum

public double getTBarSizeNum()
Specified by:
getTBarSizeNum in interface IArrowable
Returns:
The tbarsize num parameter.

isInverted

public boolean isInverted()
Specified by:
isInverted in interface IArrow
Returns:
True if the arrow if inverted in its shape.

isLeftArrow

public boolean isLeftArrow()
Specified by:
isLeftArrow in interface IArrow
Returns:
True if the arrow is the left arrow of its shape.

hasStyle

public boolean hasStyle()
Specified by:
hasStyle in interface IArrow
Returns:
True if the current arrow has a style.

setArrowInset

public void setArrowInset(double inset)
Description copied from interface: IArrowable
Defines the inset of the arrow.

Specified by:
setArrowInset in interface IArrowable
Parameters:
inset - The new inset.

setArrowLength

public void setArrowLength(double lgth)
Description copied from interface: IArrowable
Defines the length of the arrow.

Specified by:
setArrowLength in interface IArrowable
Parameters:
lgth - The new length of the arrow.

setArrowSizeDim

public void setArrowSizeDim(double arrowSizeDim)
Description copied from interface: IArrowable
Sets the latex parameter arrowSize num.

Specified by:
setArrowSizeDim in interface IArrowable
Parameters:
arrowSizeDim - The new arrowSize num.

setArrowSizeNum

public void setArrowSizeNum(double arrowSizeNum)
Description copied from interface: IArrowable
Sets the latex parameter arrowSize num.

Specified by:
setArrowSizeNum in interface IArrowable
Parameters:
arrowSizeNum - The new arrowSize num.

setArrowStyle

public void setArrowStyle(IArrow.ArrowStyle arrowStyle)
Description copied from interface: IArrow
Defines the style of the arrow.

Specified by:
setArrowStyle in interface IArrow
Parameters:
arrowStyle - The new style of the arrow.

setBracketNum

public void setBracketNum(double bracketNum)
Description copied from interface: IArrowable
Sets the latex parameter bracket num.

Specified by:
setBracketNum in interface IArrowable
Parameters:
bracketNum - The new bracket num.

setDotSizeDim

public void setDotSizeDim(double dotSizeDim)
Description copied from interface: IArrowable
Sets the latex parameter dotsize dim.

Specified by:
setDotSizeDim in interface IArrowable
Parameters:
dotSizeDim - The new dotsize dim.

setDotSizeNum

public void setDotSizeNum(double dotSizeNum)
Description copied from interface: IArrowable
Sets the latex parameter dotsize num.

Specified by:
setDotSizeNum in interface IArrowable
Parameters:
dotSizeNum - The new dotsize num.

setRBracketNum

public void setRBracketNum(double rBracketNum)
Description copied from interface: IArrowable
Sets the latex parameter rbracket num.

Specified by:
setRBracketNum in interface IArrowable
Parameters:
rBracketNum - The new rbracket num.

setTBarSizeDim

public void setTBarSizeDim(double tbarSizeDim)
Description copied from interface: IArrowable
Sets the latex parameter tbarsize num.

Specified by:
setTBarSizeDim in interface IArrowable
Parameters:
tbarSizeDim - The new tbarsize num.

setTBarSizeNum

public void setTBarSizeNum(double tBarSizeNum)
Description copied from interface: IArrowable
Sets the latex parameter tbarsize num.

Specified by:
setTBarSizeNum in interface IArrowable
Parameters:
tBarSizeNum - The new tbarsize num.

setShape

public void setShape(IShape shape)
Description copied from interface: IArrow
Defines the shape that contains the arrow.

Specified by:
setShape in interface IArrow
Parameters:
shape - The new shape. Cannot be null.