@Test public void testValidateParameters() { sourceUI.CreateOpTab("testOp", parameterMap, appContext); UIValidation valid = sourceUI.validateParameters(); assertTrue(valid.getState() == UIValidation.State.OK); }
@Override public UIValidation validateParameters() { if (sourceProductSelector != null) { if (sourceProductSelector.getSelectedProduct() == null) return new UIValidation(UIValidation.State.ERROR, "Source product not selected"); } return new UIValidation(UIValidation.State.OK, ""); }
SourceUI extends BaseOperatorUI { @Override public UIValidation validateParameters() { if (sourceProductSelector != null) { if (sourceProductSelector.getSelectedProduct() == null) return new UIValidation(UIValidation.State.ERROR, "Source product not selected"); } return new UIValidation(UIValidation.State.OK, ""); } }
SourceUI extends BaseOperatorUI { @Override public UIValidation validateParameters() { if (sourceProductSelector != null) { if (sourceProductSelector.getSelectedProduct() == null) return new UIValidation(UIValidation.State.ERROR, "Source product not selected"); } return new UIValidation(UIValidation.State.OK, ""); }  }
SourceUI extends BaseOperatorUI { @Override public UIValidation validateParameters() { if (sourceProductSelector != null) { if (sourceProductSelector.getSelectedProduct() == null) return new UIValidation(UIValidation.State.ERROR, "Source product not selected"); } return new UIValidation(UIValidation.State.OK, ""); }  @Override JComponent CreateOpTab(String operatorName, Map<String, Object> parameterMap, AppContext appContext); @Override void initParameters(); @Override UIValidation validateParameters(); @Override void updateParameters(); void setSourceProduct(final Product product); }
SourceUI extends BaseOperatorUI { @Override public UIValidation validateParameters() { if (sourceProductSelector != null) { if (sourceProductSelector.getSelectedProduct() == null) return new UIValidation(UIValidation.State.ERROR, "Source product not selected"); } return new UIValidation(UIValidation.State.OK, ""); }  @Override JComponent CreateOpTab(String operatorName, Map<String, Object> parameterMap, AppContext appContext); @Override void initParameters(); @Override UIValidation validateParameters(); @Override void updateParameters(); void setSourceProduct(final Product product);  }