Changeset 9081 in josm


Ignore:
Timestamp:
2015-12-02T21:41:41+01:00 (9 years ago)
Author:
wiktorn
Message:

FIx missing scrollbar on WMTS layer selection list. Closes #12151.

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java

    r9069 r9081  
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
    6 import java.awt.Dimension;
    76import java.awt.GridBagLayout;
    87import java.awt.Point;
     
    2524
    2625import javax.swing.JPanel;
     26import javax.swing.JScrollPane;
    2727import javax.swing.JTable;
    2828import javax.swing.ListSelectionModel;
     
    200200                        }
    201201                    });
    202             this.list.setPreferredSize(new Dimension(400, 400));
    203202            this.list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    204203            this.list.setRowSelectionAllowed(true);
    205204            this.list.setColumnSelectionAllowed(false);
    206205            JPanel panel = new JPanel(new GridBagLayout());
    207             panel.add(this.list, GBC.eol().fill());
     206            panel.add(new JScrollPane(this.list), GBC.eol().fill());
    208207            setContent(panel);
    209208        }
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java

    r8857 r9081  
    3030    private ImageryInfo testImageryWALLONIE = getImagery("test/data/wmts/WMTSCapabilities-Wallonie.xml");
    3131    private ImageryInfo testImageryOntario = getImagery("test/data/wmts/WMTSCapabilities-Ontario.xml");
     32    private ImageryInfo testLotsOfLayers = getImagery("test/data/wmts/getCapabilities-lots-of-layers.xml");
    3233
    3334    /**
     
    101102    }
    102103
    103     //TODO: @Test - disable this test, needs further working
     104    // XXX - disable this test, needs further working
     105    // @Test
    104106    public void testWALLONIENoMatrixDimension() throws MalformedURLException, IOException {
    105107        Main.setProjection(Projections.getProjectionByCode("EPSG:31370"));
     
    208210    }
    209211
    210     // disabled as this needs user action
    211     // @Test
     212    // XXX: disabled as this needs user action
     213    //@Test
    212214    public void testTwoTileSetsForOneProjection() throws Exception {
    213215        Main.setProjection(Projections.getProjectionByCode("EPSG:3857"));
     
    216218        verifyTile(new LatLon(45.4105023, -75.7153702), testSource, 303751, 375502, 12);
    217219        verifyTile(new LatLon(45.4601306, -75.7617187), testSource, 1186, 1466, 4);
     220
     221    }
     222
     223    // XXX: disabled as this needs user action
     224    // @Test
     225    public void testManyLayersScrollbars() throws Exception {
     226        Main.setProjection(Projections.getProjectionByCode("EPSG:3857"));
     227        WMTSTileSource testSource = new WMTSTileSource(testLotsOfLayers);
     228        testSource.initProjection(Main.getProjection());
    218229
    219230    }
Note: See TracChangeset for help on using the changeset viewer.