net.sf.latexdraw.glib.models.impl
Class LFreehand
java.lang.Object
net.sf.latexdraw.glib.models.impl.LShape
net.sf.latexdraw.glib.models.impl.LModifiablePointsShape
net.sf.latexdraw.glib.models.impl.LFreehand
- All Implemented Interfaces:
- IArrowable, IFreehand, IModifiablePointsShape, IShape, Modifiable
class LFreehand
- extends LModifiablePointsShape
- implements IFreehand
Defines a model of a free hand shape.
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
Field Summary |
protected int |
interval
The interval to consider while painting the shape. |
protected boolean |
open
Defines if the drawing is opened of closed. |
protected IFreehand.FreeHandType |
type
The type of the curves of the shape. |
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 |
Constructor Summary |
protected |
LFreehand(IPoint pt,
boolean uniqueID)
Creates and initialises a freehand model. |
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, 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.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, isColourable, isFilled, isShowPts, 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 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 |
type
protected IFreehand.FreeHandType type
- The type of the curves of the shape.
interval
protected int interval
- The interval to consider while painting the shape.
open
protected boolean open
- Defines if the drawing is opened of closed.
LFreehand
protected LFreehand(IPoint pt,
boolean uniqueID)
- Creates and initialises a freehand model.
- Parameters:
pt
- The first point.uniqueID
- True: the model will have a unique ID.
- Throws:
java.lang.IllegalArgumentException
- If the given point is not valid.- Since:
- 3.0
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.
isParametersEquals
public boolean isParametersEquals(IShape s,
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:
s
- The shape to compare.considerShadow
- True if the parameters of the shadows must be considered.
- Returns:
- True if the parameters are equals.
getInterval
public int getInterval()
- Specified by:
getInterval
in interface IFreehand
- Returns:
- the interval.
getType
public IFreehand.FreeHandType getType()
- Specified by:
getType
in interface IFreehand
- Returns:
- the type.
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interface IFreehand
- Returns:
- the open.
setInterval
public void setInterval(int interval)
- Specified by:
setInterval
in interface IFreehand
- Parameters:
interval
- the interval to set.
setOpen
public void setOpen(boolean open)
- Specified by:
setOpen
in interface IFreehand
- Parameters:
open
- the open to set.
setType
public void setType(IFreehand.FreeHandType type)
- Specified by:
setType
in interface IFreehand
- Parameters:
type
- the type to set.
duplicate
public IFreehand duplicate()
- Description copied from interface:
IShape
- Creates a duplicate of the shape (however id are not the same).
- Specified by:
duplicate
in interface IFreehand
- Specified by:
duplicate
in interface IShape
- Overrides:
duplicate
in class LShape
- Returns:
- The duplicata.
isArrowable
public boolean isArrowable()
- Specified by:
isArrowable
in interface IShape
- Overrides:
isArrowable
in class LShape
- Returns:
- True if the shape can have arrows.
isBordersMovable
public boolean isBordersMovable()
- Specified by:
isBordersMovable
in interface IShape
- Overrides:
isBordersMovable
in class LShape
- Returns:
- True if the borders of the shape can be moved.
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).
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.
isShowPtsable
public boolean isShowPtsable()
- Specified by:
isShowPtsable
in interface IShape
- Overrides:
isShowPtsable
in class LShape
- Returns:
- True if the points of the shape can be displayed.
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.