Examples of GPXSettingsPanel


Examples of org.openstreetmap.josm.gui.preferences.display.GPXSettingsPanel

                } else {
                    hasNonlocal = true;
                }
            }
        }
        GPXSettingsPanel panel = new GPXSettingsPanel(layers.get(0).getName(), hasLocal, hasNonlocal);
        JScrollPane scrollpane = GuiHelper.embedInVerticalScrollPane(panel);
        scrollpane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
        int screenHeight = Toolkit.getDefaultToolkit().getScreenSize().height;
        if (screenHeight < 700) {
            // to fit on screen 800x600
            scrollpane.setPreferredSize(new Dimension(panel.getPreferredSize().width, Math.min(panel.getPreferredSize().height, 450)));
        }
        int answer = JOptionPane.showConfirmDialog(Main.parent, scrollpane, tr("Customize track drawing"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
        if (answer == JOptionPane.CANCEL_OPTION || answer == JOptionPane.CLOSED_OPTION) {
            return;
        }
        for (Layer layer : layers) {
            // save preferences for all layers
            boolean f = false;
            if (layer instanceof GpxLayer) {
                f = ((GpxLayer) layer).isLocalFile();
            }
            panel.savePreferences(layer.getName(), f);
        }
        Main.map.repaint();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.