use of org.opengis.filter.Expression in project geotoolkit by Geomatys.
the class ListingPropertyVisitor method visit.
@Override
public Object visit(final Font font, Object data) {
final List<Expression> families = font.getFamily();
if (families != null) {
for (Expression family : families) {
visit(family, (Collection<String>) data);
}
}
final Expression size = font.getSize();
if (size != null) {
visit(size, (Collection<String>) data);
}
final Expression style = font.getStyle();
if (style != null) {
visit(style, (Collection<String>) data);
}
final Expression weight = font.getWeight();
if (weight != null) {
visit(weight, (Collection<String>) data);
}
return data;
}
use of org.opengis.filter.Expression in project geotoolkit by Geomatys.
the class ListingPropertyVisitor method visit.
@Override
public Object visit(final Fill fill, Object data) {
final Expression color = fill.getColor();
if (color != null) {
visit(color, (Collection<String>) data);
}
final GraphicFill gf = fill.getGraphicFill();
if (gf != null) {
data = gf.accept(this, data);
}
final Expression opa = fill.getOpacity();
if (opa != null) {
visit(opa, (Collection<String>) data);
}
return data;
}
use of org.opengis.filter.Expression in project geotoolkit by Geomatys.
the class ListingPropertyVisitor method visit.
@Override
public Object visit(final Mark mark, Object data) {
final ExternalMark em = mark.getExternalMark();
if (em != null) {
data = em.accept(this, data);
}
final Fill fill = mark.getFill();
if (fill != null) {
data = fill.accept(this, data);
}
final Stroke stroke = mark.getStroke();
if (stroke != null) {
data = stroke.accept(this, data);
}
final Expression wkn = mark.getWellKnownName();
if (wkn != null) {
visit(wkn, (Collection<String>) data);
}
return data;
}
use of org.opengis.filter.Expression in project geotoolkit by Geomatys.
the class PrepareStyleVisitor method visit.
@Override
public Object visit(TextSymbolizer ts, Object o) {
Fill fill = ts.getFill();
Font font = ts.getFont();
Halo halo = ts.getHalo();
Expression label = ts.getLabel();
LabelPlacement place = ts.getLabelPlacement();
if (fill != null) {
fill = (Fill) fill.accept(this, o);
}
if (font != null) {
font = (Font) font.accept(this, o);
}
if (halo != null) {
halo = (Halo) halo.accept(this, o);
}
if (label != null) {
label = (Expression) visit(label);
}
if (place != null) {
place = (LabelPlacement) place.accept(this, o);
}
// recreate symbolizer
return SF.textSymbolizer(ts.getName(), visitGeometryExpression(ts, o), ts.getDescription(), ts.getUnitOfMeasure(), label, font, place, halo, fill);
}
use of org.opengis.filter.Expression in project geotoolkit by Geomatys.
the class PrepareStyleVisitor method visit.
@Override
public Object visit(Stroke stroke, Object o) {
Expression color = stroke.getColor();
Expression offset = stroke.getDashOffset();
GraphicFill grafill = stroke.getGraphicFill();
GraphicStroke grastroke = stroke.getGraphicStroke();
Expression cap = stroke.getLineCap();
Expression join = stroke.getLineJoin();
Expression opacity = stroke.getOpacity();
Expression width = stroke.getWidth();
if (color != null) {
color = (Expression) visit(color);
}
if (offset != null) {
offset = (Expression) visit(offset);
}
if (grafill != null) {
grafill = (GraphicFill) grafill.accept(this, o);
}
if (grastroke != null) {
grastroke = (GraphicStroke) grastroke.accept(this, o);
}
if (cap != null) {
cap = (Expression) visit(cap);
}
if (join != null) {
join = (Expression) visit(join);
}
if (opacity != null) {
opacity = (Expression) visit(opacity);
}
if (width != null) {
width = (Expression) visit(width);
}
if (grafill != null) {
return SF.stroke(grafill, color, opacity, width, join, cap, stroke.getDashArray(), offset);
} else if (grastroke != null) {
return SF.stroke(grastroke, color, opacity, width, join, cap, stroke.getDashArray(), offset);
} else {
return SF.stroke(color, opacity, width, join, cap, stroke.getDashArray(), offset);
}
}
Aggregations