use of com.sldeditor.ui.tree.SLDTree in project sldeditor by robward-scisys.
the class SLDTreeTest method testUpdateNode.
/**
* Test method for
* {@link com.sldeditor.ui.tree.SLDTree#updateNode(java.lang.Object, java.lang.Object)}.
*/
@Test
public void testUpdateNode() {
SLDTree tree1 = new SLDTree(null, null);
tree1.updateNode(null, null);
}
use of com.sldeditor.ui.tree.SLDTree in project sldeditor by robward-scisys.
the class SLDTreeTest method testSLDTreeNull.
/**
* Test method for {@link com.sldeditor.ui.tree.SLDTree#SLDTree(java.util.List)} using null
* values.
*/
@Test
public void testSLDTreeNull() {
List<RenderSymbolInterface> renderList = null;
SLDTree tree1 = new SLDTree(renderList, null);
// Select top level node
tree1.selectFirstSymbol();
URL url = SLDTreeTest.class.getResource("/polygon/sld/polygon_attributebasedpolygon.sld");
String sldContents = readFile(new File(url.getFile()).getAbsolutePath());
SLDData sldData = new SLDData(null, sldContents);
StyledLayerDescriptor sld = SLDUtils.createSLDFromString(sldData);
SelectedSymbol.getInstance().setSld(sld);
tree1.populateSLD();
// Nothing selected at this stage
tree1.leafSelected();
PopulateDetailsInterface panel = tree1.getSelectedSymbolPanel();
assertNull(panel);
// Select top level node
tree1.selectFirstSymbol();
tree1.leafSelected();
panel = tree1.getSelectedSymbolPanel();
assertNull(panel);
}
use of com.sldeditor.ui.tree.SLDTree in project sldeditor by robward-scisys.
the class SLDTreeTest method testUndoAction.
/**
* Test method for
* {@link com.sldeditor.ui.tree.SLDTree#undoAction(com.sldeditor.common.undo.UndoInterface)}.
*/
@Test
public void testUndoAction() {
SLDTree tree1 = new SLDTree(null, null);
assertEquals(tree1, tree1.getUndoObject());
tree1.undoAction(null);
}
use of com.sldeditor.ui.tree.SLDTree in project sldeditor by robward-scisys.
the class SLDEditor method getSymbolPanel.
/**
* Gets the symbol panel.
*
* @return the symbol panel
*/
public PopulateDetailsInterface getSymbolPanel() {
SLDTree sldTree = uiMgr.getSymbolTree();
PopulateDetailsInterface panel = sldTree.getSelectedSymbolPanel();
return panel;
}
use of com.sldeditor.ui.tree.SLDTree in project sldeditor by robward-scisys.
the class SLDTreeTest method testValueChanged.
/**
* Test method for
* {@link com.sldeditor.ui.tree.SLDTree#valueChanged(javax.swing.event.TreeSelectionEvent)}.
*/
@Test
public void testValueChanged() {
// Do nothing, calls leafSelected()
SLDTree tree1 = new SLDTree(null, null);
tree1.valueChanged(null);
}
Aggregations