public abstract class DefaultCADTool extends Object implements CADTool, Geometry.TYPES, Geometry.SUBTYPES
| Modifier and Type | Field and Description |
|---|---|
protected GeometryManager |
geomManager |
protected MapControlManager |
mapControlManager
Reference to the MapControl library manager, used to manage
tools.
|
TOPGEOMETRYAGGREGATE, ARC, CIRCLE, CIRCUMFERENCE, COMPLEX, CURVE, ELLIPSE, ELLIPTICARC, FILLEDSPLINE, GEOMETRY, LINE, MULTICURVE, MULTILINE, MULTIPOINT, MULTIPOLYGON, MULTISOLID, MULTISURFACE, NULL, PERIELLIPSE, POINT, POLYGON, RING, SOLID, SPLINE, SURFACE| Constructor and Description |
|---|
DefaultCADTool()
Crea un nuevo DefaultCADTool.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTemporalCache(Geometry geom) |
boolean |
changeCommand(String name) |
void |
clearSelection() |
void |
clearTemporalCache() |
protected Arc |
createArc(Point2D p1,
Point2D p2,
Point2D p3)
Create an Arc.
|
protected Arc |
createArc(Point p1,
Point p2,
Point p3)
Create an arc.
|
protected Circle |
createCircle(Point2D p1,
double radious)
Create a circle.
|
protected Circle |
createCircle(Point2D p1,
Point2D p2)
Create a circle from a GeneralPath.
|
protected Circle |
createCircle(Point p1,
double radious)
Create a circle.
|
protected Circle |
createCircle(Point p1,
Point p2)
Create a circle.
|
protected Circle |
createCircle(Point p1,
Point p2,
Point p3)
Create a circle.
|
protected Curve |
createCurve()
Create a curve.
|
protected Curve |
createCurve(GeneralPathX gpx)
Create a curve from a GeneralPath.
|
protected Ellipse |
createEllipse(Point2D p1,
Point2D p2,
double d)
Create an Ellipse.
|
protected Ellipse |
createEllipse(Point p1,
Point p2,
double d)
Create an Ellipse.
|
protected Curve |
createEnvelopeLikeCurve(Point2D firstPoint,
Point2D secondPoint)
Create an envelope like a curve from two points.
|
protected MultiCurve |
createMultiCurve()
Create a multicurve.
|
protected MultiPoint |
createMultiPoint()
Create a multipoint.
|
protected MultiPrimitive |
createMultiPrimitive()
Create a MultiPrimitive.
|
protected MultiPrimitive |
createMultiPrimitive(Geometry[] geometries)
Create a MultiPrimitive.
|
protected MultiSurface |
createMultiSurface()
Create a multisurface.
|
protected OrientablePrimitive |
createOrientablePrimitive(int geometryType)
Create an
OrientablePrimitive. |
protected Point |
createPoint(double x,
double y)
Create point.
|
protected Point |
createPoint(Point2D p1)
Create a curve point.
|
protected Spline |
createSpline(Point2D[] points)
Create a Spline from a GeneralPath.
|
protected Surface |
createSurface()
Create a surface.
|
protected Surface |
createSurface(GeneralPathX gpx)
Create a surface from a GeneralPath.
|
void |
draw(Geometry geometry,
Feature feature)
DOCUMENT ME!
|
protected void |
drawAndRotateSelectedGeometries(MapControlDrawer mapControlDrawer,
Point2D firstPoint,
double x,
double y)
It draw the selected geometries from the initial point until a new
point.
|
void |
drawHandlers(MapControlDrawer renderer,
ArrayList selectedRows,
AffineTransform at) |
protected void |
drawSelectedGeometries(MapControlDrawer mapControlDrawer,
Point2D firstPoint,
double x,
double y)
It draw the selected geometries from the initial point until a new
point.
|
void |
end() |
void |
endTransition(double x,
double y,
MouseEvent e) |
CADToolAdapter |
getCadToolAdapter()
DOCUMENT ME!
|
String[] |
getDescriptions() |
protected IEditionManager |
getEditionManager() |
protected GeometryType |
getGeometryType()
Returns the type of the geometries to create.
|
String |
getNextTool() |
String |
getQuestion()
Devuelve la cadena que corresponde al estado en el que nos encontramos.
|
protected ArrayList |
getSelectedHandlers() |
protected int |
getSubType() |
protected int[] |
getSupportedGeometryTypes()
Returns the list of Geometry types supported by this tool.
|
protected GeometryType[] |
getSupportedTypes()
Returns the geometry types supported by the tool.
|
VectorialLayerEdited |
getVLE() |
void |
init() |
Feature |
insertAndSelectGeometry(Geometry geometry) |
Feature |
insertFeature(Feature feature) |
Feature |
insertGeometry(Geometry geometry) |
Feature |
insertGeometry(Geometry geometry,
Feature feature) |
boolean |
isApplicable(GeometryType geometryType) |
boolean |
isApplicable(int shapeType) |
protected GeometryType |
loadGeometryType(int type,
int subtype) |
protected void |
loadGeometryTypes() |
void |
refresh()
Provoca un repintado "soft" de la capa activa en edici�n.
|
void |
restorePreviousTool() |
void |
setCadToolAdapter(CADToolAdapter cta)
DOCUMENT ME!
|
void |
setDescription(String[] currentdescriptions) |
void |
setNextTool(String tool) |
void |
setPreviosTool(DefaultCADTool tool) |
void |
setQuestion(String s)
Actualiza la cadena que corresponde al estado actual.
|
void |
throwOptionException(String s,
String o) |
void |
throwPointException(String s,
double x,
double y) |
void |
throwValueException(String s,
double d) |
abstract String |
toString() |
void |
updateGeometry(FeatureStore store,
Feature feature,
Geometry geometry) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddOption, addPoint, addValue, drawOperation, getName, transition, transition, transitionprotected MapControlManager mapControlManager
protected GeometryManager geomManager
protected void loadGeometryTypes()
public void addTemporalCache(Geometry geom)
public void clearTemporalCache()
protected void drawSelectedGeometries(MapControlDrawer mapControlDrawer, Point2D firstPoint, double x, double y)
mapControlDrawer - The drawer.firstPoint - The initial point.x - The X coordinate of the mouse.y - The Y coordinate of the mouse.protected void drawAndRotateSelectedGeometries(MapControlDrawer mapControlDrawer, Point2D firstPoint, double x, double y)
mapControlDrawer - The drawer.firstPoint - The initial point.x - The X coordinate of the mouse.y - The Y coordinate of the mouse.affineTransform - The transformation to applypublic void setCadToolAdapter(CADToolAdapter cta)
CADToolsetCadToolAdapter in interface CADToolcta - DOCUMENT ME!public CADToolAdapter getCadToolAdapter()
CADToolgetCadToolAdapter in interface CADToolpublic VectorialLayerEdited getVLE()
public void updateGeometry(FeatureStore store, Feature feature, Geometry geometry)
protected IEditionManager getEditionManager()
public String getQuestion()
getQuestion in interface CADToolpublic void setQuestion(String s)
setQuestion in interface CADTools - Cadena que aparecer� en consola.public void refresh()
public void drawHandlers(MapControlDrawer renderer, ArrayList selectedRows, AffineTransform at)
public void setDescription(String[] currentdescriptions)
setDescription in interface CADToolpublic String[] getDescriptions()
getDescriptions in interface CADToolprotected ArrayList getSelectedHandlers()
public void clearSelection()
throws DataException
clearSelection in interface CADToolDataExceptionpublic String getNextTool()
public void setNextTool(String tool)
public boolean changeCommand(String name) throws CommandException
CommandExceptionpublic boolean isApplicable(int shapeType)
isApplicable in interface CADToolpublic boolean isApplicable(GeometryType geometryType)
isApplicable in interface CADToolprotected GeometryType[] getSupportedTypes()
protected int[] getSupportedGeometryTypes()
protected GeometryType loadGeometryType(int type, int subtype)
public void throwValueException(String s, double d)
public void throwPointException(String s, double x, double y)
public void setPreviosTool(DefaultCADTool tool)
setPreviosTool in interface CADToolpublic void restorePreviousTool()
restorePreviousTool in interface CADToolpublic void endTransition(double x,
double y,
MouseEvent e)
endTransition in interface CADToolprotected Curve createCurve()
null and add the error
to the logprotected MultiCurve createMultiCurve()
null and add the error
to the logprotected OrientablePrimitive createOrientablePrimitive(int geometryType)
OrientablePrimitive. If there is an
error return null and add the error
to the loggeometryType - a type of a OrientablePrimitive.OrientablePrimitiveprotected Curve createEnvelopeLikeCurve(Point2D firstPoint, Point2D secondPoint)
null and add the error to the
log.firstPoint - first pointsecondPoint - second pointprotected Curve createCurve(GeneralPathX gpx)
null and add the error
to the loggpx - The GeneralPathprotected Surface createSurface()
null and add the error
to the logprotected MultiSurface createMultiSurface()
null and add the error
to the logprotected Surface createSurface(GeneralPathX gpx)
null and add the error
to the loggpx - The general pathprotected Point createPoint(Point2D p1)
null and add the error
to the logp1 - The AWT pointprotected Point createPoint(double x, double y)
null and add the error
to the logx - The X coordinatey - The y coordinateprotected MultiPoint createMultiPoint()
null and add the error
to the logx - The X coordinatey - The y coordinateprotected Arc createArc(Point2D p1, Point2D p2, Point2D p3)
null and add the error
to the logp1 - p2 - p3 - protected Arc createArc(Point p1, Point p2, Point p3)
null and add the error
to the logp1 - p2 - p3 - protected Circle createCircle(Point p1, Point p2, Point p3)
null and add the error
to the logp1 - p2 - p3 - protected Circle createCircle(Point2D p1, Point2D p2)
null and add the error
to the logp1 - p2 - protected Circle createCircle(Point p1, Point p2)
null and add the error
to the logp1 - p2 - protected Circle createCircle(Point2D p1, double radious)
null and add the error
to the logp1 - radious - protected Circle createCircle(Point p1, double radious)
null and add the error
to the logp1 - radious - protected Ellipse createEllipse(Point2D p1, Point2D p2, double d)
null and add the error
to the logp1 - p2 - d - protected Ellipse createEllipse(Point p1, Point p2, double d)
null and add the error
to the logp1 - p2 - d - protected Spline createSpline(Point2D[] points)
null and add the error
to the logpoints - protected MultiPrimitive createMultiPrimitive()
null and add the error
to the logprotected MultiPrimitive createMultiPrimitive(Geometry[] geometries)
null and add the error
to the loggeometries - protected int getSubType()
protected GeometryType getGeometryType()