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); }
if (selectedCrsInfo != null) { crsCodeField.setText(selectedCrsInfo.toString()); fireCrsChanged();
@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; }
CrsForm predefinedCrsUI = new PredefinedCrsForm(appContext);
parameterPanel.setLayout(layout); customCrsUI = new CustomCrsForm(appContext); CrsForm predefinedCrsUI = new PredefinedCrsForm(appContext); collocationCrsUI = new CollocationCrsForm(appContext); CrsForm[] crsForms = new CrsForm[]{customCrsUI, predefinedCrsUI, collocationCrsUI};
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()); }
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()); }