Ignore:
Timestamp:
2016-01-18T19:35:32+01:00 (8 years ago)
Author:
simon04
Message:

fix #10789 - History dialog: indicate the number of changeset comments

Clicking on the button opens the changeset manager and displays the comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java

    r9059 r9526  
    55
    66import java.awt.BorderLayout;
     7import java.awt.Component;
    78import java.awt.Container;
    89import java.awt.Dimension;
     
    7071    /** the unique instance of the cache manager  */
    7172    private static volatile ChangesetCacheManager instance;
     73    private JTabbedPane pnlChangesetDetailTabs;
    7274
    7375    /**
     
    164166    protected JPanel buildChangesetDetailPanel() {
    165167        JPanel pnl = new JPanel(new BorderLayout());
    166         JTabbedPane tp = new JTabbedPane();
     168        JTabbedPane tp =  new JTabbedPane();
     169        pnlChangesetDetailTabs = tp;
    167170
    168171        // -- add the details panel
     
    647650
    648651    /**
     652     * Selects the given component in the detail tabbed panel
     653     * @param clazz the class of the component to select
     654     */
     655    public void setSelectedComponentInDetailPanel(Class<? extends JComponent> clazz) {
     656        for (Component component : pnlChangesetDetailTabs.getComponents()) {
     657            if (component.getClass().equals(clazz)) {
     658                pnlChangesetDetailTabs.setSelectedComponent(component);
     659                break;
     660            }
     661        }
     662    }
     663
     664    /**
    649665     * Runs the given changeset download task.
    650666     * @param task The changeset download task to run
Note: See TracChangeset for help on using the changeset viewer.