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

java.lang.Object
  extended by net.sf.latexdraw.glib.models.impl.LShape
      extended by net.sf.latexdraw.glib.models.impl.LPositionShape
          extended by net.sf.latexdraw.glib.models.impl.LRectangularShape
              extended by net.sf.latexdraw.glib.models.impl.LEllipse
                  extended by net.sf.latexdraw.glib.models.impl.LArc
All Implemented Interfaces:
Arcable, IArc, IArrowable, IEllipse, IPositionShape, IRectangularShape, IShape, Modifiable
Direct Known Subclasses:
LCircleArc

 class LArc
extends LEllipse
implements IArc

Defines a model of an arc.

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/13/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.IShape
IShape.BorderPos, IShape.FillingStyle, IShape.LineStyle, IShape.Position
 
Nested classes/interfaces inherited from interface net.sf.latexdraw.glib.models.interfaces.Arcable
Arcable.ArcStyle
 
Field Summary
protected  double endAngle
          The end angle of the arc.
protected  double startAngle
          The start angle of the arc.
protected  Arcable.ArcStyle style
          The style of the arc.
 
Fields inherited from class net.sf.latexdraw.glib.models.impl.LShape
arrows, bordersPosition, dashSepBlack, dashSepWhite, dbleBordCol, dbleBordSep, dotSep, fillingCol, fillingStyle, gradAngle, gradColEnd, gradColStart, gradMidPt, hasDbleBord, hasShadow, hatchingsAngle, hatchingsCol, hatchingsSep, hatchingsWidth, id, lineColour, lineStyle, modified, opacity, points, rotationAngle, shadowAngle, shadowCol, shadowSize, showPts, thickness
 
Fields inherited from interface net.sf.latexdraw.glib.models.interfaces.IShape
GOLDEN_ANGLE, PPC
 
Constructor Summary
protected LArc(boolean isUniqueID)
          Creates an arc with radius 1.
protected LArc(IPoint tl, IPoint br, boolean isUniqueID)
          Creates an arc.
 
Method Summary
 void copy(IShape sh)
          Copies a shape using another.
 IArc duplicate()
          Creates a duplicate of the shape (however id are not the same).
 double getAngleEnd()
           
 double getAngleStart()
           
 Arcable.ArcStyle getArcStyle()
           
 IPoint getEndPoint()
           
 IPoint getStartPoint()
           
 boolean isArrowable()
           
 boolean isParametersEquals(IShape sh, boolean considerShadow)
          Checks if the parameters of the shapes are equals.
 void setAngleEnd(double angleEnd)
           
 void setAngleStart(double angleStart)
           
 void setArcStyle(Arcable.ArcStyle type)
           
 
Methods inherited from class net.sf.latexdraw.glib.models.impl.LEllipse
getA, getB, getIntersection, getRx, getRy, setCentre, setRx, setRy
 
Methods inherited from class net.sf.latexdraw.glib.models.impl.LRectangularShape
getHeight, getWidth, isBordersMovable, isDbleBorderable, isFillable, isInteriorStylable, isLineStylable, isShadowable, isThicknessable, setHeight, setWidth
 
Methods inherited from class net.sf.latexdraw.glib.models.impl.LPositionShape
getPosition, getX, getY, setPosition, setPosition, setX, setY
 
Methods inherited from class net.sf.latexdraw.glib.models.impl.LShape
addToRotationAngle, copyArrows, copyPoints, getArrowAt, getArrowInset, getArrowLength, getArrowLine, getArrows, getArrowSizeDim, getArrowSizeNum, getArrowStyle, getBorderGap, getBordersPosition, getBottomLeftPoint, getBottomRightPoint, getBracketNum, getDashSepBlack, getDashSepWhite, getDbleBordCol, getDbleBordSep, getDotSep, getDotSizeDim, getDotSizeNum, getFillingCol, getFillingStyle, getFullBottomRightPoint, getFullTopLeftPoint, getGradAngle, getGradColEnd, getGradColStart, getGradMidPt, getGravityCentre, getHatchingsAngle, getHatchingsCol, getHatchingsSep, getHatchingsWidth, getId, getLineColour, getLineStyle, getNbPoints, getOpacity, getPoints, getPtAt, getRBracketNum, getRotationAngle, getShadowAngle, getShadowCol, getShadowGap, getShadowSize, getTBarSizeDim, getTBarSizeNum, getThickness, getTopLeftPoint, getTopRightPoint, hasDbleBord, hasGradient, hasHatchings, hasShadow, isColourable, isFilled, isModified, isShowPts, isShowPtsable, mirrorHorizontal, mirrorVertical, rotate, scale, scaleSetPoints, setArrowInset, setArrowLength, setArrowSizeDim, setArrowSizeNum, setArrowStyle, setBordersPosition, setBracketNum, setDashSepBlack, setDashSepWhite, setDbleBordCol, setDbleBordSep, setDotSep, setDotSizeDim, setDotSizeNum, setFilled, setFillingCol, setFillingStyle, setGradAngle, setGradColEnd, setGradColStart, setGradMidPt, setHasDbleBord, setHasShadow, setHatchingsAngle, setHatchingsCol, setHatchingsSep, setHatchingsWidth, setId, setLineColour, setLineStyle, setModified, setNewId, setOpacity, setRBracketNum, setRotationAngle, setShadowAngle, setShadowCol, setShadowSize, setShowPts, setTBarSizeDim, setTBarSizeNum, setThickness, shadowFillsShape, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IEllipse
getA, getB, getIntersection, getRx, getRy, setCentre, setRx, setRy
 
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IRectangularShape
getHeight, getWidth, setHeight, setWidth
 
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IPositionShape
getPosition, getX, getY, setPosition, setPosition, setX, setY
 
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IShape
addToRotationAngle, getArrowAt, getArrowLine, getArrows, getArrowStyle, getBorderGap, getBordersPosition, getBottomLeftPoint, getBottomRightPoint, getDashSepBlack, getDashSepWhite, getDbleBordCol, getDbleBordSep, getDotSep, getFillingCol, getFillingStyle, getFullBottomRightPoint, getFullTopLeftPoint, getGradAngle, getGradColEnd, getGradColStart, getGradMidPt, getGravityCentre, getHatchingsAngle, getHatchingsCol, getHatchingsSep, getHatchingsWidth, getId, getLineColour, getLineStyle, getNbPoints, getOpacity, getPoints, getPtAt, getRotationAngle, getShadowAngle, getShadowCol, getShadowGap, getShadowSize, getThickness, getTopLeftPoint, getTopRightPoint, hasDbleBord, hasGradient, hasHatchings, hasShadow, isBordersMovable, isColourable, isDbleBorderable, isFillable, isFilled, isInteriorStylable, isLineStylable, isShadowable, isShowPts, isShowPtsable, isThicknessable, mirrorHorizontal, mirrorVertical, rotate, scale, setArrowStyle, setBordersPosition, setDashSepBlack, setDashSepWhite, setDbleBordCol, setDbleBordSep, setDotSep, setFilled, setFillingCol, setFillingStyle, setGradAngle, setGradColEnd, setGradColStart, setGradMidPt, setHasDbleBord, setHasShadow, setHatchingsAngle, setHatchingsCol, setHatchingsSep, setHatchingsWidth, setId, setLineColour, setLineStyle, setNewId, setOpacity, setRotationAngle, setShadowAngle, setShadowCol, setShadowSize, setShowPts, setThickness, shadowFillsShape, translate
 
