use of com.revolsys.elevation.gridded.GriddedElevationModelReadFactory in project com.revolsys.open by revolsys.
the class TiledGriddedElevationModelLayer method newPropertiesTabGeneralPanelSource.
@Override
protected ValueField newPropertiesTabGeneralPanelSource(final BasePanel parent) {
final ValueField panel = super.newPropertiesTabGeneralPanelSource(parent);
if (this.url.startsWith("file:")) {
final String fileName = this.url.replaceFirst("file:(//)?", "");
SwingUtil.addLabelledReadOnlyTextField(panel, "Base Directory", fileName);
} else {
SwingUtil.addLabelledReadOnlyTextField(panel, "Base URL", this.url);
}
SwingUtil.addLabelledReadOnlyTextField(panel, "File Prefix", this.filePrefix);
if (Property.hasValue(this.fileExtension)) {
SwingUtil.addLabelledReadOnlyTextField(panel, "File Extension", this.fileExtension);
final GriddedElevationModelReadFactory factory = IoFactory.factoryByFileExtension(GriddedElevationModelReadFactory.class, this.fileExtension);
if (factory != null) {
SwingUtil.addLabelledReadOnlyTextField(panel, "File Type", factory.getName());
}
}
SwingUtil.addLabelledReadOnlyTextField(panel, "Tile Size Pixels", this.tileSizePixels);
GroupLayouts.makeColumns(panel, 2, true);
return panel;
}
use of com.revolsys.elevation.gridded.GriddedElevationModelReadFactory in project com.revolsys.open by revolsys.
the class GriddedElevationModelLayer method newPropertiesTabGeneralPanelSource.
@Override
protected ValueField newPropertiesTabGeneralPanelSource(final BasePanel parent) {
final ValueField panel = super.newPropertiesTabGeneralPanelSource(parent);
if (this.url.startsWith("file:")) {
final String fileName = this.url.replaceFirst("file:(//)?", "");
SwingUtil.addLabelledReadOnlyTextField(panel, "File", fileName);
} else {
SwingUtil.addLabelledReadOnlyTextField(panel, "URL", this.url);
}
final String fileExtension = FileUtil.getFileNameExtension(this.url);
if (Property.hasValue(fileExtension)) {
SwingUtil.addLabelledReadOnlyTextField(panel, "File Extension", fileExtension);
final GriddedElevationModelReadFactory factory = IoFactory.factoryByFileExtension(GriddedElevationModelReadFactory.class, fileExtension);
if (factory != null) {
SwingUtil.addLabelledReadOnlyTextField(panel, "File Type", factory.getName());
}
}
GroupLayouts.makeColumns(panel, 2, true);
return panel;
}
Aggregations