public boolean validateGraphics(Graphics graphics) { Validator validator = getValidator(); boolean isValid = GraphicsUtil.validate(graphics); Display display = getFromSession("display"); display.setModule("graphicsInfo"); display.addErrors(validator.getMessages()); // FacesContext.getCurrentInstance().isValidationFailed() setValidated(isValid); return isValid; }
public String handleRemoveGraphics(@Observes @Remove Graphics graphics) { display = getFromSession("display"); display.setModule("graphicsInfo"); try { display.info("Removing Graphics " + GraphicsUtil.getLabel(graphics) + " from the system."); removeGraphicsFromSystem(graphics); selectionContext.clearSelection("graphics"); graphicsEventManager.fireClearSelectionEvent(); graphicsEventManager.fireRemovedEvent(graphics); workspaceEventManager.fireRefreshEvent(); return null; } catch (Exception e) { handleException(e); return null; } }
protected void initialize(Graphics graphics) { GraphicsUtil.initialize(graphics); graphicsWizard.initialize(graphics); setContext("graphics", graphics); }
@Override public Graphics clone(Graphics graphics) { graphics = GraphicsUtil.clone(graphics); return graphics; }
@Override public Graphics create() { Graphics graphics = GraphicsUtil.create(); return graphics; }