Search in sources :

Example 6 with FilterNode

use of com.sldeditor.filter.v2.expression.FilterNode in project sldeditor by robward-scisys.

the class FilterPanelv2 method populateFilter.

/**
 * Populate filter.
 *
 * @param node the node
 * @param filter the filter
 */
private void populateFilter(FilterNode node, Filter filter) {
    FilterConfigInterface filterConfig = null;
    if (filter != null) {
        filterConfig = FilterManager.getInstance().getFilterConfig(filter);
    }
    node.setFilter(filter, filterConfig);
    // This notifies the listeners and changes the GUI
    model.reload();
    displayResult();
}
Also used : FilterConfigInterface(com.sldeditor.filter.v2.function.FilterConfigInterface)

Example 7 with FilterNode

use of com.sldeditor.filter.v2.expression.FilterNode in project sldeditor by robward-scisys.

the class FilterNodeTest method testSetName.

/**
 * Test method for
 * {@link com.sldeditor.filter.v2.expression.FilterNode#setName(java.lang.String)}.
 */
@Test
public void testSetName() {
    FilterNode node = new FilterNode();
    assertNull(node.getFilter());
    String name = "filtername";
    node.setName(name);
    String expected = name + " : " + Localisation.getString(ExpressionPanelv2.class, "FilterNode.filterNotSet");
    assertTrue(node.toString().compareTo(expected) == 0);
}
Also used : ExpressionPanelv2(com.sldeditor.filter.v2.expression.ExpressionPanelv2) FilterNode(com.sldeditor.filter.v2.expression.FilterNode) Test(org.junit.Test)

Aggregations

FilterConfigInterface (com.sldeditor.filter.v2.function.FilterConfigInterface)5 ExpressionPanelv2 (com.sldeditor.filter.v2.expression.ExpressionPanelv2)3 FilterNode (com.sldeditor.filter.v2.expression.FilterNode)3 Test (org.junit.Test)3 Filter (org.opengis.filter.Filter)3 ArrayList (java.util.ArrayList)2 BinaryComparisonAbstract (org.geotools.filter.BinaryComparisonAbstract)2 FidFilterImpl (org.geotools.filter.FidFilterImpl)2 LogicFilterImpl (org.geotools.filter.LogicFilterImpl)2 Not (org.opengis.filter.Not)2 PropertyIsBetween (org.opengis.filter.PropertyIsBetween)2 PropertyIsGreaterThan (org.opengis.filter.PropertyIsGreaterThan)2 PropertyIsLike (org.opengis.filter.PropertyIsLike)2 PropertyIsNull (org.opengis.filter.PropertyIsNull)2 Expression (org.opengis.filter.expression.Expression)2 BinarySpatialOperator (org.opengis.filter.spatial.BinarySpatialOperator)2 BinaryTemporalOperator (org.opengis.filter.temporal.BinaryTemporalOperator)2 Overlaps (com.sldeditor.filter.v2.function.geometry.Overlaps)1 And (com.sldeditor.filter.v2.function.logic.And)1 IsLike (com.sldeditor.filter.v2.function.misc.IsLike)1