Search in sources :

Example 16 with ValueField

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;
}
Also used : Field(com.revolsys.swing.field.Field) ValueField(com.revolsys.swing.component.ValueField) ValueField(com.revolsys.swing.component.ValueField)

Example 17 with ValueField

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;
}
Also used : ValueField(com.revolsys.swing.component.ValueField)

Example 18 with ValueField

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;
}
Also used : GriddedElevationModelReadFactory(com.revolsys.elevation.gridded.GriddedElevationModelReadFactory) ValueField(com.revolsys.swing.component.ValueField)

Example 19 with ValueField

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;
}
Also used : ValueField(com.revolsys.swing.component.ValueField)

Example 20 with ValueField

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;
}
Also used : ValueField(com.revolsys.swing.component.ValueField)

Aggregations

ValueField (com.revolsys.swing.component.ValueField)24 TextField (com.revolsys.swing.field.TextField)7 Path (java.nio.file.Path)3 JLabel (javax.swing.JLabel)3 LinkedHashMapEx (com.revolsys.collection.map.LinkedHashMapEx)2 MapEx (com.revolsys.collection.map.MapEx)2 GriddedElevationModelReadFactory (com.revolsys.elevation.gridded.GriddedElevationModelReadFactory)2 BasePanel (com.revolsys.swing.component.BasePanel)2 PasswordField (com.revolsys.swing.field.PasswordField)2 ArrayList (java.util.ArrayList)2 TriangulatedIrregularNetworkReadFactory (com.revolsys.elevation.tin.TriangulatedIrregularNetworkReadFactory)1 GeometryFactory (com.revolsys.geometry.model.GeometryFactory)1 LineString (com.revolsys.geometry.model.LineString)1 Point (com.revolsys.geometry.model.Point)1 FolderConnectionRegistry (com.revolsys.io.file.FolderConnectionRegistry)1 GeoreferencedImageReadFactory (com.revolsys.raster.GeoreferencedImageReadFactory)1 RecordReaderFactory (com.revolsys.record.io.RecordReaderFactory)1 RecordStoreConnectionRegistry (com.revolsys.record.io.RecordStoreConnectionRegistry)1 RecordStore (com.revolsys.record.schema.RecordStore)1 Field (com.revolsys.swing.field.Field)1