Class HistoryBrowserDialogManager
java.lang.Object
org.openstreetmap.josm.gui.history.HistoryBrowserDialogManager
- All Implemented Interfaces:
LayerManager.LayerChangeListener
public final class HistoryBrowserDialogManager
extends Object
implements LayerManager.LayerChangeListener
Manager allowing to show/hide history dialogs.
- Since:
- 2019
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LinkedHashMap<Long,HistoryBrowserDialog> private static final List<HistoryHook>private static HistoryBrowserDialogManagerprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaddHistoryHook(HistoryHook hook) Adds a newHistoryHook.booleanexistsDialog(long id) Determines if an history dialog exists for the given object id.static HistoryBrowserDialogManagerReplies the unique instance.private booleanvoidhide(HistoryBrowserDialog dialog) Hides the specified history dialog and cleans associated resources.voidhideAll()Hides and destroys all currently visible history browser dialogsprivate static booleanvoidNotifies this listener that a layer has been added.voidNotifies this listener that the order of layers was changed.voidNotifies this listener that a layer was just removed.private voidplaceOnScreen(HistoryBrowserDialog dialog) static booleanremoveHistoryHook(HistoryHook hook) Removes an existingHistoryHook.voidShow history dialog for the given history.voidshowHistory(Component parent, Collection<? extends PrimitiveId> primitives) Show history dialog(s) for the given primitive(s).voidshowHistory(Collection<? extends PrimitiveId> primitives) Show history dialog(s) for the given primitive(s).
-
Field Details
-
WINDOW_GEOMETRY_PREF
-
instance
-
dialogs
-
hooks
-
-
Constructor Details
-
HistoryBrowserDialogManager
private HistoryBrowserDialogManager()
-
-
Method Details
-
isUnloaded
-
getInstance
Replies the unique instance.- Returns:
- the unique instance
-
existsDialog
Determines if an history dialog exists for the given object id.- Parameters:
id- the object id- Returns:
trueif an history dialog exists for the given object id,falseotherwise
-
hasDialogWithCloseUpperLeftCorner
-
placeOnScreen
-
hide
Hides the specified history dialog and cleans associated resources.- Parameters:
dialog- History dialog to hide
-
hideAll
Hides and destroys all currently visible history browser dialogs- Since:
- 2448
-
show
Show history dialog for the given history.- Parameters:
h- History to show- Since:
- 2448
-
layerAdded
Description copied from interface:LayerManager.LayerChangeListenerNotifies this listener that a layer has been added.Listeners are called in the EDT thread. You should not do blocking or long-running tasks in this method.
- Specified by:
layerAddedin interfaceLayerManager.LayerChangeListener- Parameters:
e- The new added layer event
-
layerRemoving
Description copied from interface:LayerManager.LayerChangeListenerNotifies this listener that a layer was just removed.Listeners are called in the EDT thread after the layer was removed. Use
LayerManager.LayerRemoveEvent.scheduleRemoval(Collection)to remove more layers. You should not do blocking or long-running tasks in this method.- Specified by:
layerRemovingin interfaceLayerManager.LayerChangeListener- Parameters:
e- The layer to be removed (as event)
-
layerOrderChanged
Description copied from interface:LayerManager.LayerChangeListenerNotifies this listener that the order of layers was changed.Listeners are called in the EDT thread. You should not do blocking or long-running tasks in this method.
- Specified by:
layerOrderChangedin interfaceLayerManager.LayerChangeListener- Parameters:
e- The order change event.
-
addHistoryHook
Adds a newHistoryHook.- Parameters:
hook- hook to add- Returns:
true(as specified byCollection.add(E))- Since:
- 13947
-
removeHistoryHook
Removes an existingHistoryHook.- Parameters:
hook- hook to remove- Returns:
trueif this list contained the specified element- Since:
- 13947
-
showHistory
Show history dialog(s) for the given primitive(s).- Parameters:
primitives- The primitive(s) for which history will be displayed
-
showHistory
Show history dialog(s) for the given primitive(s).- Parameters:
parent- Parent component for displayed dialog boxesprimitives- The primitive(s) for which history will be displayed- Since:
- 16123
-