Ignore:
Timestamp:
2009-07-15T17:22:56+02:00 (15 years ago)
Author:
Gubaer
Message:

Relation Editor: complete rework
Relation Editor: had to temporarily remove code for "link information" and "sorting"
IO Subsystem: clean up in exception handling
some cosmetics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java

    r1661 r1790  
    9595
    9696            button = new JButton(action);
    97             if(buttonIcons != null && buttonIcons[i] != null)
     97            if(buttonIcons != null && buttonIcons[i] != null) {
    9898                button.setIcon(ImageProvider.get(buttonIcons[i]));
     99            }
    99100
    100             if(i == 0) rootPane.setDefaultButton(button);
     101            if(i == 0) {
     102                rootPane.setDefaultButton(button);
     103            }
    101104            buttonsPanel.add(button, GBC.std().insets(2,2,2,2));
    102105            buttons.add(button);
     
    120123        boolean limitedInHeight = d.height > x.height;
    121124
    122         if(x.width  > 0 && d.width  > x.width)  d.width  = x.width;
    123         if(x.height > 0 && d.height > x.height) d.height = x.height;
     125        if(x.width  > 0 && d.width  > x.width) {
     126            d.width  = x.width;
     127        }
     128        if(x.height > 0 && d.height > x.height) {
     129            d.height = x.height;
     130        }
    124131
    125132        // We have a vertical scrollbar and enough space to prevent a horizontal one
    126         if(!limitedInWidth && limitedInHeight)
     133        if(!limitedInWidth && limitedInHeight) {
    127134            d.width += new JScrollBar().getPreferredSize().width;
     135        }
    128136
    129137        setSize(d);
     
    161169        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    162170        Dimension x = new Dimension(Math.round(screenSize.width*2/3),
    163                                     Math.round(screenSize.height*2/3));
     171                Math.round(screenSize.height*2/3));
    164172        try {
    165             if(parent != null)
     173            if(parent != null) {
    166174                x = JOptionPane.getFrameForComponent(parent).getSize();
     175            }
    167176        } catch(NullPointerException e) { }
    168177        return x;
     
    184193
    185194        rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
    186             .put(KeyStroke.getKeyStroke("ESCAPE"), "ESCAPE");
     195        .put(KeyStroke.getKeyStroke("ESCAPE"), "ESCAPE");
    187196        rootPane.getActionMap().put("ESCAPE", actionListener);
    188197    }
Note: See TracChangeset for help on using the changeset viewer.