public class HistoryBrowserDialogManager extends java.lang.Object implements MapView.LayerChangeListener
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.Long,HistoryBrowserDialog> |
dialogs |
private static HistoryBrowserDialogManager |
instance |
private Predicate<PrimitiveId> |
notNewPredicate |
private Predicate<PrimitiveId> |
unloadedHistoryPredicate |
(package private) java.lang.String |
WINDOW_GEOMETRY_PREF |
Modifier | Constructor and Description |
---|---|
protected |
HistoryBrowserDialogManager() |
Modifier and Type | Method and Description |
---|---|
void |
activeLayerChange(Layer oldLayer,
Layer newLayer)
Notifies this listener that the active layer has changed.
|
boolean |
existsDialog(long id)
Determines if an history dialog exists for the given object id.
|
static HistoryBrowserDialogManager |
getInstance()
Replies the unique instance.
|
protected boolean |
hasDialogWithCloseUpperLeftCorner(java.awt.Point p) |
void |
hide(HistoryBrowserDialog dialog)
Hides the specified history dialog and cleans associated resources.
|
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.
|
protected void |
placeOnScreen(HistoryBrowserDialog dialog) |
void |
show(History h)
Show history dialog for the given history.
|
protected void |
show(long id) |
protected void |
show(long id,
HistoryBrowserDialog dialog) |
void |
showHistory(java.util.Collection<? extends PrimitiveId> primitives)
Show history dialog(s) for the given primitive(s).
|
private static HistoryBrowserDialogManager instance
private java.util.Map<java.lang.Long,HistoryBrowserDialog> dialogs
final java.lang.String WINDOW_GEOMETRY_PREF
private final Predicate<PrimitiveId> unloadedHistoryPredicate
private final Predicate<PrimitiveId> notNewPredicate
protected HistoryBrowserDialogManager()
public static HistoryBrowserDialogManager getInstance()
public boolean existsDialog(long id)
id
- the object idtrue
if an history dialog exists for the given object id, false
otherwiseprotected void show(long id, HistoryBrowserDialog dialog)
protected void show(long id)
protected boolean hasDialogWithCloseUpperLeftCorner(java.awt.Point p)
protected void placeOnScreen(HistoryBrowserDialog dialog)
public void hide(HistoryBrowserDialog dialog)
dialog
- History dialog to hidepublic void hideAll()
public void show(History h)
h
- History to showpublic void activeLayerChange(Layer oldLayer, Layer newLayer)
MapView.LayerChangeListener
activeLayerChange
in interface MapView.LayerChangeListener
oldLayer
- The previous active layernewLayer
- The new activer layerpublic void layerAdded(Layer newLayer)
MapView.LayerChangeListener
layerAdded
in interface MapView.LayerChangeListener
newLayer
- The new added layerpublic void layerRemoved(Layer oldLayer)
MapView.LayerChangeListener
layerRemoved
in interface MapView.LayerChangeListener
oldLayer
- The old removed layerpublic void showHistory(java.util.Collection<? extends PrimitiveId> primitives)
primitives
- The primitive(s) for which history will be displayed