public JsonObject populateBeanFromWizard(WizardViewController viewController) { this.sourceController = viewController; SingleResult sr = (SingleResult) sourceController.getModel(); JsonObject query = new JsonObject(); WizardViewUtils.copyAllAttributesFrom(sr, query); query.addProperty("containerOid", sourceController.getRootStructure().getModelContainerFullId()); return query; }
/** * @{inheritedDoc} */ @Override public UIAccessRule isAccessible(IEmaginController controller, VLViewComponentXML compConfig) { IRootContext context = ((RootStructureController) controller.getRootStructure()).getRootContext(); if ((context == null) || (context.getCurrentSubject() == null)) { return UIAccessRule.SHOW; } return UIAccessRule.HIDDEN; } }
@Override public void popContent() { super.popContent(); secondaryHeaderStack.setVisible(true); }
public void handleEvent(CloseMenuEvent e) { if (e.getSide() == MenuPos.PRIMARY_MENU) { animateHidePrimaryMenu(); } else if (e.getSide() == MenuPos.TERNARY_MENU) { animateHideTernaryMenu(); } }
@Bean @Named("DemoMobilePreferencesRSView") @View(locations= {"/com/nexitia/emaginplatform/jfx/core/demoapp/mobile/preferences/DemoMobilePreferencesRSView.xml"}, outputFilePath="/com/nexitia/emaginplatform/jfx/core/demoapp/mobile/preferences") @I18n(locations= {"/com/nexitia/emaginplatform/jfx/core/demoapp/desktop/preferences/message.properties"}, dest="/com/nexitia/emaginplatform/jfx/core/demoapp/mobile/preferences") public RootStructureController DemoPreferencesRSView() { RootStructureController p = new RootStructureController(); p.setMessageSource((MessageSource) Services.getBean("PreferencesMessageSource")); p.setModelProvider((IModelProvider) Services.getBean("RootStructureModelLoader")); p.getViewDefinitions().add("/com/nexitia/emaginplatform/jfx/core/demoapp/mobile/preferences/DemoMobilePreferencesRSView.json"); return p; }
@Bean @Named("SearchFiltersInSecondaryRSView") @View(locations= {"/com/nexitia/emaginplatform/jfx/core/demoapp/desktop/search/SearchFiltersInSecondaryRSView.xml"},outputFilePath="/com/nexitia/emaginplatform/jfx/core/demoapp/mobile/search") public RootStructureController searchFiltersInSecondaryRSView() { RootStructureController p = new RootStructureController(); p.setMessageSource((MessageSource) Services.getBean("SearchMessageSource")); p.setModelProvider((IModelProvider) BeanFactory.instance().getBean("RootStructureModelLoader")); p.addViewDefinition("/com/nexitia/emaginplatform/jfx/core/demoapp/mobile/search/SearchFiltersInSecondaryRSView.json"); return p; } }
/** * @{inheritedDoc} */ @Override protected void process() { super.process(); notificationsStack.setId("root-structure-notifications-stack"); notificationsStack.setStyle("-fx-background-color:rgb(0,0,10,0.10);"); NodeHelper.setHVGrow(notificationsStack); pushedContentWrapper.managedProperty().bind(pushedContentWrapper.visibleProperty()); closePushedContentButton.setOnAction(e-> popContent()); IconUtils.setFontIcon("gmi-close:22", closePushedContentButton); closePushedContentButton.setContentDisplay(ContentDisplay.GRAPHIC_ONLY); // rootStructure.visibleProperty().bind(Bindings.not(pushedContentWrapper.visibleProperty())); //final CompletableFuture buildHeader = CompletableFuture.runAsync(() -> buildHeader(), DesktopApplicationRunner.pool); //final CompletableFuture buildContent = CompletableFuture.runAsync(() -> buildContent(), DesktopApplicationRunner.pool); //CompletableFuture.allOf(buildHeader, buildContent).join(); //CompletableFuture.runAsync(() -> buildPrimaryMenu(), DesktopApplicationRunner.pool); buildHeader(); buildContent(); buildPrimaryMenu(); secondaryRootStructureWrapper.managedProperty().bind(secondaryRootStructureWrapper.visibleProperty()); secondaryRootStructureWrapper.setVisible(false); if(AbstractApplicationRunner.isSimulMobile() || AbstractApplicationRunner.isMobile()) { } if (!headerLess) { // AnchorPane.setTopAnchor(rootStructureWrapper, 88.); } initAnimations(); }
/** * @{inheritedDoc} */ @Override public List<IEnumeratedValueModel> loadValues(IEmaginController controller, VLViewComponentXML configuration) { JsonObject query = new JsonObject(); // need to know from which context we want to link roleB query.addProperty("oid", ((RootStructureController) controller.getRootStructure()).getModelBusinessTypeFullId()); // the type of link we want to create String linktype = configuration.getPropertyValue("linkTypeFullPath"); query.addProperty("linkTypePath", linktype); // from roleA which is the current container of the root context!!! not // the model query.addProperty("roleAPath", ((RootStructureController) controller.getRootStructure()).getRootContext().getContainerPath()); getLinkableRoleBsWithAgregationOperation.doOperation(query, this::onLinkableRoleBsLoaded, null); return result; }
public void buildPrimaryMenu() { final VLViewComponentXML rootComp = getRootComponent(); if (rootComp != null) { final String primaryMenuId = rootComp.getPropertyValue(PRIMARY_MENU_VIEW); case P: if (event.isControlDown()) { displayPrimary(null); if (primaryMenuIsShowing) { event.consume(); animateHidePrimaryMenu();
controller.initViewContext(configXML, root.getRootStructure().getRootContext()); controller.build(); controller.setInitialized(true); ((RootStructureController) root).addChild(controller);
structureContent.initViewContext(new VLViewConfigXML(), rootStructure.getRootContext()); structureContent.setInitialized(true); structureContent.build(); final String rootStructureContentStyleClass = view.getRootComponent().getPropertyValue("rootStructureContentStyleClass"); if (StringUtils.isNotBlank(rootStructureContentStyleClass)) { rootStructure.getContentRootPane().getStyleClass().setAll(rootStructureContentStyleClass.split(",")); } else { rootStructure.getContentRootPane().getStyleClass().clear();
private void animateShowPrimaryMenu() { if (!primaryMenuIsShowing) { final EasingInterpolator ei = new EasingInterpolator(EasingMode.IN_EXPO); TranslateTransition tt; rootStructurePrimaryPane.setVisible(true); // if screen is not maximized, no animation when showing. // because transalation will start out of the screen!! if (!AbstractApplicationRunner.isDesktop()) { tt = NodeHelper.translateTo(-800, 0, rootStructurePrimaryPane); } else { tt = NodeHelper.translateTo(-1, 0, rootStructurePrimaryPane); } tt.setOnFinished(e -> { // hide menu on click on root pane notificationsStack.setOnMouseClicked(a -> { animateHidePrimaryMenu(); }); }); tt.setDuration(Duration.millis(50)); tt.setInterpolator(ei); primaryMenuIsShowing = true; makeCentralPaneDarker(); tt.play(); } }
public void closeSecondaryRSWrapper() { animateHideSecondaryRSContent(); //ViewStructure.instance().hideSecondaryRS(); }
/** * @param root */ public void setRootStructure(RootStructureController root) { rootStructure = root; root.addChild(this); }
public void showMessage(Node message) { if(Platform.isFxApplicationThread()) { _showMessage(message); } else { Platform.runLater(()->{ _showMessage(message); }); } }
/** * Displays a popup or top right corner of the display. * * @param e */ protected void animateShowTernaryMenu() { if (ternaryMenuExpanded) { animateHideTernaryMenu(); } final EasingInterpolator ei = new EasingInterpolator(EasingMode.IN_OUT_SINE); TranslateTransition tt; // if screen is not maximized, no animation when showing. // because transalation will start out of the screen!! if (ViewStructure.primaryStage().isFullScreen()) { tt = NodeHelper.translateTo(600, 0, rootStructureTernaryPane); } else { tt = NodeHelper.translateTo(-1, 0, rootStructureTernaryPane); rootStructureTernaryPane.setVisible(true); } rootStructureTernaryPane.setCache(true); rootStructureTernaryPane.setCacheHint(CacheHint.SPEED); ternaryMenuExpanded = true; tt.setDuration(Duration.millis(300)); tt.setInterpolator(ei); tt.play(); }
@Bean @Named("ShowDetailsInSecondaryRSView") @View(locations= {"/com/nexitia/emaginplatform/jfx/core/demoapp/desktop/details/ShowDetailsInSecondaryRSView.xml"}, outputFilePath = "/com/nexitia/emaginplatform/jfx/core/demoapp/mobile/details") @I18n(locations= {"/com/nexitia/emaginplatform/jfx/core/demoapp/desktop/details/message.properties"}, dest="/com/nexitia/emaginplatform/jfx/core/demoapp/mobile/details") public RootStructureController showDetailsInSecondaryRSView() { RootStructureController pmc = new RootStructureController(); pmc.setMessageSource((MessageSource) Services.getBean("DetailsViewMessageSource")); pmc.setModelProvider((IModelProvider) Services.getBean("RootStructureModelLoader")); pmc.addViewDefinition("/com/nexitia/emaginplatform/jfx/core/demoapp/mobile/details/ShowDetailsInSecondaryRSView.json"); return pmc; }
private void initAnimations() { secondaryRootStructureWrapper.addEventFilter(KeyEvent.KEY_RELEASED, ev -> { if (secondaryRootStructureWrapper.isVisible() && ev.getCode() == KeyCode.ESCAPE) { animateHideSecondaryRSContent(); } }); secondaryRootStructureWrapper.setCache(true); secondaryRootStructureWrapper.setCacheHint(CacheHint.SPEED); final EasingInterpolator cme = new EasingInterpolator(EasingMode.IN_OUT_EXPO); if(!AbstractApplicationRunner.isDesktop()) { showSecondaryStrWrapper = NodeHelper.translateYTo(50, 20, secondaryRootStructureWrapper); } else { showSecondaryStrWrapper = NodeHelper.translateYTo(50, 0, secondaryRootStructureWrapper); } showSecondaryStrWrapper.setDuration(Duration.millis(100)); showSecondaryStrWrapper.setInterpolator(cme); final EasingInterpolator cme1 = new EasingInterpolator(EasingMode.OUT_ELASTIC); hideSecondaryStrWrapper = NodeHelper.translateYTo(400, 2000, secondaryRootStructureWrapper); hideSecondaryStrWrapper.setDuration(Duration.millis(300)); hideSecondaryStrWrapper.setInterpolator(cme1); hideSecondaryStrWrapper.setOnFinished(e -> { secondaryRSActionsWrapper.getChildren().clear(); if (secondaryRootStructureWrapper.isVisible()) { secondaryRootStructureWrapper.setVisible(false); } }); }
/** * @{inheritedDoc} */ @Override public List<IEnumeratedValueModel> loadValues(IEmaginController controller, VLViewComponentXML configuration) { String enumerationKey = configuration.getPropertyValue("enumerationKey"); JsonObject query = new JsonObject(); query.addProperty("enumerationKey", enumerationKey); query.addProperty("containerPath", ((RootStructureController) controller.getRootStructure()).getRootContext().getContainerPath()); List<IEnumeratedValueModel> result = new ArrayList<>(1); listvaluesOperation.doOperation(query, e -> { MultipleResult multipleResult = (MultipleResult) e; result.addAll(EnumeratedValueAdapter.toEnumeratedValues(multipleResult)); }); return result; }
/** * @{inheritedDoc} */ @Override public void execute(IActionRequest actionRequest, Optional<IActionResult> previousActionResult) { controller = (AbstractViewController) actionRequest.getController(); SingleResult sr = (SingleResult) controller.getModel(); JsonObject query = new JsonObject(); WizardViewUtils.copyAllAttributesFrom(sr, query); query.addProperty("containerOid", controller.getRootStructure().getModelContainerFullId()); query.addProperty("container", controller.getRootStructure().getModelContainerFullId()); createPeopleOperation.doOperation(query, this::createSuccess, this::onActionGeneralError); }