nl.cloudfarming.client.area.field.shape
Class Shape
java.lang.Object
nl.cloudfarming.client.model.Bean
nl.cloudfarming.client.area.field.shape.Shape
- All Implemented Interfaces:
- Transferable, LayerObject<com.vividsolutions.jts.geom.Geometry,Shape>
public class Shape
- extends Bean
- implements LayerObject<com.vividsolutions.jts.geom.Geometry,Shape>
non persistent object for storing geometries and additional information
- Author:
- Timon Veenstra
|
Nested Class Summary |
static class |
Shape.Builder
Shape builder class
usage: Shape shape = new Shape.Builder().setName("someName").build(); |
static class |
Shape.ShapeType
Type of a shape object
Gives an indication about what kind of shape it is, what the purpose is
and where it needs to be stored eventually. |
| Nested classes/interfaces inherited from class nl.cloudfarming.client.model.Bean |
Bean.BeanState |
|
Constructor Summary |
Shape()
|
Shape(com.vividsolutions.jts.geom.Geometry geometry)
Create a shape object based on a Geometry |
Shape(String wkt)
Construct a shape object based on a WKT string |
| Methods inherited from class nl.cloudfarming.client.model.Bean |
addPropertyChangeListener, addPropertyChangeListener, addUndoableEditListener, fireUndoableEvent, getPropertyChangeSupport, getTransferData, getTransferDataFlavors, isDataFlavorSupported, removePropertyChangeListener, removePropertyChangeListener, removeUndoableEditListener |
Shape
public Shape()
Shape
public Shape(String wkt)
throws com.vividsolutions.jts.io.ParseException
- Construct a shape object based on a WKT string
- Parameters:
wkt - will be transformed into a Geometry
- Throws:
com.vividsolutions.jts.io.ParseException
Shape
public Shape(com.vividsolutions.jts.geom.Geometry geometry)
- Create a shape object based on a Geometry
- Parameters:
geometry -
getName
public String getName()
- Overrides:
getName in class Bean
setName
public void setName(String name)
- Overrides:
setName in class Bean
getGeometry
public com.vividsolutions.jts.geom.Geometry getGeometry()
- Specified by:
getGeometry in interface LayerObject<com.vividsolutions.jts.geom.Geometry,Shape>
getId
public long getId()
- Specified by:
getId in interface LayerObject<com.vividsolutions.jts.geom.Geometry,Shape>
getType
public Shape.ShapeType getType()
setType
public void setType(Shape.ShapeType type)
equals
public boolean equals(Object obj)
- Overrides:
equals in class Bean
hashCode
public int hashCode()
- Overrides:
hashCode in class Bean
getObject
public Shape getObject()
- Specified by:
getObject in interface LayerObject<com.vividsolutions.jts.geom.Geometry,Shape>
getKey
public String getKey()
- Specified by:
getKey in interface LayerObject<com.vividsolutions.jts.geom.Geometry,Shape>
getKeyAttributeValue
public Object getKeyAttributeValue()
- Specified by:
getKeyAttributeValue in interface LayerObject<com.vividsolutions.jts.geom.Geometry,Shape>
getTooltipText
public String getTooltipText()
- Specified by:
getTooltipText in interface LayerObject<com.vividsolutions.jts.geom.Geometry,Shape>
save
public void save()
- Specified by:
save in interface LayerObject<com.vividsolutions.jts.geom.Geometry,Shape>
getActions
public LayerObjectAction[] getActions()
- Specified by:
getActions in interface LayerObject<com.vividsolutions.jts.geom.Geometry,Shape>
Copyright © 2011. All Rights Reserved.