worldMapUI.addListener(this); splitPaneV = new JSplitPane(JSplitPane.VERTICAL_SPLIT, tableViewPane, worldMapUI.getWorlMapPane()); splitPaneV.setOneTouchExpandable(true); splitPaneV.setResizeWeight(0.8);
private JPanel createCentrePanel() { final JideSplitPane splitPane1V = new JideSplitPane(JideSplitPane.VERTICAL_SPLIT); aoiTable = new JTable(); aoiTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); aoiTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); aoiTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(final MouseEvent e) { final int clickCount = e.getClickCount(); if (clickCount == 2) { performOpenAction(); } else if (clickCount == 1) { performSelectAction(); } } }); splitPane1V.add(new JScrollPane(aoiTable)); worldMapUI = new WorldMapUI(); splitPane1V.add(worldMapUI.getWorlMapPane()); return splitPane1V; }
worldMapUI.getModel().setProducts(sourceProducts); worldMapUI.getModel().setSelectedProduct(sourceProducts[0]); worldMapUI.getWorlMapPane().zoomToProduct(sourceProducts[0]);
pixelPanel.add(new JPanel(), pixgbc); final NestWorldMapPane worldPane = worldMapUI.getWorlMapPane(); worldPane.setPreferredSize(new Dimension(500, 130));
private void updateGeoRegion() { try { geoRegion = new WKTReader().read(geoText.getText()); final Coordinate coord[] = geoRegion.getCoordinates(); worldMapUI.setSelectionStart((float) coord[0].y, (float) coord[0].x); worldMapUI.setSelectionEnd((float) coord[2].y, (float) coord[2].x); worldMapUI.getWorlMapPane().revalidate(); worldMapUI.getWorlMapPane().getLayerCanvas().updateUI(); } catch (Exception e) { SnapApp.getDefault().handleError("UpdateGeoRegion error reading wkt", e); } } }
contentPane.add(worldMapUI.getWorlMapPane(), BorderLayout.EAST);
private void createPanel(final File[] productFileList) { final JPanel textPanel = createTextPanel("Instructions", getInstructions()); this.add(textPanel, BorderLayout.NORTH); final WorldMapUI worldMapUI = new WorldMapUI(); this.add(worldMapUI.getWorlMapPane(), BorderLayout.CENTER); final ProductEntry[] productEntryList =ProductEntry.createProductEntryList(productFileList); final GeoPos[][] geoBoundaries = new GeoPos[productEntryList.length][4]; int i = 0; for (ProductEntry entry : productEntryList) { geoBoundaries[i++] = entry.getGeoBoundary(); } worldMapUI.setAdditionalGeoBoundaries(geoBoundaries); } }