use of com.revolsys.swing.component.ValueField in project com.revolsys.open by revolsys.
the class AbstractLayer method newPropertiesTabGeneralPanelGeneral.
protected ValueField newPropertiesTabGeneralPanelGeneral(final BasePanel parent) {
final ValueField panel = new ValueField(this);
Borders.titled(panel, "General");
final Field nameField = (Field) SwingUtil.addObjectField(panel, this, "name");
Property.addListener(nameField, "name", this.beanPropertyListener);
final String type = Property.get(this, "type");
final String typeLabel = CaseConverter.toCapitalizedWords(type);
SwingUtil.addLabelledReadOnlyTextField(panel, "Type", typeLabel);
GroupLayouts.makeColumns(panel, 2, true);
parent.add(panel);
return panel;
}
use of com.revolsys.swing.component.ValueField in project com.revolsys.open by revolsys.
the class AbstractLayer method newPropertiesTabGeneralPanelSource.
protected ValueField newPropertiesTabGeneralPanelSource(final BasePanel parent) {
final ValueField panel = new ValueField(this);
Borders.titled(panel, "Source");
parent.add(panel);
return panel;
}
use of com.revolsys.swing.component.ValueField 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;
}
use of com.revolsys.swing.component.ValueField in project com.revolsys.open by revolsys.
the class WebMercatorTileCacheLayer method newPropertiesTabGeneralPanelSource.
@Override
protected ValueField newPropertiesTabGeneralPanelSource(final BasePanel parent) {
final ValueField panel = super.newPropertiesTabGeneralPanelSource(parent);
final String url = getUrl();
SwingUtil.addLabelledReadOnlyTextField(panel, "URL", url);
GroupLayouts.makeColumns(panel, 2, true);
return panel;
}
use of com.revolsys.swing.component.ValueField in project com.revolsys.open by revolsys.
the class ArcGisRestServerTileCacheLayer method newPropertiesTabGeneralPanelSource.
@Override
protected ValueField newPropertiesTabGeneralPanelSource(final BasePanel parent) {
final ValueField panel = super.newPropertiesTabGeneralPanelSource(parent);
final String url = getUrl();
if (Property.hasValue(url)) {
SwingUtil.addLabelledReadOnlyTextField(panel, "URL", url);
}
if (this.mapService != null) {
SwingUtil.addLabelledReadOnlyTextField(panel, "Service URL", this.mapService.getServiceUrl());
}
SwingUtil.addLabelledReadOnlyTextField(panel, "Service Path", this.servicePath);
GroupLayouts.makeColumns(panel, panel.getComponentCount() / 2, true);
return panel;
}
Aggregations