Ignore:
Timestamp:
2017-09-01T01:07:32+02:00 (7 years ago)
Author:
michael2402
Message:

See #15167: Make size of the OSM download panel fixed, only allow resizing for overpass.

File:
1 edited

Legend:

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

    r12684 r12705  
    2929import org.openstreetmap.josm.actions.downloadtasks.PostDownloadHandler;
    3030import org.openstreetmap.josm.data.Bounds;
     31import org.openstreetmap.josm.data.preferences.AbstractProperty;
    3132import org.openstreetmap.josm.data.preferences.BooleanProperty;
     33import org.openstreetmap.josm.data.preferences.IntegerProperty;
    3234import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
    3335import org.openstreetmap.josm.gui.MainApplication;
     36import org.openstreetmap.josm.gui.download.DownloadSourceSizingPolicy.AdjustableDownloadSizePolicy;
    3437import org.openstreetmap.josm.gui.preferences.server.OverpassServerPreference;
    3538import org.openstreetmap.josm.gui.util.GuiHelper;
     
    4447 */
    4548public class OverpassDownloadSource implements DownloadSource<OverpassDownloadSource.OverpassDownloadData> {
     49
    4650
    4751    @Override
     
    8185    public static class OverpassDownloadSourcePanel extends AbstractDownloadSourcePanel<OverpassDownloadData> {
    8286
    83         private JosmTextArea overpassQuery;
    84         private OverpassQueryList overpassQueryList;
    85 
    8687        private static final String SIMPLE_NAME = "overpassdownloadpanel";
     88        private static final AbstractProperty<Integer> PANEL_SIZE_PROPERTY =
     89                new IntegerProperty(TAB_SPLIT_NAMESPACE + SIMPLE_NAME, 150).cached();
    8790        private static final BooleanProperty OVERPASS_QUERY_LIST_OPENED =
    8891                new BooleanProperty("download.overpass.query-list.opened", false);
    8992        private static final String ACTION_IMG_SUBDIR = "dialogs";
     93
     94        private JosmTextArea overpassQuery;
     95        private OverpassQueryList overpassQueryList;
    9096
    9197        /**
     
    278284        }
    279285
     286        @Override
     287        public DownloadSourceSizingPolicy getSizingPolicy() {
     288            return new AdjustableDownloadSizePolicy(PANEL_SIZE_PROPERTY);
     289        }
     290
    280291        /**
    281292         * Action that delegates snippet creation to {@link OverpassQueryList#createNewItem()}.
Note: See TracChangeset for help on using the changeset viewer.