use of com.revolsys.raster.GeoreferencedImageReadFactory in project com.revolsys.open by revolsys.
the class GeoreferencedImageLayer 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 fileNameExtension = FileUtil.getFileNameExtension(this.url);
if (Property.hasValue(fileNameExtension)) {
SwingUtil.addLabelledReadOnlyTextField(panel, "File Extension", fileNameExtension);
final GeoreferencedImageReadFactory factory = IoFactory.factoryByFileExtension(GeoreferencedImageReadFactory.class, fileNameExtension);
if (factory != null) {
SwingUtil.addLabelledReadOnlyTextField(panel, "File Type", factory.getName());
}
}
GroupLayouts.makeColumns(panel, 2, true);
return panel;
}
Aggregations