org.openstreetmap.josm.gui.history
Class HistoryBrowserDialogManager

java.lang.Object
  extended by org.openstreetmap.josm.gui.history.HistoryBrowserDialogManager
All Implemented Interfaces:
MapView.LayerChangeListener

public class HistoryBrowserDialogManager
extends java.lang.Object
implements MapView.LayerChangeListener


Field Summary
private  java.util.Map<java.lang.Long,HistoryBrowserDialog> dialogs
           
private static HistoryBrowserDialogManager instance
           
private  Predicate<OsmPrimitive> notNewPredicate
           
private  Predicate<OsmPrimitive> unloadedHistoryPredicate
           
 
Constructor Summary
protected HistoryBrowserDialogManager()
           
 
Method Summary
 void activeLayerChange(Layer oldLayer, Layer newLayer)
          Notifies this listener that the active layer has changed.
 boolean existsDialog(long id)
           
static HistoryBrowserDialogManager getInstance()
           
protected  boolean hasDialogWithCloseUpperLeftCorner(java.awt.Point p)
           
 void hide(HistoryBrowserDialog dialog)
           
 void hideAll()
          Hides and destroys all currently visible history browser dialogs
 void layerAdded(Layer newLayer)
          Notifies this listener that a layer has been added.
 void layerRemoved(Layer oldLayer)
          Notifies this listener that a layer has been removed.
 void placeOnScreen(HistoryBrowserDialog dialog)
           
 void show(History h)
           
 void show(long id)
           
 void show(long id, HistoryBrowserDialog dialog)
           
 void showHistory(java.util.Collection<OsmPrimitive> primitives)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static HistoryBrowserDialogManager instance

dialogs

private java.util.Map<java.lang.Long,HistoryBrowserDialog> dialogs

unloadedHistoryPredicate

private final Predicate<OsmPrimitive> unloadedHistoryPredicate

notNewPredicate

private final Predicate<OsmPrimitive> notNewPredicate
Constructor Detail

HistoryBrowserDialogManager

protected HistoryBrowserDialogManager()
Method Detail

getInstance

public static HistoryBrowserDialogManager getInstance()

existsDialog

public boolean existsDialog(long id)

show

public void show(long id,
                 HistoryBrowserDialog dialog)

show

public void show(long id)

hasDialogWithCloseUpperLeftCorner

protected boolean hasDialogWithCloseUpperLeftCorner(java.awt.Point p)

placeOnScreen

public void placeOnScreen(HistoryBrowserDialog dialog)

hide

public void hide(HistoryBrowserDialog dialog)

hideAll

public void hideAll()
Hides and destroys all currently visible history browser dialogs


show

public void show(History h)

activeLayerChange

public void activeLayerChange(Layer oldLayer,
                              Layer newLayer)
Description copied from interface: MapView.LayerChangeListener
Notifies this listener that the active layer has changed.

Specified by:
activeLayerChange in interface MapView.LayerChangeListener
Parameters:
oldLayer - The previous active layer
newLayer - The new activer layer

layerAdded

public void layerAdded(Layer newLayer)
Description copied from interface: MapView.LayerChangeListener
Notifies this listener that a layer has been added.

Specified by:
layerAdded in interface MapView.LayerChangeListener
Parameters:
newLayer - The new added layer

layerRemoved

public void layerRemoved(Layer oldLayer)
Description copied from interface: MapView.LayerChangeListener
Notifies this listener that a layer has been removed.

Specified by:
layerRemoved in interface MapView.LayerChangeListener
Parameters:
oldLayer - The old removed layer

showHistory

public void showHistory(java.util.Collection<OsmPrimitive> primitives)


JOSM