net.sf.latexdraw.glib.models.impl
Class LRectangle
java.lang.Object
net.sf.latexdraw.glib.models.impl.LShape
net.sf.latexdraw.glib.models.impl.LPositionShape
net.sf.latexdraw.glib.models.impl.LRectangularShape
net.sf.latexdraw.glib.models.impl.LRectangle
- All Implemented Interfaces:
- IArrowable, ILineArcShape, IPositionShape, IRectangle, IRectangularShape, IShape, Modifiable
- Direct Known Subclasses:
- LSquare
class LRectangle
- extends LRectangularShape
- implements IRectangle
Defines a model of a rectangle.
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 double |
frameArc
The radius of arcs drawn at the corners of lines. |
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 |
LRectangle(boolean uniqueID)
Creates a rectangle at the position (0,0). |
protected |
LRectangle(IPoint pos,
double width,
double height,
boolean uniqueID)
Creates a rectangle. |
protected |
LRectangle(IPoint tl,
IPoint br,
boolean uniqueID)
Creates a rectangle. |
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.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, isArrowable, isColourable, isFilled, isModified, isParametersEquals, 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.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, isArrowable, isBordersMovable, isColourable, isDbleBorderable, isFillable, isFilled, isInteriorStylable, isLineStylable, isParametersEquals, 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 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 |
frameArc
protected double frameArc
- The radius of arcs drawn at the corners of lines.
LRectangle
protected LRectangle(boolean uniqueID)
- Creates a rectangle at the position (0,0).
- Parameters:
uniqueID
- True: the rectangle will have a unique ID.
LRectangle
protected LRectangle(IPoint pos,
double width,
double height,
boolean uniqueID)
- Creates a rectangle.
- Parameters:
pos
- The north-west point of the rectangle.width
- The width of the rectangle.height
- The height of the rectangle.uniqueID
- True: the rectangle will have a unique ID.
- Throws:
java.lang.IllegalArgumentException
- If the width or the height is not valid.
LRectangle
protected LRectangle(IPoint tl,
IPoint br,
boolean uniqueID)
- Creates a rectangle.
- Parameters:
tl
- The top left point of the rectangle.br
- The bottom right point of the rectangle.uniqueID
- True: the rectangle will have a unique ID.
duplicate
public IRectangle duplicate()
- Description copied from interface:
IShape
- Creates a duplicate of the shape (however id are not the same).
- Specified by:
duplicate
in interface IRectangle
- Specified by:
duplicate
in interface IShape
- Overrides:
duplicate
in class LShape
- Returns:
- The duplicata.
getLineArc
public double getLineArc()
- Specified by:
getLineArc
in interface ILineArcShape
- Returns:
- the lineArc.
isRoundCorner
public boolean isRoundCorner()
- Specified by:
isRoundCorner
in interface ILineArcShape
- Returns:
- the isCornerRound.
setLineArc
public void setLineArc(double arc)
- Specified by:
setLineArc
in interface ILineArcShape
- Parameters:
arc
- the lineArc to set. Must be in [0,1]
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.