layer.addStyle(user); } else if (childName.equalsIgnoreCase("LayerFeatureConstraints")) { layer.setLayerFeatureConstraints(parseLayerFeatureConstraints(child));
public void visit(NamedLayer layer) { NamedLayer copy = null; Style[] style = layer.getStyles(); Style[] styleCopy = new Style[style.length]; int length = style.length; for (int i = 0; i < length; i++) { if (style[i] != null) { style[i].accept(this); styleCopy[i] = (Style) pages.pop(); } } FeatureTypeConstraint[] lfc = layer.getLayerFeatureConstraints(); FeatureTypeConstraint[] lfcCopy = new FeatureTypeConstraint[lfc.length]; length = lfc.length; for (int i = 0; i < length; i++) { if (lfc[i] != null) { lfc[i].accept(this); lfcCopy[i] = (FeatureTypeConstraint) pages.pop(); } } copy = sf.createNamedLayer(); copy.setName(layer.getName()); length = styleCopy.length; for (int i = 0; i < length; i++) { copy.addStyle(styleCopy[i]); } copy.setLayerFeatureConstraints(lfcCopy); pages.push(copy); }
LayerFeatureConstraints constraints = (LayerFeatureConstraints) node.getChildValue("LayerFeatureConstraints"); namedLayer.setLayerFeatureConstraints(constraints.getFeatureTypeConstraints());
layer.addStyle(user); } else if (childName.equalsIgnoreCase("LayerFeatureConstraints")) { layer.setLayerFeatureConstraints(parseLayerFeatureConstraints(child));
LayerFeatureConstraints constraints = (LayerFeatureConstraints) node.getChildValue( "LayerFeatureConstraints"); namedLayer.setLayerFeatureConstraints(constraints.getFeatureTypeConstraints());
LayerFeatureConstraints constraints = (LayerFeatureConstraints) node.getChildValue( "LayerFeatureConstraints"); namedLayer.setLayerFeatureConstraints(constraints.getFeatureTypeConstraints());
public void visit(NamedLayer layer) { NamedLayer copy = null; Style[] style = layer.getStyles(); Style[] styleCopy = new Style[style.length]; int length=style.length; for (int i = 0; i < length; i++) { if (style[i] != null) { style[i].accept(this); styleCopy[i] = (Style) pages.pop(); } } FeatureTypeConstraint[] lfc = layer.getLayerFeatureConstraints(); FeatureTypeConstraint[] lfcCopy = new FeatureTypeConstraint[lfc.length]; length=lfc.length; for (int i = 0; i < length; i++) { if (lfc[i] != null) { lfc[i].accept(this); lfcCopy[i] = (FeatureTypeConstraint) pages.pop(); } } copy = sf.createNamedLayer(); copy.setName(layer.getName()); length=styleCopy.length; for (int i = 0; i < length; i++) { copy.addStyle(styleCopy[i]); } copy.setLayerFeatureConstraints(lfcCopy); pages.push(copy); }
public void visit(NamedLayer layer) { NamedLayer copy = null; Style[] style = layer.getStyles(); Style[] styleCopy = new Style[style.length]; int length=style.length; for (int i = 0; i < length; i++) { if (style[i] != null) { style[i].accept(this); styleCopy[i] = (Style) pages.pop(); } } FeatureTypeConstraint[] lfc = layer.getLayerFeatureConstraints(); FeatureTypeConstraint[] lfcCopy = new FeatureTypeConstraint[lfc.length]; length=lfc.length; for (int i = 0; i < length; i++) { if (lfc[i] != null) { lfc[i].accept(this); lfcCopy[i] = (FeatureTypeConstraint) pages.pop(); } } copy = sf.createNamedLayer(); copy.setName(layer.getName()); length=styleCopy.length; for (int i = 0; i < length; i++) { copy.addStyle(styleCopy[i]); } copy.setLayerFeatureConstraints(lfcCopy); pages.push(copy); }
public void visit(NamedLayer layer) { NamedLayer copy = null; Style[] style = layer.getStyles(); Style[] styleCopy = new Style[style.length]; int length=style.length; for (int i = 0; i < length; i++) { if (style[i] != null) { style[i].accept(this); styleCopy[i] = (Style) getPages().pop(); } } FeatureTypeConstraint[] lfc = layer.getLayerFeatureConstraints(); FeatureTypeConstraint[] lfcCopy = new FeatureTypeConstraint[lfc.length]; length=lfc.length; for (int i = 0; i < length; i++) { if (lfc[i] != null) { lfc[i].accept(this); lfcCopy[i] = (FeatureTypeConstraint) getPages().pop(); } } copy = sf.createNamedLayer(); copy.setName(layer.getName()); length=styleCopy.length; for (int i = 0; i < length; i++) { copy.addStyle(styleCopy[i]); } copy.setLayerFeatureConstraints(lfcCopy); getPages().push(copy); }
/** Update symbol. */ private void updateSymbol() { if (!Controller.getInstance().isPopulating()) { String name = fieldConfigVisitor.getText(FieldIdEnum.NAME); NamedLayer namedLayer = getStyleFactory().createNamedLayer(); namedLayer.setName(name); // Feature type constraints List<FeatureTypeConstraint> ftcList = fieldConfigVisitor.getFeatureTypeConstraint( FieldIdEnum.LAYER_FEATURE_CONSTRAINTS); if ((ftcList != null) && !ftcList.isEmpty()) { FeatureTypeConstraint[] ftcArray = new FeatureTypeConstraint[ftcList.size()]; namedLayer.setLayerFeatureConstraints(ftcList.toArray(ftcArray)); } StyledLayer existingStyledLayer = SelectedSymbol.getInstance().getStyledLayer(); if (existingStyledLayer instanceof NamedLayerImpl) { NamedLayerImpl existingNamedLayer = (NamedLayerImpl) existingStyledLayer; for (Style style : existingNamedLayer.styles()) { namedLayer.addStyle(style); } } SelectedSymbol.getInstance().replaceStyledLayer(namedLayer); this.fireUpdateSymbol(); } }