コード例 #1
0
ファイル: ProfilePlotPanel.java プロジェクト: Holdlen2DH/nest
 private int getAttributeIndex(VectorDataNode pointDataSource, AttributeDescriptor dataField) {
   final String fieldName = dataField.getLocalName();
   if (fieldName.equals(CorrelativeFieldSelector.NULL_NAME)) {
     return -1;
   }
   return pointDataSource.getFeatureType().indexOf(fieldName);
 }
コード例 #2
0
 private VectorDataLayer createLayerInternal(LayerContext ctx, VectorDataNode vectorDataNode) {
   final PropertySet configuration = createLayerConfig(ctx);
   // Save the name of the vectorDataNode, so that we can reconstruct the layer later (e.g. if
   // loaded from session file).
   configuration.setValue(PROPERTY_NAME_VECTOR_DATA, vectorDataNode.getName());
   return createLayer(vectorDataNode, configuration);
 }
コード例 #3
0
 public static VectorDataLayer createLayer(LayerContext ctx, VectorDataNode vectorDataNode) {
   final VectorDataLayerType specialLayerType =
       vectorDataNode.getExtension(VectorDataLayerType.class);
   final VectorDataLayer layer;
   if (specialLayerType != null) {
     layer = specialLayerType.createLayerInternal(ctx, vectorDataNode);
   } else {
     final VectorDataLayerType fallbackLayerType =
         LayerTypeRegistry.getLayerType(VectorDataLayerType.class);
     if (fallbackLayerType == null) {
       throw new IllegalStateException(
           "fallbackLayerType == null (missing default VectorDataLayerType)");
     }
     layer = fallbackLayerType.createLayerInternal(ctx, vectorDataNode);
   }
   return layer;
 }