Index: trunk/src/org/openstreetmap/josm/data/osm/history/History.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/History.java	(revision 7525)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/History.java	(revision 7527)
@@ -17,7 +17,8 @@
  * Represents the history of an OSM primitive. The history consists
  * of a list of object snapshots with a specific version.
- *
+ * @since 1670
  */
-public class History{
+public class History {
+
     private static interface FilterPredicate {
         boolean matches(HistoryOsmPrimitive primitive);
@@ -38,8 +39,9 @@
     /** the object id */
     private final long id;
+    /** the object type */
     private final OsmPrimitiveType type;
 
     /**
-     * Creates a new history for an OSM primitive
+     * Creates a new history for an OSM primitive.
      *
      * @param id the id. &gt; 0 required.
@@ -62,4 +64,8 @@
     }
 
+    /**
+     * Returns a new copy of this history, sorted in ascending order.
+     * @return a new copy of this history, sorted in ascending order
+     */
     public History sortAscending() {
         List<HistoryOsmPrimitive> copy = new ArrayList<>(versions);
@@ -72,8 +78,12 @@
                     }
                 }
-                );
+            );
         return new History(id, type, copy);
     }
 
+    /**
+     * Returns a new copy of this history, sorted in descending order.
+     * @return a new copy of this history, sorted in descending order
+     */
     public History sortDescending() {
         List<HistoryOsmPrimitive> copy = new ArrayList<>(versions);
@@ -86,8 +96,13 @@
                     }
                 }
-                );
+            );
         return new History(id, type,copy);
     }
 
+    /**
+     * Returns a new partial copy of this history, from the given date
+     * @param fromDate the starting date
+     * @return a new partial copy of this history, from the given date
+     */
     public History from(final Date fromDate) {
         return filter(
@@ -99,7 +114,12 @@
                     }
                 }
-                );
-    }
-
+            );
+    }
+
+    /**
+     * Returns a new partial copy of this history, until the given date
+     * @param untilDate the end date
+     * @return a new partial copy of this history, until the given date
+     */
     public History until(final Date untilDate) {
         return filter(
@@ -111,11 +131,22 @@
                     }
                 }
-                );
-    }
-
+            );
+    }
+
+    /**
+     * Returns a new partial copy of this history, between the given dates
+     * @param fromDate the starting date
+     * @param untilDate the end date
+     * @return a new partial copy of this history, between the given dates
+     */
     public History between(Date fromDate, Date untilDate) {
         return this.from(fromDate).until(untilDate);
     }
 
+    /**
+     * Returns a new partial copy of this history, from the given version number
+     * @param fromVersion the starting version number
+     * @return a new partial copy of this history, from the given version number
+     */
     public History from(final long fromVersion) {
         return filter(
@@ -127,7 +158,12 @@
                     }
                 }
-                );
-    }
-
+            );
+    }
+
+    /**
+     * Returns a new partial copy of this history, to the given version number
+     * @param untilVersion the ending version number
+     * @return a new partial copy of this history, to the given version number
+     */
     public History until(final long untilVersion) {
         return filter(
@@ -139,11 +175,22 @@
                     }
                 }
-                );
-    }
-
+            );
+    }
+
+    /**
+     * Returns a new partial copy of this history, betwwen the given version numbers
+     * @param fromVersion the starting version number
+     * @param untilVersion the ending version number
+     * @return a new partial copy of this history, between the given version numbers
+     */
     public History between(long fromVersion, long untilVersion) {
         return this.from(fromVersion).until(untilVersion);
     }
 
+    /**
+     * Returns a new partial copy of this history, for the given user id
+     * @param uid the user id
+     * @return a new partial copy of this history, for the given user id
+     */
     public History forUserId(final long uid) {
         return filter(
@@ -155,7 +202,14 @@
                     }
                 }
