use of jmri.util.swing.ButtonTestAction in project JMRI by JMRI.
the class SdiWindowTest method testAction.
@Test
public void testAction() {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
JmriJFrame f = new JmriJFrame("SDI test");
JButton b = new JButton(new ButtonTestAction("new frame", new jmri.util.swing.sdi.JmriJFrameInterface()));
f.add(b);
f.pack();
f.setVisible(true);
// }
// test order isn't guaranteed!
// public void testFrameCreation() {
JFrame f2 = jmri.util.JmriJFrame.getFrame("SDI test");
Assert.assertTrue("found frame", f2 != null);
f2.dispose();
}
use of jmri.util.swing.ButtonTestAction in project JMRI by JMRI.
the class MultiPaneWindowTest method testAction.
@Test
public void testAction() {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
MultiPaneWindow m = new MultiPaneWindow("Test of Multi Pane Window function", "xml/config/apps/panelpro/Gui3LeftTree.xml", "xml/config/apps/panelpro/Gui3Menus.xml", "xml/config/apps/panelpro/Gui3MainToolBar.xml");
{
JButton b = new JButton(new ButtonTestAction("Open new frame", new jmri.util.swing.sdi.JmriJFrameInterface()));
m.getUpperRight().add(b);
}
{
JButton b = new JButton(new ButtonTestAction("Open in upper panel", new PanedInterface(m)));
m.getLowerRight().add(b);
b = new JButton(new jmri.jmrit.powerpanel.PowerPanelAction("power", new PanedInterface(m)));
m.getLowerRight().add(b);
}
m.setVisible(true);
JFrame f = jmri.util.JmriJFrame.getFrame("Test of Multi Pane Window function");
Assert.assertTrue("found frame", f != null);
f.dispose();
}
use of jmri.util.swing.ButtonTestAction in project JMRI by JMRI.
the class PackageTest method testAction.
public void testAction() {
JmriJFrame f = new JmriJFrame("SDI test");
JButton b = new JButton(new ButtonTestAction("new frame", new jmri.util.swing.sdi.JmriJFrameInterface()));
f.add(b);
f.pack();
f.setVisible(true);
// }
// test order isn't guaranteed!
// public void testFrameCreation() {
JFrame f2 = jmri.util.JmriJFrame.getFrame("SDI test");
Assert.assertTrue("found frame", f2 != null);
f2.dispose();
}
Aggregations