Methods inherited from interface org.malai.properties.Modifiable
isModified, setModified
 
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IArrowable
getArrowInset, getArrowLength, getArrowSizeDim, getArrowSizeNum, getBracketNum, getDotSizeDim, getDotSizeNum, getRBracketNum, getTBarSizeDim, getTBarSizeNum, setArrowInset, setArrowLength, setArrowSizeDim, setArrowSizeNum, setBracketNum, setDotSizeDim, setDotSizeNum, setRBracketNum, setTBarSizeDim, setTBarSizeNum
 

Field Detail

style

protected Arcable.ArcStyle style
The style of the arc.


startAngle

protected double startAngle
The start angle of the arc. In radian.


endAngle

protected double endAngle
The end angle of the arc. In radian.

Constructor Detail

LArc

protected LArc(boolean isUniqueID)
Creates an arc with radius 1.

Parameters:
isUniqueID - True: the model will have a unique ID.
Since:
3.0

LArc

protected LArc(IPoint tl,
               IPoint br,
               boolean isUniqueID)
Creates an arc.

Parameters:
tl - The top-left point of the arc.
br - The bottom-right point of the arc.
isUniqueID - True: the arc will have a unique ID.
Throws:
java.lang.IllegalArgumentException - If a or b is not valid.
Method Detail

duplicate

public IArc duplicate()
Description copied from interface: IShape
Creates a duplicate of the shape (however id are not the same).

Specified by:
duplicate in interface IArc
Specified by:
duplicate in interface IEllipse
Specified by:
duplicate in interface IShape
Overrides:
duplicate in class LEllipse
Returns:
The duplicata.

copy

public void copy(IShape sh)
Description copied from interface: IShape
Copies a shape using another.

Specified by:
copy in interface IShape
Overrides:
copy in class LShape
Parameters:
sh - The shape to copy.

getAngleEnd

public double getAngleEnd()
Specified by:
getAngleEnd in interface Arcable
Returns:
the angleEnd.

getAngleStart

public double getAngleStart()
Specified by:
getAngleStart in interface Arcable
Returns:
the angleStart.

getEndPoint

public IPoint getEndPoint()
Specified by:
getEndPoint in interface IArc
Returns:
The coordinate of the end point of the arc.

getStartPoint

public IPoint getStartPoint()
Specified by:
getStartPoint in interface IArc
Returns:
The coordinate of the start point of the arc.

getArcStyle

public Arcable.ArcStyle getArcStyle()
Specified by:
getArcStyle in interface Arcable
Returns:
the style of the arc.

setAngleEnd

public void setAngleEnd(double angleEnd)
Specified by:
setAngleEnd in interface Arcable
Parameters:
angleEnd - the angleEnd to set.

setAngleStart

public void setAngleStart(double angleStart)
Specified by:
setAngleStart in interface Arcable
Parameters:
angleStart - the angleStart to set.

setArcStyle

public void setArcStyle(Arcable.ArcStyle type)
Specified by:
setArcStyle in interface Arcable
Parameters:
type - the arc style to set.

isArrowable

public boolean isArrowable()
Specified by:
isArrowable in interface IShape
Overrides:
isArrowable in class LShape
Returns:
True if the shape can have arrows.

isParametersEquals

public boolean isParametersEquals(IShape sh,
                                  boolean considerShadow)
Description copied from interface: IShape
Checks if the parameters of the shapes are equals.

Specified by:
isParametersEquals in interface IShape
Overrides:
isParametersEquals in class LShape
Parameters:
sh - The shape to compare.
considerShadow - True if the parameters of the shadows must be considered.
Returns:
True if the parameters are equals.