|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException com.bbn.openmap.event.ProjectionChangeVetoException
public class ProjectionChangeVetoException
An exception used by PropertyChangeListeners on the MapBean to veto a projection change on the MapBean. Should be used by components that want to limit the range of projection changes allowed in a application, or during certain application conditions. These exceptions should be used by PropertyChangeListeners on the MapBean listening for MapBean.ProjectionProperty changes, because the MapBean notifies the PropertyChangeListeners of projection changes before it notifies the ProjectionListeners (the layers). If the MapBean catches one of these exceptions from a PropertyChangeListener, the projection parameters will be changed to the values provided, all of the PropertyChangeListeners will be notified again, and the layers will be finally be notified when the PropertyChangeListeners are happy. Only projection changes relating to scale, center and type can be vetoed. The size of the projection (pixel width and height) is dictated by the MapBean's parent.
Field Summary | |
---|---|
static java.lang.String |
CENTER
|
protected java.util.Properties |
parameters
|
static java.lang.String |
PROJECTION_TYPE
|
static java.lang.String |
SCALE
|
Constructor Summary | |
---|---|
ProjectionChangeVetoException()
Constructs a new projection change veto exception with null
as its detail message and no suggested changes. |
|
ProjectionChangeVetoException(java.lang.String message)
Constructs a new projection change veto exception with the specified detail message. |
|
ProjectionChangeVetoException(java.lang.String message,
java.lang.Class<? extends Proj> projectionType,
java.awt.geom.Point2D center,
java.lang.Number scale)
Constructs a new projection change veto exception with the specified detail message and common parameter objects for OpenMap projections that can be cause for veto. |
|
ProjectionChangeVetoException(java.lang.String message,
java.util.Properties suggestedChanges)
Constructs a new projection change veto exception with the specified detail message and a Properties object containing parameter objects representing new settings for the rejected projection. |
Method Summary | |
---|---|
java.lang.Object |
getSuggested(java.lang.String parameter)
|
void |
removeSuggested(java.lang.String parameter)
Remove a suggested parameter from the event. |
java.lang.String |
toString()
|
void |
updateWithParameters(MapBean mapBean)
A helper function for the MapBean. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Properties parameters
public static final java.lang.String CENTER
public static final java.lang.String SCALE
public static final java.lang.String PROJECTION_TYPE
Constructor Detail |
---|
public ProjectionChangeVetoException()
null
as its detail message and no suggested changes. The cause is not
initialized, and may subsequently be initialized by a call to
Throwable.initCause(java.lang.Throwable)
.
public ProjectionChangeVetoException(java.lang.String message)
Throwable.initCause(java.lang.Throwable)
.
message
- the detail message, with no suggested changes.public ProjectionChangeVetoException(java.lang.String message, java.lang.Class<? extends Proj> projectionType, java.awt.geom.Point2D center, java.lang.Number scale)
Throwable.initCause(java.lang.Throwable)
. The
objects provided as arguments will be added to a Properties object set in
the exception.
message
- the detail message.projectionType
- set to null if the new projection class type is OK,
otherwise set the projection class that should be used.center
- set to null of the new projection center is OK, otherwise
set to the new center point of the projection.scale
- set to null if the new projection scale is OK, otherwise
provide a new scale value.public ProjectionChangeVetoException(java.lang.String message, java.util.Properties suggestedChanges)
Throwable.initCause(java.lang.Throwable)
.
message
- the detail message.suggestedChanges
- A Properties object holding CENTER, SCALE,
PROJECTION_TYPE changes, or any other parameters that can be used
by the event in the updateWithParameters method.Method Detail |
---|
public java.lang.Object getSuggested(java.lang.String parameter)
parameter
- the key for the projection parameter.
public void removeSuggested(java.lang.String parameter)
parameter
- public void updateWithParameters(MapBean mapBean)
mapBean
- public java.lang.String toString()
toString
in class java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |