| java.lang.Object net.refractions.udig.tools.edit.behaviour.SelectGeometryBehaviour
SelectGeometryBehaviour | public class SelectGeometryBehaviour implements EventBehaviour(Code) | |
Requirements:
- state==MODIFYING or NONE
- event type == RELEASED
- only a single modifier may be down
- shift and ctrl are only legal modifiers
- button1 must be the button that was released
- no buttons may be down
- Not over currently selected geometry
Action:
- If no currently selected geometry && mouse is over feature then:
- If the feature's geometry isn't of the type specified in constructor return or:
- Clear Editblackboard and set feature's geometry on blackboard.
- set the current geom to be the geometry selected
- set the current Edit feature to be selected feature
- set mode to be Modified?
- If there is a currently selected geometry && mouse is over a different feature:
- If no modifiers select feature as described above
- if control is down add the feature to the Editblackboard or remove it if it is already on
the EditBlackboard
- if shift is down add the feature to the Editblackboard or do nothing if it is already on the
EditBlackboard
- If there is a currently selected geometry && mouse is not over a different feature:
- Run acceptBehaviours
- deselect EditFeature
- deselect current EditGeom
- clear Editblackboard
- set current state to NONE
author: jones since: 1.1.0 |
Constructor Summary | |
public | SelectGeometryBehaviour(Class[] acceptableClasses, short filterType) Create instance
Parameters: acceptableClasses - used to determine if a feature can be selected. |
SelectGeometryBehaviour | public SelectGeometryBehaviour(Class[] acceptableClasses, short filterType)(Code) | | Create instance
Parameters: acceptableClasses - used to determine if a feature can be selected. If point is not inarray then point geometries can not be selected. Parameters: filterType - one of the constants in FilterType that start with GEOMETRY_ |
getAcceptableClasses | public Class[] getAcceptableClasses()(Code) | | Returns the acceptableClasses. |
getFilterType | public short getFilterType()(Code) | | Returns the filterType. |
isOnlyAdd | public boolean isOnlyAdd()(Code) | | Returns the onlyAdd. |
isPermitClear | public boolean isPermitClear()(Code) | | Returns the permitClear. |
isTreatUnknownGeomsAsPolygon | public boolean isTreatUnknownGeomsAsPolygon()(Code) | | Returns the treatUnkownGeomsAsPolygon. |
setAcceptableClasses | public void setAcceptableClasses(Class[] acceptableClasses)(Code) | | Parameters: acceptableClasses - The acceptableClasses to set. |
setCreateGeomOnNoneSelect | public void setCreateGeomOnNoneSelect(ShapeType toCreate2)(Code) | | |
setFilterType | public void setFilterType(short filterType)(Code) | | Parameters: filterType - The filterType to set. |
setOnlyAdd | public void setOnlyAdd(boolean onlyAdd)(Code) | | Parameters: onlyAdd - The onlyAdd to set. |
setPermitClear | public void setPermitClear(boolean permitClear)(Code) | | Parameters: permitClear - The permitClear to set. |
setTreatUnknownGeomsAsPolygon | public void setTreatUnknownGeomsAsPolygon(boolean treatUnknownGeomsAsPolygon)(Code) | | Parameters: treatUnknownGeomsAsPolygon - The treatUnknownGeomsAsPolygon to set. |
|
|