-                );
-    }
-
+            );
+    }
+
+    /**
+     * Replies the primitive id for this history.
+     *
+     * @return the primitive id
+     * @see #getPrimitiveId
+     * @see #getType
+     */
     public long getId() {
         return id;
@@ -166,4 +220,5 @@
      *
      * @return the primitive id
+     * @see #getId
      */
     public PrimitiveId getPrimitiveId() {
@@ -171,5 +226,10 @@
     }
 
-    public boolean contains(long version){
+    /**
+     * Determines if this history contains a specific version number.
+     * @param version the version number to look for
+     * @return {@code true} if this history contains {@code version}, {@code false} otherwise
+     */
+    public boolean contains(long version) {
         for (HistoryOsmPrimitive primitive: versions) {
             if (primitive.matches(id,version))
@@ -194,4 +254,11 @@
     }
 
+    /**
+     * Replies the history primitive at given <code>date</code>. null,
+     * if no such primitive exists.
+     *
+     * @param date the date
+     * @return the history primitive at given <code>date</code>
+     */
     public HistoryOsmPrimitive getByDate(Date date) {
         History h = sortAscending();
@@ -209,10 +276,22 @@
     }
 
+    /**
+     * Replies the history primitive at index <code>idx</code>.
+     *
+     * @param idx the index
+     * @return the history primitive at index <code>idx</code>
+     * @throws IndexOutOfBoundsException if index out or range
+     */
     public HistoryOsmPrimitive get(int idx) throws IndexOutOfBoundsException {
         if (idx < 0 || idx >= versions.size())
-            throw new IndexOutOfBoundsException(MessageFormat.format("Parameter ''{0}'' in range 0..{1} expected. Got ''{2}''.", "idx", versions.size()-1, idx));
+            throw new IndexOutOfBoundsException(MessageFormat.format(
+                    "Parameter ''{0}'' in range 0..{1} expected. Got ''{2}''.", "idx", versions.size()-1, idx));
         return versions.get(idx);
     }
 
+    /**
+     * Replies the earliest entry of this history.
+     * @return the earliest entry of this history
+     */
     public HistoryOsmPrimitive getEarliest() {
         if (isEmpty())
@@ -221,4 +300,8 @@
     }
 
+    /**
+     * Replies the latest entry of this history.
+     * @return the latest entry of this history
+     */
     public HistoryOsmPrimitive getLatest() {
         if (isEmpty())
@@ -227,4 +310,8 @@
     }
 
+    /**
+     * Replies the number of versions.
+     * @return the number of versions
+     */
     public int getNumVersions() {
         return versions.size();
@@ -239,4 +326,9 @@
     }
 
+    /**
+     * Replies the primitive type for this history.
+     * @return the primitive type
+     * @see #getId
+     */
     public OsmPrimitiveType getType() {
         return type;
Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java	(revision 7525)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java	(revision 7527)
@@ -29,6 +29,16 @@
 import org.openstreetmap.josm.tools.WindowGeometry;
 
+/**
+ * Manager allowing to show/hide history dialogs.
+ * @since 2019
+ */
 public class HistoryBrowserDialogManager implements MapView.LayerChangeListener {
+
     private static HistoryBrowserDialogManager instance;
+
+    /**
+     * Replies the unique instance.
+     * @return the unique instance
+     */
     public static HistoryBrowserDialogManager getInstance() {
         if (instance == null) {
@@ -45,9 +55,14 @@
     }
 
+    /**
+     * Determines if an history dialog exists for the given object id.
+     * @param id the object id
+     * @return {@code true} if an history dialog exists for the given object id, {@code false} otherwise
+     */
     public boolean existsDialog(long id) {
         return dialogs.containsKey(id);
     }
 
-    public void show(long id, HistoryBrowserDialog dialog) {
+    protected void show(long id, HistoryBrowserDialog dialog) {
         if (dialogs.values().contains(dialog)) {
             show(id);
@@ -60,8 +75,10 @@
                 Main.debug("#10462 - JFrame.isDefaultLookAndFeelDecorated: "+JFrame.isDefaultLookAndFeelDecorated());
                 Main.debug("#10462 - dialog.isUndecorated: "+dialog.isUndecorated());
+                Main.debug("#10462 - UIManager.getLookAndFeel: "+UIManager.getLookAndFeel());
                 Main.debug("#10462 - LookAndFeel.getSupportsWindowDecorations: "+UIManager.getLookAndFeel().getSupportsWindowDecorations());
                 Main.debug("#10462 - JRootPane.getWindowDecorationStyle: "+dialog.getRootPane().getWindowDecorationStyle());
                 Main.debug("#10462 - Window.getIconImages: "+dialog.getIconImages());
                 Main.debug("#10462 - Dialog.getTitle: "+dialog.getTitle());
+                Main.debug("#10462 - Dialog.getInsets: "+dialog.getInsets());
             }
             dialogs.put(id, dialog);
@@ -69,5 +86,5 @@
     }
 
-    public void show(long id) {
+    protected void show(long id) {
         if (dialogs.keySet().contains(id)) {
             dialogs.get(id).toFront();
@@ -87,9 +104,9 @@
     final String WINDOW_GEOMETRY_PREF = getClass().getName() + ".geometry";
 
-    public void placeOnScreen(HistoryBrowserDialog dialog) {
+    protected void placeOnScreen(HistoryBrowserDialog dialog) {
         WindowGeometry geometry = new WindowGeometry(WINDOW_GEOMETRY_PREF, WindowGeometry.centerOnScreen(new Dimension(850, 500)));
         geometry.applySafe(dialog);
         Point p = dialog.getLocation();
-        while(hasDialogWithCloseUpperLeftCorner(p)) {
+        while (hasDialogWithCloseUpperLeftCorner(p)) {
             p.x += 20;
             p.y += 20;
@@ -98,4 +115,8 @@
     }
 
+    /**
+     * Hides the specified history dialog and cleans associated resources.
+     * @param dialog History dialog to hide
+     */
     public void hide(HistoryBrowserDialog dialog) {
         long id = 0;
@@ -129,4 +150,8 @@
     }
 
+    /**
+     * Show history dialog for the given history.
+     * @param h History to show
+     */
     public void show(History h) {
         if (h == null)
@@ -151,5 +176,4 @@
     public void layerRemoved(Layer oldLayer) {
         // remove all history browsers if the number of layers drops to 0
-        //
         if (Main.isDisplayingMapView() && Main.map.mapView.getNumLayers() == 0) {
             hideAll();
@@ -157,4 +181,8 @@
     }
 
+    /**
+     * Show history dialog(s) for the given primitive(s).
+     * @param primitives The primitive(s) for which history will be displayed
+     */
     public void showHistory(final Collection<? extends PrimitiveId> primitives) {
         final Collection<? extends PrimitiveId> notNewPrimitives = Utils.filter(primitives, notNewPredicate);
