@Test public void testCreateOpTab() { JComponent component = targetUI.CreateOpTab("testOp", parameterMap, appContext); assertNotNull(component); }
@Override public JComponent CreateOpTab(String operatorName, Map<String, Object> parameterMap, AppContext appContext) { paramMap = parameterMap; targetProductSelector = new TargetProductSelector(new TargetProductSelectorModel(), true); this.appContext = appContext; File saveDir = null; final Object value = paramMap.get(FILE_PARAMETER); if (value != null) { final File file = (File) value; saveDir = file.getParentFile(); } if (saveDir == null) { final String homeDirPath = SystemUtils.getUserHomeDir().getPath(); final String savePath = SnapApp.getDefault().getPreferences().get(SaveProductAsAction.PREFERENCES_KEY_LAST_PRODUCT_DIR, homeDirPath); saveDir = new File(savePath); } targetProductSelector.getModel().setProductDir(saveDir); initParameters(); return targetProductSelector.createDefaultPanel(); }
TargetUI extends BaseOperatorUI { @Override public JComponent CreateOpTab(String operatorName, Map<String, Object> parameterMap, AppContext appContext) { paramMap = parameterMap; targetProductSelector = new TargetProductSelector(new TargetProductSelectorModel(), true); this.appContext = appContext; File saveDir = null; final Object value = paramMap.get(FILE_PARAMETER); if (value != null) { final File file = (File) value; saveDir = file.getParentFile(); } if (saveDir == null) { final String homeDirPath = SystemUtils.getUserHomeDir().getPath(); final String savePath = SnapApp.getDefault().getPreferences().get(SaveProductAsAction.PREFERENCES_KEY_LAST_PRODUCT_DIR, homeDirPath); saveDir = new File(savePath); } targetProductSelector.getModel().setProductDir(saveDir); initParameters(); return targetProductSelector.createDefaultPanel(); } }
TargetUI extends BaseOperatorUI { @Override public JComponent CreateOpTab(String operatorName, Map<String, Object> parameterMap, AppContext appContext) { paramMap = parameterMap; targetProductSelector = new TargetProductSelector(new TargetProductSelectorModel(), true); this.appContext = appContext; File saveDir = null; final Object value = paramMap.get(FILE_PARAMETER); if (value != null) { final File file = (File) value; saveDir = file.getParentFile(); } if (saveDir == null) { final String homeDirPath = SystemUtils.getUserHomeDir().getPath(); final String savePath = SnapApp.getDefault().getPreferences().get(SaveProductAsAction.PREFERENCES_KEY_LAST_PRODUCT_DIR, homeDirPath); saveDir = new File(savePath); } targetProductSelector.getModel().setProductDir(saveDir); initParameters(); return targetProductSelector.createDefaultPanel(); }  }
TargetUI extends BaseOperatorUI { @Override public JComponent CreateOpTab(String operatorName, Map<String, Object> parameterMap, AppContext appContext) { paramMap = parameterMap; targetProductSelector = new TargetProductSelector(new TargetProductSelectorModel(), true); this.appContext = appContext; File saveDir = null; final Object value = paramMap.get(FILE_PARAMETER); if (value != null) { final File file = (File) value; saveDir = file.getParentFile(); } if (saveDir == null) { final String homeDirPath = SystemUtils.getUserHomeDir().getPath(); final String savePath = SnapApp.getDefault().getPreferences().get(SaveProductAsAction.PREFERENCES_KEY_LAST_PRODUCT_DIR, homeDirPath); saveDir = new File(savePath); } targetProductSelector.getModel().setProductDir(saveDir); initParameters(); return targetProductSelector.createDefaultPanel(); }  @Override JComponent CreateOpTab(String operatorName, Map<String, Object> parameterMap, AppContext appContext); @Override void initParameters(); @Override UIValidation validateParameters(); @Override void updateParameters(); }
TargetUI extends BaseOperatorUI { @Override public JComponent CreateOpTab(String operatorName, Map<String, Object> parameterMap, AppContext appContext) { paramMap = parameterMap; targetProductSelector = new TargetProductSelector(new TargetProductSelectorModel(), true); this.appContext = appContext; File saveDir = null; final Object value = paramMap.get(FILE_PARAMETER); if (value != null) { final File file = (File) value; saveDir = file.getParentFile(); } if (saveDir == null) { final String homeDirPath = SystemUtils.getUserHomeDir().getPath(); final String savePath = SnapApp.getDefault().getPreferences().get(SaveProductAsAction.PREFERENCES_KEY_LAST_PRODUCT_DIR, homeDirPath); saveDir = new File(savePath); } targetProductSelector.getModel().setProductDir(saveDir); initParameters(); return targetProductSelector.createDefaultPanel(); }  @Override JComponent CreateOpTab(String operatorName, Map<String, Object> parameterMap, AppContext appContext); @Override void initParameters(); @Override UIValidation validateParameters(); @Override void updateParameters();  }