public void setCustom(GeodeticDatum geodeticDatum, OperationMethod mapProjection, ParameterValueGroup parameterValues) { CustomCrsPanel customCrsPanel = (CustomCrsPanel) getCrsUI(); customCrsPanel.setCustom(geodeticDatum, mapProjection, parameterValues); } }
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 CustomCrsPanel panel = new CustomCrsPanel(WindowManager.getDefault().getMainWindow(), CustomCrsPanel.createDatumSet(), CustomCrsPanel.createCrsProviderSet()); panel.addPropertyChangeListener("crs", evt -> fireCrsChanged()); return panel; }
ParameterValueGroup parameterValues = conversionFromBase.getParameterValues(); GeodeticDatum geodeticDatum = projectedCRS.getDatum(); customCrsUI.setCustom(geodeticDatum, operationMethod, parameterValues); } else { throw new ConversionException("Failed to convert CRS from WKT.");
@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; }
customCrsUI = new CustomCrsForm(appContext); CrsForm predefinedCrsUI = new PredefinedCrsForm(appContext);
@Override public CoordinateReferenceSystem getCRS(GeoPos referencePos) throws FactoryException { return ((CustomCrsPanel)getCrsUI()).getCRS(referencePos); }
layout.setTableWeightX(1.0); parameterPanel.setLayout(layout); customCrsUI = new CustomCrsForm(appContext); CrsForm predefinedCrsUI = new PredefinedCrsForm(appContext); collocationCrsUI = new CollocationCrsForm(appContext);
private void createUI() { final TableLayout layout = new TableLayout(1); layout.setTableAnchor(TableLayout.Anchor.WEST); layout.setTableFill(TableLayout.Fill.BOTH); layout.setTableWeightX(1.0); layout.setTableWeightY(0.0); layout.setRowWeightY(2, 1.0); layout.setTablePadding(3, 3); setLayout(layout); CrsForm customCrsUI = new CustomCrsForm(appContext); CrsForm predefinedCrsUI = new PredefinedCrsForm(appContext); crsSelectionPanel = new CrsSelectionPanel(customCrsUI, predefinedCrsUI); crsSelectionPanel.addPropertyChangeListener(MosaicFormModel.PROPERTY_CRS, new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { updateForCrsChanged(); } }); add(crsSelectionPanel); add(createOrthorectifyPanel()); add(createMosaicBoundsPanel()); }
private void createUI() { final TableLayout layout = new TableLayout(1); layout.setTableAnchor(TableLayout.Anchor.WEST); layout.setTableFill(TableLayout.Fill.BOTH); layout.setTableWeightX(1.0); layout.setTableWeightY(0.0); layout.setRowWeightY(2, 1.0); layout.setTablePadding(3, 3); setLayout(layout); CrsForm customCrsUI = new CustomCrsForm(appContext); CrsForm predefinedCrsUI = new PredefinedCrsForm(appContext); crsSelectionPanel = new CrsSelectionPanel(customCrsUI, predefinedCrsUI); crsSelectionPanel.addPropertyChangeListener(S2tbxMosaicFormModel.PROPERTY_CRS, (PropertyChangeEvent evt)-> updateForCrsChanged()); add(crsSelectionPanel); add(createOrthorectifyPanel()); add(createMosaicBoundsPanel()); }