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();
}
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);
}
Aggregations