Changeset 25463 in osm for applications


Ignore:
Timestamp:
2011-02-27T19:30:17+01:00 (14 years ago)
Author:
guggis
Message:

'Fixing #6016 - Scrollbar hides field entry'

Location:
applications/editors/josm/plugins/turnrestrictions
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/turnrestrictions/build.xml

    r25199 r25463  
    3131
    3232        <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Fixing #5614 - JOSM Plugin turn Restrictions" />
     33        <property name="commit.message" value="Fixing #6016  - Scrollbar hides field entry" />
    3434        <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    3535        <property name="plugin.main.version" value="3835" />
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanel.java

    r24937 r25463  
    33import static org.openstreetmap.josm.tools.I18n.tr;
    44
     5import java.awt.Component;
     6import java.awt.Dimension;
    57import java.awt.GridBagConstraints;
    68import java.awt.GridBagLayout;
     
    8890        gc.gridx = 1;
    8991        gc.weightx = 1.0;
     92        gc.weighty = 1.0;
    9093        DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
    91         add(spVias = new JScrollPane(lstVias = new ViaList(new ViaListModel(model, selectionModel), selectionModel)),gc);
     94        spVias = new JScrollPane(lstVias = new ViaList(new ViaListModel(model, selectionModel), selectionModel)) {
     95                // fixes #6016 : Scrollbar hides field entry
     96                public Dimension getPreferredSize() {
     97                        return new Dimension(100, 80); // only height is relevant, 80 is just a heuristical value
     98             }
     99        };
     100        add(spVias,gc);
    92101        if (!Main.pref.getBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, false)) {
    93102            lblVias.setVisible(false);
     
    100109        gc.gridy = 4;
    101110        gc.weightx = 1.0;
     111        gc.weighty = 0.0;
    102112        gc.gridwidth = 2;
    103113        gc.insets = new Insets(0,0,5,5);   
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaList.java

    r23510 r25463  
    33import static org.openstreetmap.josm.tools.I18n.tr;
    44
     5import java.awt.Dimension;
    56import java.awt.Toolkit;
    67import java.awt.datatransfer.Clipboard;
     
    9394    }
    9495   
    95     /**
     96    @Override
     97        public Dimension getPreferredScrollableViewportSize() {
     98                //return super.getPreferredSize();
     99        Dimension d = getPreferredSize();
     100        d.height = Math.max(d.height, 100);
     101        return d;
     102        }
     103
     104        /**
    96105     * The transfer handler for Drag-and-Drop.
    97106     */
  • applications/editors/josm/plugins/turnrestrictions/test/josm.home/preferences

    r23510 r25463  
     1josm.version=3773
    12osm-server.url=http://localhost:8080/api
     3scripting.RunScriptDialog.file-history=asdfasdfasdfsdf
     4scripting.RunScriptDialog.last-file=asdfasdfasdfsdf
Note: See TracChangeset for help on using the changeset viewer.