/** @see junit.framework.TestCase#setUp() */ protected void setUp() throws Exception { // JemmyProperties.setCurrentDispatchingModel( // JemmyProperties.ROBOT_MODEL_MASK); JemmyProperties.setCurrentOutput(TestOut.getNullOutput()); String prefsFile = FileUtil.createTempFilename() + "-toolbox.xml"; workspace_ = new PluginWorkspace(prefsFile); window_ = new JFrameOperator(workspace_); }
/** @see junit.framework.TestCase#setUp() */ protected void setUp() throws Exception { super.setUp(); // JemmyProperties.setCurrentDispatchingModel( // JemmyProperties.ROBOT_MODEL_MASK); JemmyProperties.setCurrentOutput(TestOut.getNullOutput()); final JFontChooserDialog fsd = new JFontChooserDialog(new JFrame(), "Select font", false); fsd.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); fsd.addFontDialogListener( new IFontChooserDialogListener() { public void okButtonPressed(JFontChooser fontPanel) { logger_.debug("OK button pressed"); fsd.dispose(); } public void cancelButtonPressed(JFontChooser fontPanel) { logger_.debug("Cancel button pressed"); fsd.dispose(); } public void applyButtonPressed(JFontChooser fontPanel) { logger_.debug("Apply button pressed"); } }); SwingUtil.centerWindow(fsd); fsd.setVisible(true); dialog_ = new JDialogOperator("Select font"); applyButton_ = JemmyUtil.findButton(dialog_, JFontChooserDialog.NAME_APPLY_BUTTON); cancelButton_ = JemmyUtil.findButton(dialog_, JFontChooserDialog.NAME_CANCEL_BUTTON); okButton_ = JemmyUtil.findButton(dialog_, JFontChooserDialog.NAME_OK_BUTTON); fontList_ = new JListOperator(dialog_, new NameComponentChooser(JFontChooser.NAME_FONT_LIST)); styleList_ = new JListOperator(dialog_, new NameComponentChooser(JFontChooser.NAME_STYLE_LIST)); sizeList_ = new JListOperator(dialog_, new NameComponentChooser(JFontChooser.NAME_SIZE_LIST)); }