Ignore:
Timestamp:
2016-01-20T00:05:07+01:00 (8 years ago)
Author:
Don-vip
Message:

refactoring - global simplification of use of setLayout method - simply pass layout to JPanel constructor

Location:
trunk/src/org/openstreetmap/josm/gui/preferences
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java

    r8510 r9543  
    5252    @Override
    5353    public void addGui(PreferenceTabbedPane gui) {
    54         JPanel panel = new VerticallyScrollablePanel();
    55         panel.setLayout(new GridBagLayout());
     54        JPanel panel = new VerticallyScrollablePanel(new GridBagLayout());
    5655        panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    5756
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java

    r9100 r9543  
    320320
    321321        projPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    322         projPanel.setLayout(new GridBagLayout());
    323322        projPanel.add(new JLabel(tr("Projection method")), GBC.std().insets(5, 5, 0, 5));
    324323        projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java

    r8836 r9543  
    6363            group.add(south);
    6464
    65             JPanel bPanel = new JPanel();
    66             bPanel.setLayout(new GridBagLayout());
     65            JPanel bPanel = new JPanel(new GridBagLayout());
    6766
    6867            bPanel.add(new JLabel(tr("North")), GBC.std().insets(5, 5, 0, 5));
  • trunk/src/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreference.java

    r8510 r9543  
    100100        remote.add(enableRemoteControl, GBC.eol());
    101101
    102         final JPanel wrapper = new JPanel();
    103         wrapper.setLayout(new GridBagLayout());
     102        final JPanel wrapper = new JPanel(new GridBagLayout());
    104103        wrapper.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.gray)));
    105104
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java

    r9352 r9543  
    8686        gc.weightx = 1.0;
    8787        gc.weighty = 1.0;
    88         pnlAuthenticationParameteters = new JPanel();
     88        pnlAuthenticationParameteters = new JPanel(new BorderLayout());
    8989        add(pnlAuthenticationParameteters, gc);
    90         pnlAuthenticationParameteters.setLayout(new BorderLayout());
    9190
    9291        //-- the two panels for authentication parameters
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java

    r9353 r9543  
    118118        gc.weightx = 1.0;
    119119        gc.insets = new Insets(10, 0, 0, 0);
    120         add(pnlAuthorisationMessage = new JPanel(), gc);
    121         pnlAuthorisationMessage.setLayout(new BorderLayout());
     120        add(pnlAuthorisationMessage = new JPanel(new BorderLayout()), gc);
    122121
    123122        // create these two panels, they are going to be used later in refreshView
  • trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java

    r9224 r9543  
    1010import java.awt.GridBagConstraints;
    1111import java.awt.GridBagLayout;
     12import java.awt.GridLayout;
    1213import java.awt.Insets;
    1314import java.awt.Toolkit;
     
    186187
    187188    private void initComponents() {
    188         JPanel listPane = new JPanel();
     189        JPanel listPane = new JPanel(new GridLayout());
    189190        JScrollPane listScrollPane = new JScrollPane();
    190         JPanel shortcutEditPane = new JPanel();
     191        JPanel shortcutEditPane = new JPanel(new GridLayout(5, 2));
    191192
    192193        CbAction action = new CbAction(this);
    193194        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    194195        add(buildFilterPanel());
    195         listPane.setLayout(new java.awt.GridLayout());
    196196
    197197        // This is the list of shortcuts:
     
    211211
    212212        // and here follows the edit area. I won't object to someone re-designing it, it looks, um, "minimalistic" ;)
    213         shortcutEditPane.setLayout(new java.awt.GridLayout(5, 2));
    214213
    215214        cbDefault.setAction(action);
Note: See TracChangeset for help on using the changeset viewer.