@Override public CoordinateReferenceSystem getCRS(GeoPos referencePos) throws FactoryException { return getMapCrs(); }
@Override public Component createPageComponent() { final AppContext snapContext = SnapApp.getDefault().getAppContext(); final ProductCrsForm productCrsForm = new ProductCrsForm(snapContext, SnapApp.getDefault().getSelectedProduct(VIEW)); final CustomCrsForm customCrsForm = new CustomCrsForm(snapContext); final PredefinedCrsForm predefinedCrsForm = new PredefinedCrsForm(snapContext); final TableLayout tableLayout = new TableLayout(1); tableLayout.setTablePadding(4, 4); tableLayout.setTableWeightX(1.0); tableLayout.setTableWeightY(1.0); tableLayout.setTableFill(TableLayout.Fill.BOTH); final JPanel pageComponent = new JPanel(tableLayout); final JLabel label = new JLabel("<html><b>No CRS found for ESRI Shapefile. Please specify.</b>"); crsSelectionPanel = new CrsSelectionPanel(productCrsForm, customCrsForm, predefinedCrsForm); pageComponent.add(label); pageComponent.add(crsSelectionPanel); return pageComponent; }
private void createUI() { final ProductCrsForm productCrsForm = new ProductCrsForm(SnapApp.getDefault().getAppContext(), product); final CustomCrsForm customCrsForm = new CustomCrsForm(SnapApp.getDefault().getAppContext()); final PredefinedCrsForm predefinedCrsForm = new PredefinedCrsForm(SnapApp.getDefault().getAppContext()); crsSelectionPanel = new CrsSelectionPanel(productCrsForm, customCrsForm, predefinedCrsForm); final TableLayout tableLayout = new TableLayout(1); tableLayout.setTableWeightX(1.0); tableLayout.setTableFill(TableLayout.Fill.BOTH); tableLayout.setTablePadding(4, 4); tableLayout.setCellPadding(0, 0, new Insets(4, 10, 4, 4)); final JPanel contentPanel = new JPanel(tableLayout); final JLabel label = new JLabel(); label.setText("<html><b>" + "The vector data are not associated with a coordinate reference system (CRS).<br/>" + "Please specify a CRS so that coordinates can be interpreted correctly.</b>"); contentPanel.add(label); contentPanel.add(crsSelectionPanel); setContent(contentPanel); }
@Override protected JComponent createCrsComponent() { final JTextField field = new JTextField(); field.setEditable(false); field.setText(getMapCrs().getName().getCode()); return field; }