/** * @{inheritedDoc} */ @Override public <T extends GenericEvent> void dispatchEvent(T event) { if (rootStructure != null) { rootStructure.dispatchEvent(event); } }
/** * @{inheritedDoc} */ @Override public <T extends GenericEvent> void dispatchEvent(T event) { rootStructureController.dispatchEvent(event); }
@Override protected Void call() throws Exception { final StructureContentController current = views.get(views.size() - 1).getProcessedContent(); final UpdateCurrentLocationEvent eve = new UpdateCurrentLocationEvent(); if(current.getCurrentContent() instanceof IRSHeaderHolder) { IRSHeaderHolder h = (IRSHeaderHolder) current.getCurrentContent(); Node header = h.getDisplayIdentity(); if(header != null) { eve.setLocationNode(header); } } eve.setCurrentView(current); eve.setHasPrevious(views.size() > 1); eve.setShowHeader(views.get(views.size() - 1).isShowRootStructureHeader()); getRootStructure().dispatchEvent(eve); return null; } }
public static void loadViewContent(String location, String id, RootStructureController rootStructure) { BuildRSContentEvent ev = new BuildRSContentEvent.Builder().viewId(id).location(location).reinit(true).controller(rootStructure).build(); // !! disptach the event inside the rootstructure and its children // !! no CompletableFuture -> IMPORTANT rootStructure.dispatchEvent(ev); }
public static void loadViewContent(String location, String id, RootStructureController rootStructure, boolean reinit) { BuildRSContentEvent ev = new BuildRSContentEvent.Builder().viewId(id).location(location).reinit(reinit).controller(rootStructure).build(); // !! disptach the event inside the rootstructure and its children // !! no CompletableFuture -> IMPORTANT rootStructure.dispatchEvent(ev); }
/** * Update the header of the Root strcuture. * * @param rsc * @param currentContent */ protected void updateRSCHeader(RootStructureController rsc, StructureContentController currentContent) { AbstractViewController c = currentContent.getCurrentContent(); if (c instanceof IRSHeaderHolder) { Node ident = ((IRSHeaderHolder) c).getDisplayIdentity(); if (ident != null) { ((IRSHeaderHolder) c).hideIdentity(); Platform.runLater(() -> { SetCurrentLocationEvent scl = new SetCurrentLocationEvent(ident); scl.setController(c); rsc.dispatchEvent(scl); }); } } }