use of com.sldeditor.ui.panels.SLDEditorUIPanels in project sldeditor by robward-scisys.
the class SLDEditorDockableLayoutTest method testCreateUI.
/**
* Test method for {@link
* com.sldeditor.ui.layout.SLDEditorDockableLayout#createUI(com.sldeditor.common.SLDEditorInterface,
* com.sldeditor.ui.panels.SLDEditorUIPanels, java.util.List)}.
*/
@Test
void testCreateUI() {
TestSLDEditor testSLDEditor = null;
PrefData prefData = new PrefData();
prefData.setUiLayoutClass(SLDEditorDockableLayout.class.getName());
PrefManager.getInstance().setPrefData(prefData);
try {
testSLDEditor = TestSLDEditor.createAndShowGUI2(null, null, true, null);
} catch (Exception e) {
e.printStackTrace();
}
File tmpFolder = new File(System.getProperty("java.io.tmpdir"));
String uiLayout = SLDEditorDockableLayout.class.getName();
UILayoutInterface ui = UILayoutFactory.getUILayout(uiLayout);
SLDEditorUIPanels uiMgr = SLDEditorUIPanels.getInstance();
ui.createUI(new SLDEditorMain(testSLDEditor), uiMgr, new ArrayList<ExtensionInterface>());
ui.writeLayout(tmpFolder.getAbsolutePath());
ui.readLayout(tmpFolder.getAbsolutePath());
File f = new File(tmpFolder, "layout.data");
f.delete();
assertEquals(uiLayout, SLDEditorDockableLayout.class.getName());
}
use of com.sldeditor.ui.panels.SLDEditorUIPanels in project sldeditor by robward-scisys.
the class SLDEditorDefaultLayoutTest method testCreateUI.
/**
* Test method for {@link
* com.sldeditor.ui.layout.SLDEditorDockableLayout#createUI(com.sldeditor.common.SLDEditorInterface,
* com.sldeditor.ui.panels.SLDEditorUIPanels, java.util.List)}.
*/
@Test
void testCreateUI() {
@SuppressWarnings("unused") TestSLDEditor testSLDEditor = null;
PrefData prefData = new PrefData();
prefData.setUiLayoutClass(SLDEditorDefaultLayout.class.getName());
PrefManager.getInstance().setPrefData(prefData);
try {
testSLDEditor = TestSLDEditor.createAndShowGUI2(null, null, true, null);
} catch (Exception e) {
e.printStackTrace();
}
File tmpFolder = new File(System.getProperty("java.io.tmpdir"));
String uiLayout = SLDEditorDefaultLayout.class.getName();
UILayoutInterface ui = UILayoutFactory.getUILayout(uiLayout);
SLDEditorUIPanels uiMgr = SLDEditorUIPanels.getInstance();
ui.createUI(new SLDEditorMain(testSLDEditor), uiMgr, new ArrayList<ExtensionInterface>());
ui.writeLayout(tmpFolder.getAbsolutePath());
ui.readLayout(tmpFolder.getAbsolutePath());
File f = new File(tmpFolder, "layout.data");
f.delete();
assertEquals(uiLayout, SLDEditorDefaultLayout.class.getName());
}
Aggregations