use of com.revolsys.swing.map.layer.LayerGroup in project com.revolsys.open by revolsys.
the class MacApplicationListenerHandler method openFiles.
private void openFiles(final Object event) {
final List<File> files = Property.getSimple(event, "files");
final LayerGroup layerGroup = Project.get();
if (layerGroup != null) {
layerGroup.openFiles(files);
}
}
use of com.revolsys.swing.map.layer.LayerGroup in project com.revolsys.open by revolsys.
the class SelectRecordsOverlay method unSelectRecords.
public void unSelectRecords(final BoundingBox boundingBox) {
final LayerGroup project = getProject();
unSelectRecords(project, boundingBox);
final LayerRendererOverlay overlay = getMap().getLayerOverlay();
overlay.redraw();
}
use of com.revolsys.swing.map.layer.LayerGroup in project com.revolsys.open by revolsys.
the class SelectRecordsOverlay method unSelectRecords.
private void unSelectRecords(final LayerGroup group, final BoundingBox boundingBox) {
final double scale = getViewportScale();
final List<Layer> layers = group.getLayers();
Collections.reverse(layers);
for (final Layer layer : layers) {
if (layer instanceof LayerGroup) {
final LayerGroup childGroup = (LayerGroup) layer;
unSelectRecords(childGroup, boundingBox);
} else if (layer instanceof AbstractRecordLayer) {
final AbstractRecordLayer recordLayer = (AbstractRecordLayer) layer;
if (recordLayer.isSelectable(scale)) {
recordLayer.unSelectRecords(boundingBox);
}
}
}
}
use of com.revolsys.swing.map.layer.LayerGroup in project com.revolsys.open by revolsys.
the class SelectRecordsOverlay method addSelectedRecords.
private void addSelectedRecords(final LayerGroup group, final BoundingBox boundingBox) {
final double scale = getViewportScale();
final List<Layer> layers = group.getLayers();
Collections.reverse(layers);
for (final Layer layer : layers) {
if (layer instanceof LayerGroup) {
final LayerGroup childGroup = (LayerGroup) layer;
addSelectedRecords(childGroup, boundingBox);
} else if (layer instanceof AbstractRecordLayer) {
final AbstractRecordLayer recordLayer = (AbstractRecordLayer) layer;
if (recordLayer.isSelectable(scale)) {
recordLayer.addSelectedRecords(boundingBox);
}
}
}
}
use of com.revolsys.swing.map.layer.LayerGroup in project com.revolsys.open by revolsys.
the class SelectRecordsOverlay method refreshImageRenderer.
private void refreshImageRenderer(final ImageViewport viewport, final LayerGroup layerGroup) {
for (final Layer layer : layerGroup.getLayers()) {
if (layer instanceof LayerGroup) {
final LayerGroup childGroup = (LayerGroup) layer;
refreshImageRenderer(viewport, childGroup);
} else if (layer instanceof AbstractRecordLayer) {
final AbstractRecordLayer recordLayer = (AbstractRecordLayer) layer;
final AbstractRecordLayerRenderer layerRenderer = layer.getRenderer();
if (recordLayer.isSelectable()) {
final List<LayerRecord> selectedRecords = recordLayer.getSelectedRecords();
for (final LayerRecord record : selectedRecords) {
if (record != null && recordLayer.isVisible(record)) {
if (!recordLayer.isDeleted(record)) {
layerRenderer.renderSelectedRecord(viewport, recordLayer, record);
}
}
}
}
}
}
}
Aggregations