public class SelectionCADTool extends DefaultCADTool
Modifier and Type | Field and Description |
---|---|
protected SelectionCADToolContext |
_fsm |
protected Point2D |
firstPoint |
protected boolean |
multipleSelection |
protected String |
nextState |
protected ArrayList |
selectedFeatures |
protected ArrayList |
selectedGeometries |
protected String |
type |
geomManager, mapControlManager
TOPGEOMETRY
AGGREGATE, 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 |
---|
SelectionCADTool() |
Modifier and Type | Method and Description |
---|---|
void |
addOption(String s)
Add a diferent option.
|
void |
addPoint(double x,
double y,
InputEvent event)
Equivale al transition del prototipo pero sin pasarle como pará metro el
editableFeatureSource que ya estará creado.
|
protected void |
addPointWithHandlers(double x,
double y,
FeatureStore featureStore,
ArrayList selectedHandlers)
AddPoint method for the WithHandlers option
|
void |
addValue(double d) |
protected void |
clearCurrentSelection() |
void |
drawOperation(MapControlDrawer renderer,
double x,
double y)
Método para dibujar la lo necesario para el estado en el que nos
encontremos.
|
protected void |
drawWithHandlers(MapControlDrawer mapControlDrawer,
double x,
double y,
ArrayList selectedHandlers)
Draw method to draw a geometry with handlers
|
void |
end() |
String |
getName() |
String |
getNextState() |
String |
getStatus() |
protected int[] |
getSupportedGeometryTypes()
Returns the list of Geometry types supported by this tool.
|
String |
getType() |
void |
init()
Método de incio, para poner el código de todo lo que se requiera de una
carga previa a la utilización de la herramienta.
|
boolean |
isApplicable(GeometryType geometryType) |
static boolean |
isInstance(CADTool tool,
boolean exactly_this)
Tells whether the tool provided is an instance of this class
|
void |
multipleSelection(boolean b) |
protected void |
pointDoubleClick(MapContext map) |
boolean |
selectFeatures(double x,
double y,
InputEvent event) |
int |
selectHandlers(double x,
double y,
InputEvent event) |
long |
selectWithSecondPoint(double x,
double y,
InputEvent event)
Receives second point
|
void |
setType(String type) |
String |
toString() |
void |
transition(double d) |
void |
transition(double x,
double y,
InputEvent event) |
void |
transition(String s) |
addTemporalCache, changeCommand, clearSelection, clearTemporalCache, createArc, createArc, createCircle, createCircle, createCircle, createCircle, createCircle, createCurve, createCurve, createEllipse, createEllipse, createEnvelopeLikeCurve, createMultiCurve, createMultiPoint, createMultiPrimitive, createMultiPrimitive, createMultiSurface, createOrientablePrimitive, createPoint, createPoint, createSpline, createSurface, createSurface, draw, drawAndRotateSelectedGeometries, drawHandlers, drawSelectedGeometries, endTransition, getCadToolAdapter, getDescriptions, getEditionManager, getGeometryType, getNextTool, getQuestion, getSelectedHandlers, getSubType, getSupportedTypes, getVLE, insertAndSelectGeometry, insertFeature, insertGeometry, insertGeometry, isApplicable, loadGeometryType, loadGeometryTypes, refresh, restorePreviousTool, setCadToolAdapter, setDescription, setNextTool, setPreviosTool, setQuestion, throwOptionException, throwPointException, throwValueException, updateGeometry
protected SelectionCADToolContext _fsm
protected Point2D firstPoint
protected String nextState
protected ArrayList selectedGeometries
protected ArrayList selectedFeatures
protected String type
protected boolean multipleSelection
public void init()
init
in interface CADTool
init
in class DefaultCADTool
public void transition(double x, double y, InputEvent event)
public void transition(double d)
public void transition(String s) throws CommandException
CommandException
public String getNextState()
protected void pointDoubleClick(MapContext map) throws ReadException
ReadException
public void addPoint(double x, double y, InputEvent event)
selection
- Bitset con las geometrías que estén seleccionadas.x
- parámetro x del punto que se pase en esta transición.y
- parámetro y del punto que se pase en esta transición.protected void addPointWithHandlers(double x, double y, FeatureStore featureStore, ArrayList selectedHandlers)
x
- selected x coordinate.y
- selected y coordinate.featureStore
- the selected feature store.selectedHandlers
- the selected handlerspublic long selectWithSecondPoint(double x, double y, InputEvent event)
x
- y
- public void drawOperation(MapControlDrawer renderer, double x, double y)
g
- Graphics sobre el que dibujar.selectedGeometries
- BitSet con las geometrías seleccionadas.x
- parámetro x del punto que se pase para dibujar.y
- parámetro x del punto que se pase para dibujar.protected void drawWithHandlers(MapControlDrawer mapControlDrawer, double x, double y, ArrayList selectedHandlers)
mapControlDrawer
- object used to draw.x
- selected x coordinate.y
- selected y coordinate.selectedHandlers
- the selected handlerspublic void addOption(String s)
sel
- DOCUMENT ME!s
- Diferent option.public void addValue(double d)
public String getStatus()
public void end()
end
in interface CADTool
end
in class DefaultCADTool
public String getName()
public boolean selectFeatures(double x, double y, InputEvent event)
public int selectHandlers(double x, double y, InputEvent event)
protected void clearCurrentSelection()
public String getType()
public void setType(String type)
public String toString()
toString
in class DefaultCADTool
public void multipleSelection(boolean b)
public boolean isApplicable(GeometryType geometryType)
isApplicable
in interface CADTool
isApplicable
in class DefaultCADTool
protected int[] getSupportedGeometryTypes()
DefaultCADTool
getSupportedGeometryTypes
in class DefaultCADTool
public static boolean isInstance(CADTool tool, boolean exactly_this)
tool
- exactly_this
- requires that the object is an instance of
this class and not an instance of a subclass