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

java.lang.Object
  extended by net.sf.latexdraw.glib.models.impl.LShape
      extended by net.sf.latexdraw.glib.models.impl.LModifiablePointsShape
          extended by net.sf.latexdraw.glib.models.impl.LAbstractCtrlPointShape
              extended by net.sf.latexdraw.glib.models.impl.LBezierCurve
All Implemented Interfaces:
IArrowable, IBezierCurve, IControlPointShape, IModifiablePointsShape, IShape, Modifiable

 class LBezierCurve
extends LAbstractCtrlPointShape
implements IBezierCurve

Defines a model of a Bezier curve.

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.

07/05/2009

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
 
Field Summary
protected  boolean isClosed
          Defines if the curve is closed.
 
Fields inherited from class net.sf.latexdraw.glib.models.impl.LAbstractCtrlPointShape
balanceGap, firstCtrlPts, secondCtrlPts
 
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.IControlPointShape
DEFAULT_BALANCE_GAP, DEFAULT_POSITION_CTRL
 
Fields inherited from interface net.sf.latexdraw.glib.models.interfaces.IShape
GOLDEN_ANGLE, PPC
 
Constructor Summary
protected LBezierCurve(boolean uniqueID)
          Creates a model with no point.
protected LBezierCurve(IPoint point, IPoint point2, boolean uniqueID)
          Creates a bezier curve with two points.
 
Method Summary
 void copy(IShape sh)
          Copies a shape using another.
 IBezierCurve duplicate()
          Creates a duplicate of the shape (however id are not the same).
 ILine getArrowLine(IArrow arrow)
           
 boolean isArrowable()
           
 boolean isClosed()
           
 boolean isDbleBorderable()
           
 boolean isFillable()
           
 boolean isInteriorStylable()
           
 boolean isLineStylable()
           
 boolean isShadowable()
           
 boolean isThicknessable()
           
 void setIsClosed(boolean isClosed)
          Defines if the shape is closed.
 boolean shadowFillsShape()
           
 
Methods inherited from class net.sf.latexdraw.glib.models.impl.LAbstractCtrlPointShape
addPoint, balance, copyPoints, getBalanceGap, getFirstCtrlPtAt, getFirstCtrlPts, getSecondCtrlPtAt, getSecondCtrlPts, removePoint, removePoint, replacePoint, scale, setBalanceGap, setPoint, setXFirstCtrlPt, setXSecondCtrlPt, setYFirstCtrlPt, setYSecondCtrlPt, translate, updateSecondControlPoints
 
Methods inherited from class net.sf.latexdraw.glib.models.impl.LModifiablePointsShape
addPoint, setPoint
 
Methods inherited from class net.sf.latexdraw.glib.models.impl.LShape
addToRotationAngle, copyArrows, getArrowAt, getArrowInset, getArrowLength, 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, isBordersMovable, isColourable, isFilled, isModified, isParametersEquals, isShowPts, isShowPtsable, mirrorHorizontal, mirrorVertical, rotate, 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
 
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.IControlPointShape
balance, getBalanceGap, getFirstCtrlPtAt, getFirstCtrlPts, getSecondCtrlPtAt, getSecondCtrlPts, setBalanceGap, setXFirstCtrlPt, setXSecondCtrlPt, setYFirstCtrlPt, setYSecondCtrlPt, updateSecondControlPoints
 
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IModifiablePointsShape
addPoint, addPoint, removePoint, removePoint, replacePoint, setPoint, setPoint
 
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IShape
addToRotationAngle, getArrowAt, 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, isFilled, isParametersEquals, isShowPts, isShowPtsable, 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, 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

isClosed

protected boolean isClosed
Defines if the curve is closed.

Constructor Detail

LBezierCurve

protected LBezierCurve(boolean uniqueID)
Creates a model with no point.

Parameters:
uniqueID - True: the model will have a unique ID.

LBezierCurve

protected LBezierCurve(IPoint point,
                       IPoint point2,
                       boolean uniqueID)
Creates a bezier curve with two points.

Parameters:
point - The first point of the curve.
point2 - The second point of the curve.
uniqueID - uniqueID True: the model will have a unique ID.
Method Detail

duplicate

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

Specified by:
duplicate in interface IBezierCurve
Specified by:
duplicate in interface IShape
Overrides:
duplicate in class LShape
Returns:
The duplicata.

getArrowLine

public ILine getArrowLine(IArrow arrow)
Specified by:
getArrowLine in interface IShape
Overrides:
getArrowLine in class LShape
Parameters:
arrow - The arrow to analyse.
Returns:
The line that will be used to place the arrow.

isClosed

public boolean isClosed()
Specified by:
isClosed in interface IBezierCurve
Returns:
the isClosed.

setIsClosed

public void setIsClosed(boolean isClosed)
Description copied from interface: IBezierCurve
Defines if the shape is closed.

Specified by:
setIsClosed in interface IBezierCurve
Parameters:
isClosed - True: the shape will be closed.

isArrowable

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

isDbleBorderable

public boolean isDbleBorderable()
Specified by:
isDbleBorderable in interface IShape
Overrides:
isDbleBorderable in class LShape
Returns:
True if the shape can have a double border.

isFillable

public boolean isFillable()
Specified by:
isFillable in interface IShape
Overrides:
isFillable in class LShape
Returns:
True if the shape can have an interior colour.

isInteriorStylable

public boolean isInteriorStylable()
Specified by:
isInteriorStylable in interface IShape
Overrides:
isInteriorStylable in class LShape
Returns:
True if the interior of the shape can have a style (hatchings, gradient).

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 LAbstractCtrlPointShape
Parameters:
sh - The shape to copy.

isLineStylable

public boolean isLineStylable()
Specified by:
isLineStylable in interface IShape
Overrides:
isLineStylable in class LShape
Returns:
True if the line style of the shape can be changed.

isShadowable

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

isThicknessable

public boolean isThicknessable()
Specified by:
isThicknessable in interface IShape
Overrides:
isThicknessable in class LShape
Returns:
True if the thickness of the shape can be changed.

shadowFillsShape

public boolean shadowFillsShape()
Specified by:
shadowFillsShape in interface IShape
Overrides:
shadowFillsShape in class LShape
Returns:
True if when the shape has a shadow, it must be filled.