|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.latexdraw.glib.models.impl.LShape
net.sf.latexdraw.glib.models.impl.LModifiablePointsShape
abstract class LModifiablePointsShape
Defines a model of a shape that contains points that can be modified.
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/14/2008
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 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 | |
---|---|
LModifiablePointsShape(boolean uniqueID)
Creates the shape. |
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 class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 |
Constructor Detail |
---|
public LModifiablePointsShape(boolean uniqueID)
uniqueID
- True: the model will have a unique ID.Method Detail |
---|
public boolean setPoint(IPoint p, int position)
IModifiablePointsShape
setPoint
in interface IModifiablePointsShape
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).
public boolean setPoint(double x, double y, int position)
IModifiablePointsShape
setPoint
in interface IModifiablePointsShape
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).
public boolean removePoint(IPoint pt)
IModifiablePointsShape
removePoint
in interface IModifiablePointsShape
pt
- The point to remove.
public IPoint removePoint(int position)
IModifiablePointsShape
removePoint
in interface IModifiablePointsShape
position
- The position of the point to remove (-1 corresponds to the last point).
public IPoint replacePoint(IPoint pt, int position)
IModifiablePointsShape
replacePoint
in interface IModifiablePointsShape
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).
public void addPoint(IPoint pt)
IModifiablePointsShape
addPoint
in interface IModifiablePointsShape
pt
- The point to add. Must be valid.public void addPoint(IPoint pt, int position)
IModifiablePointsShape
addPoint
in interface IModifiablePointsShape
pt
- The point to add.position
- The position of insertion (-1 corresponds to the last point).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |