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; } }
public void saveGraphics(Graphics graphics) { try { saveGraphicsToSystem(graphics); graphicsEventManager.fireAddedEvent(graphics); } catch (Exception e) { handleException(e); } }