|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.event.WindowAdapter
org.openstreetmap.josm.gui.dialogs.relation.RelationDialogManager
public class RelationDialogManager
RelationDialogManager keeps track of the open relation editors.
| Nested Class Summary | |
|---|---|
private static class |
RelationDialogManager.DialogContext
Helper class for keeping the context of a relation editor. |
| Field Summary | |
|---|---|
private java.util.HashMap<RelationDialogManager.DialogContext,RelationEditor> |
openDialogs
the map of open dialogs |
(package private) static RelationDialogManager |
relationDialogManager
keeps track of open relation editors |
| Constructor Summary | |
|---|---|
RelationDialogManager()
constructor |
|
| Method Summary | |
|---|---|
void |
activeLayerChange(Layer oldLayer,
Layer newLayer)
Notifies this listener that the active layer has changed. |
void |
close(OsmDataLayer layer,
Relation relation)
Closes the editor open for a specific layer and a specific relation. |
RelationEditor |
getEditorForRelation(OsmDataLayer layer,
Relation relation)
Replies the editor for the relation managed by layer. |
static RelationDialogManager |
getRelationDialogManager()
Replies the singleton RelationDialogManager |
protected boolean |
hasEditorWithCloseUpperLeftCorner(java.awt.Point p,
RelationEditor thisEditor)
Replies true, if there is another open RelationEditor whose
upper left corner is close to p. |
boolean |
isOpenInEditor(OsmDataLayer layer,
Relation relation)
Replies true if there is an open relation editor for the relation managed by the given layer. |
void |
layerAdded(Layer newLayer)
Notifies this listener that a layer has been added. |
void |
layerRemoved(Layer oldLayer)
called when a layer is removed |
void |
positionOnScreen(RelationEditor editor)
Positions a RelationEditor on the screen. |
void |
register(OsmDataLayer layer,
Relation relation,
RelationEditor editor)
Register the relation editor for a relation managed by a OsmDataLayer. |
void |
updateContext(OsmDataLayer layer,
Relation relation,
RelationEditor editor)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
| Methods inherited from class java.awt.event.WindowAdapter |
|---|
windowActivated, windowClosing, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static RelationDialogManager relationDialogManager
private final java.util.HashMap<RelationDialogManager.DialogContext,RelationEditor> openDialogs
| Constructor Detail |
|---|
public RelationDialogManager()
| Method Detail |
|---|
public static RelationDialogManager getRelationDialogManager()
RelationDialogManager
RelationDialogManager
public void register(OsmDataLayer layer,
Relation relation,
RelationEditor editor)
OsmDataLayer.
layer - the layerrelation - the relationeditor - the editor
public void updateContext(OsmDataLayer layer,
Relation relation,
RelationEditor editor)
public void close(OsmDataLayer layer,
Relation relation)
layer - the layerrelation - the relation
public boolean isOpenInEditor(OsmDataLayer layer,
Relation relation)
layer - the layerrelation - the relation. May be null.
public RelationEditor getEditorForRelation(OsmDataLayer layer,
Relation relation)
layer - the layerrelation - the relation
isOpenInEditor(OsmDataLayer, Relation)public void layerRemoved(Layer oldLayer)
layerRemoved in interface MapView.LayerChangeListeneroldLayer - The old removed layer
public void activeLayerChange(Layer oldLayer,
Layer newLayer)
MapView.LayerChangeListener
activeLayerChange in interface MapView.LayerChangeListeneroldLayer - The previous active layernewLayer - The new activer layerpublic void layerAdded(Layer newLayer)
MapView.LayerChangeListener
layerAdded in interface MapView.LayerChangeListenernewLayer - The new added layerpublic void windowClosed(java.awt.event.WindowEvent e)
windowClosed in interface java.awt.event.WindowListenerwindowClosed in class java.awt.event.WindowAdapter
protected boolean hasEditorWithCloseUpperLeftCorner(java.awt.Point p,
RelationEditor thisEditor)
RelationEditor whose
upper left corner is close to p.
p - the reference point to check
RelationEditor whose
upper left corner is close to p.public void positionOnScreen(RelationEditor editor)
RelationEditor on the screen. Tries to center it on the
screen. If it hide another instance of an editor at the same position this
method tries to reposition editor by moving it slightly down and
slightly to the right.
editor - the editor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||