net.sf.latexdraw.glib.models.interfaces
Interface IModifiablePointsShape

All Superinterfaces:
IArrowable, IShape, Modifiable
All Known Subinterfaces:
IBezierCurve, IControlPointShape, ICurve, IFreehand, IPolygon, IPolyline
All Known Implementing Classes:
LAbstractCtrlPointShape, LBezierCurve, LFreehand, LModifiablePointsShape, LPolygon, LPolyline

public interface IModifiablePointsShape
extends IShape

Defines an interface for shapes that contain modifiable points.

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/02/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
 
Fields inherited from interface net.sf.latexdraw.glib.models.interfaces.IShape
GOLDEN_ANGLE, PPC
 
Method Summary
 void addPoint(IPoint pt)
          Adds a point to the shape model.
 void addPoint(IPoint pt, int position)
          Adds the given point to the points list at the given position.
 IPoint removePoint(int position)
          Removes the point at the given position.
 boolean removePoint(IPoint pt)
          Removes the given point of the shape.
 IPoint replacePoint(IPoint pt, int position)
          Replaces the point at the given position by the given point.
 boolean setPoint(double x, double y, int position)
          Sets the point at the given position to the given coordinate.
 boolean setPoint(IPoint p, int position)
          Sets the point at the given position to the given coordinate.
 
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IShape
addToRotationAngle, copy, duplicate, 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 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
 

Method Detail

addPoint

void addPoint(IPoint pt)
Adds a point to the shape model.

Parameters:
pt - The point to add. Must be valid.
Since:
3.0

addPoint

void addPoint(IPoint pt,
              int position)
Adds the given point to the points list at the given position. The model is not updated!

Parameters:
pt - The point to add.
position - The position of insertion (-1 corresponds to the last point).
Since:
3.0

removePoint

boolean removePoint(IPoint pt)
Removes the given point of the shape.

Parameters:
pt - The point to remove.
Returns:
True if the point is removed. False otherwise.
Since:
3.0

removePoint

IPoint removePoint(int position)
Removes the point at the given position.

Parameters:
position - The position of the point to remove (-1 corresponds to the last point).
Returns:
The removed point or null.
Since:
3.0

setPoint

boolean setPoint(IPoint p,
                 int position)
Sets the point at the given position to the given coordinate. The model is not updated!

Parameters:
p - The new position of the wanted point.
position - The position of the point to move in the points list (-1 corresponds to the last point).
Returns:
true if the operation is successful.
Since:
3.0

setPoint

boolean setPoint(double x,
                 double y,
                 int position)
Sets the point at the given position to the given coordinate.

Parameters:
x - The new X-coordinate. The model is not updated!
y - The new Y-coordinate.
position - The position of the point to move in the points list (-1 corresponds to the last point).
Returns:
true if the operation is successful.
Since:
3.0

replacePoint

IPoint replacePoint(IPoint pt,
                    int position)
Replaces the point at the given position by the given point.

Parameters:
pt - The new point. Must not be a point of the shape.
position - The position of the point to remove (-1 corresponds to the last point).
Returns:
The removed point or null.
Since:
3.0