Changeset 1832 in josm for trunk/src/org


Ignore:
Timestamp:
2009-07-25T12:14:01+02:00 (15 years ago)
Author:
Gubaer
Message:

fixed #3078: New relation editor overemphasizes relation ordering

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java

    r1831 r1832  
    515515        gc.weightx = 0.0;
    516516        gc.weighty = 0.0;
     517        AddSelectedAtEndAction addSelectedAtEndAction = new AddSelectedAtEndAction();
     518        selectionTableModel.addTableModelListener(addSelectedAtEndAction);
     519        pnl.add(new JButton(addSelectedAtEndAction), gc);
     520
     521        // -----
     522        gc.gridy = 1;
     523        RemoveSelectedAction removeSelectedAction = new RemoveSelectedAction();
     524        selectionTableModel.addTableModelListener(removeSelectedAction);
     525        pnl.add(new JButton(removeSelectedAction), gc);
     526
     527        // ------
     528        // just grab the remaining space
     529        gc.gridy = 2;
     530        gc.weighty = 1.0;
     531        gc.fill = GridBagConstraints.BOTH;
     532        pnl.add(new JPanel(), gc);
     533
     534        // -----
     535        gc.gridy = 3;
     536        gc.weighty = 0.0;
    517537        AddSelectedAtStartAction addSelectionAction = new AddSelectedAtStartAction();
    518538        selectionTableModel.addTableModelListener(addSelectionAction);
     
    520540
    521541        // -----
    522         gc.gridy = 1;
     542        gc.gridy = 4;
    523543        AddSelectedBeforeSelection addSelectedBeforeSelectionAction = new AddSelectedBeforeSelection();
    524544        selectionTableModel.addTableModelListener(addSelectedBeforeSelectionAction);
     
    527547
    528548        // -----
    529         gc.gridy = 2;
     549        gc.gridy = 5;
    530550        AddSelectedAfterSelection addSelectedAfterSelectionAction = new AddSelectedAfterSelection();
    531551        selectionTableModel.addTableModelListener(addSelectedAfterSelectionAction);
    532552        memberTableModel.getSelectionModel().addListSelectionListener(addSelectedAfterSelectionAction);
    533553        pnl.add(new JButton(addSelectedAfterSelectionAction), gc);
    534 
    535         // -----
    536         gc.gridy = 3;
    537         AddSelectedAtEndAction addSelectedAtEndAction = new AddSelectedAtEndAction();
    538         selectionTableModel.addTableModelListener(addSelectedAtEndAction);
    539         pnl.add(new JButton(addSelectedAtEndAction), gc);
    540 
    541         // -----
    542         gc.gridy = 4;
    543         RemoveSelectedAction removeSelectedAction = new RemoveSelectedAction();
    544         selectionTableModel.addTableModelListener(removeSelectedAction);
    545         pnl.add(new JButton(removeSelectedAction), gc);
    546 
    547         // ------
    548         // just grab the remaining space
    549         gc.gridy = 5;
    550         gc.weighty = 1.0;
    551         gc.fill = GridBagConstraints.BOTH;
    552         pnl.add(new JPanel(), gc);
    553554
    554555        return pnl;
Note: See TracChangeset for help on using the changeset viewer.