public class CreateGeometryListener extends edu.umd.cs.piccolo.event.PBasicInputEventHandler implements CreateGeometryListenerInterface
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_NUMOF_ELLIPSE_EDGES |
protected edu.umd.cs.piccolo.event.PInputEvent |
finishingEvent |
static String |
GEOMETRY_CREATED_NOTIFICATION |
protected MappingComponent |
mappingComponent |
protected String |
mode |
protected ArrayList<Point2D> |
points |
protected Map<Point2D,com.vividsolutions.jts.geom.Coordinate> |
snappedCoordinates |
ELLIPSE, LINESTRING, POINT, POLYGON, RECTANGLE, RECTANGLE_FROM_LINE, TEXT| Modifier | Constructor and Description |
|---|---|
|
CreateGeometryListener()
Creates a new CreateGeometryListener object.
|
|
CreateGeometryListener(MappingComponent mc)
Creates a new CreateGeometryListener object.
|
protected |
CreateGeometryListener(MappingComponent mc,
Class geometryFeatureClass)
Creates a new instance of CreateGeometryListener.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
createCurrentNewFeature(Point2D lastPoint)
DOCUMENT ME!
|
protected edu.umd.cs.piccolo.nodes.PPath |
createNewTempFeature()
DOCUMENT ME!
|
protected void |
finishGeometry(AbstractNewFeature newFeature)
DOCUMENT ME!
|
protected AbstractNewFeature |
getCurrentNewFeature()
DOCUMENT ME!
|
protected Color |
getFillingColor()
DOCUMENT ME!
|
Class |
getGeometryFeatureClass()
DOCUMENT ME!
|
protected MappingComponent |
getMappingComponent()
DOCUMENT ME!
|
String |
getMode()
DOCUMENT ME!
|
int |
getNumOfEllipseEdges()
DOCUMENT ME!
|
protected Point2D[] |
getPoints(Point2D lastPoint)
DOCUMENT ME!
|
boolean |
isInMode(String mode)
DOCUMENT ME!
|
protected boolean |
isInProgress()
DOCUMENT ME!
|
boolean |
isShowCurrentLength()
DOCUMENT ME!
|
void |
keyPressed(edu.umd.cs.piccolo.event.PInputEvent event) |
boolean |
modeEquals(String mode)
DOCUMENT ME!
|
void |
mouseDragged(edu.umd.cs.piccolo.event.PInputEvent pInputEvent) |
void |
mouseMoved(edu.umd.cs.piccolo.event.PInputEvent pInputEvent) |
void |
mousePressed(edu.umd.cs.piccolo.event.PInputEvent pInputEvent) |
void |
mouseReleased(edu.umd.cs.piccolo.event.PInputEvent arg0) |
protected void |
reset()
DOCUMENT ME!
|
void |
setGeometryFeatureClass(Class<? extends AbstractNewFeature> geometryFeatureClass)
DOCUMENT ME!
|
void |
setMappingComponent(MappingComponent mappingComponent)
DOCUMENT ME!
|
void |
setMode(String mode)
DOCUMENT ME!
|
void |
setNumOfEllipseEdges(int numOfEllipseEdges)
DOCUMENT ME!
|
void |
setShowCurrentLength(boolean showCurrentLength)
DOCUMENT ME!
|
protected void |
updatePolygon(Point2D lastPoint)
DOCUMENT ME!
|
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseWheelRotated, mouseWheelRotatedByBlock, paramString, processEvent, setEventFilter, toStringpublic static final String GEOMETRY_CREATED_NOTIFICATION
protected static final int DEFAULT_NUMOF_ELLIPSE_EDGES
protected MappingComponent mappingComponent
protected edu.umd.cs.piccolo.event.PInputEvent finishingEvent
protected String mode
public CreateGeometryListener()
public CreateGeometryListener(MappingComponent mc)
mc - DOCUMENT ME!protected CreateGeometryListener(MappingComponent mc, Class geometryFeatureClass)
mc - DOCUMENT ME!geometryFeatureClass - DOCUMENT ME!public boolean isShowCurrentLength()
public void setShowCurrentLength(boolean showCurrentLength)
showCurrentLength - the showCurrentLength to setprotected MappingComponent getMappingComponent()
protected boolean isInProgress()
public void setMode(String mode) throws IllegalArgumentException
setMode in interface CreateGeometryListenerInterfacemode - DOCUMENT ME!IllegalArgumentException - DOCUMENT ME!public boolean modeEquals(String mode)
mode - DOCUMENT ME!protected void reset()
public void mouseMoved(edu.umd.cs.piccolo.event.PInputEvent pInputEvent)
mouseMoved in class edu.umd.cs.piccolo.event.PBasicInputEventHandlerpublic void mousePressed(edu.umd.cs.piccolo.event.PInputEvent pInputEvent)
mousePressed in class edu.umd.cs.piccolo.event.PBasicInputEventHandlerprotected AbstractNewFeature getCurrentNewFeature()
protected void createCurrentNewFeature(Point2D lastPoint)
lastPoint - DOCUMENT ME!public void mouseReleased(edu.umd.cs.piccolo.event.PInputEvent arg0)
mouseReleased in class edu.umd.cs.piccolo.event.PBasicInputEventHandlerpublic void keyPressed(edu.umd.cs.piccolo.event.PInputEvent event)
keyPressed in class edu.umd.cs.piccolo.event.PBasicInputEventHandlerprotected Color getFillingColor()
protected void updatePolygon(Point2D lastPoint)
lastPoint - DOCUMENT ME!protected Point2D[] getPoints(Point2D lastPoint)
lastPoint - DOCUMENT ME!public boolean isInMode(String mode)
isInMode in interface CreateGeometryListenerInterfacemode - DOCUMENT ME!public String getMode()
getMode in interface CreateGeometryListenerInterfacepublic Class getGeometryFeatureClass()
getGeometryFeatureClass in interface CreateGeometryListenerInterfacepublic final void setGeometryFeatureClass(Class<? extends AbstractNewFeature> geometryFeatureClass)
setGeometryFeatureClass in interface CreateGeometryListenerInterfacegeometryFeatureClass - DOCUMENT ME!public void mouseDragged(edu.umd.cs.piccolo.event.PInputEvent pInputEvent)
mouseDragged in class edu.umd.cs.piccolo.event.PBasicInputEventHandlerprotected void finishGeometry(AbstractNewFeature newFeature)
newFeature - DOCUMENT ME!public void setNumOfEllipseEdges(int numOfEllipseEdges)
setNumOfEllipseEdges in interface CreateGeometryListenerInterfacenumOfEllipseEdges - DOCUMENT ME!public int getNumOfEllipseEdges()
getNumOfEllipseEdges in interface CreateGeometryListenerInterfaceprotected edu.umd.cs.piccolo.nodes.PPath createNewTempFeature()
public void setMappingComponent(MappingComponent mappingComponent)
mappingComponent - the mappingComponent to setCopyright © 2012–2026 cismet GmbH. All rights reserved.