/** * @{inheritedDoc} */ @Override public void init() throws Exception { super.init(); initApplication(); }
public void show() { viewStructure.initFromPrimaryStage(primaryStage); notifyPreloader(new StateChangeNotification(StateChangeNotification.Type.BEFORE_START)); primaryStage.show(); }
public static boolean isMobile() { return platformType() == PlatformType.MOBILE; }
public ScrollableContent() { super(); if(AbstractApplicationRunner.isDesktop()) { setStyle("-fx-spacing:64;-fx-alignment:CENTER;"); } else { setStyle("-fx-spacing:16;-fx-alignment:CENTER;"); } NodeHelper.setVgrow(this); currentContent.getChildren().add(NodeHelper.getProcessingIndicator()); }
if(!AbstractApplicationRunner.isDesktop()) { w = ViewStructure.instance().getScene().getWidth() * 0.90; if(AbstractApplicationRunner.isMobile() || AbstractApplicationRunner.isSimulMobile()) {
if (AbstractApplicationRunner.isDesktop()) { } else if (AbstractApplicationRunner.isSimulMobile()) { primaryStage().setResizable(true); primaryStage().setMinHeight(screenMinHeight());
if(!leftSection.getChildren().isEmpty()) { allOverWrapper.getChildren().addAll(leftSection); if(!AbstractApplicationRunner.isMobile()) { allOverWrapper.getChildren().addAll(NodeHelper.horizontalSpacer()); if(!addedLeft && !AbstractApplicationRunner.isMobile() && !AbstractApplicationRunner.isSimulMobile()) { allOverWrapper.getChildren().addAll(NodeHelper.horizontalSpacer()); if(!AbstractApplicationRunner.isMobile()&& !AbstractApplicationRunner.isSimulMobile()) { allOverWrapper.getChildren().addAll(NodeHelper.horizontalSpacer());
/** * @{inheritedDoc} */ @Override public void start(Stage primaryStage) throws Exception { // All heavy stuff must be done in init method!! // here we just show the stage AbstractApplicationRunner.primaryStage = primaryStage; if (Platform.isFxApplicationThread()) { show(); } else { Platform.runLater(() -> show()); } }
if(AbstractApplicationRunner.isDesktop()) {
boolean isMobile = AbstractApplicationRunner.isSimulMobile() || AbstractApplicationRunner.isMobile();
public static HBox horizontalViewActions(AbstractViewController controller, VLViewComponentXML actionsConfiguration, OperationData forModel) { HBox box = new HBox(); if(!AbstractApplicationRunner.isDesktop()) { NodeHelper.setHgrow(box); box.widthProperty().addListener(new ChangeListener<Number>() { @Override public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) { double d = newValue.doubleValue() / box.getChildren().size(); for(Node node: box.getChildren()) { ReflectionUIUtils.setPrefWidth(node, d); } }}); } box.getStyleClass().add("ep-view-actions-container"); NodeHelper.setStyleClass(box, actionsConfiguration, "styleClass", true); List<Node> actionPresenters = process(controller, actionsConfiguration, forModel); for(Node n : actionPresenters) { box.getChildren().add(n); if(!AbstractApplicationRunner.isDesktop()) { NodeHelper.setHgrow(n); } } return box; }
/** * @{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(); }
public static boolean isSimulMobile() { return platformType() == PlatformType.SIMUL_MOBILE; }
private void selectRadio(RadioButton radioButton, boolean goback) { Object v = isStaticValue ? radioButton.getUserData() : radioButton.selectedProperty().get(); List<IListFormValue> s = new ArrayList<>(); IListFormValue val = currentValues.get(0); val.setSavedValue(v); s.add(val); JsonObject query = new JsonObject(); query.addProperty("key", getKey()); query.addProperty("value", v != null ? v.toString() : ""); setPreferenceValueOperation.doOperation(query, res -> { processUpdate(s); if (goback) { SingleResult sr = (SingleResult) controller.getModel(); ParentItemPresenter parent = (ParentItemPresenter) sr.getData().getMeta().get("parentItem"); if (parent != null) { parent.updateDisplay(); } // call go back only if we are not in self mode and in desktop boolean desktopselfView = isSelfView(parent.getController()) && AbstractApplicationRunner.isDesktop(); if(!desktopselfView) NodeHelper.goBack(controller); if(desktopselfView) { StandardViewController c = (StandardViewController) parent.getController().getParent(); IViewLayoutManager m = c != null ? c.getLayoutManager() : null; if(m != null && m instanceof ViewForwardLayoutManager) { ((ViewForwardLayoutManager)m).popContent(); } } } }); }
public static boolean isDesktop() { return platformType() == PlatformType.DESKTOP; }
/** * @{inheritedDoc} */ @Override public void build(IInputComponentWrapper inputComponentWrapper) { super.build(inputComponentWrapper); // NodeHelper.styleClassAddAll(label, getConfiguration(), "viewStyleClass", "form-info-value"); process("/Application"); if(AbstractApplicationRunner.isDesktop()) { // TODO HANDLE TOOLTIP b.setMaxWidth(400); b.setAlignment(Pos.CENTER_RIGHT); } inputComponentWrapper.currentInternalValueProperty().addListener((ChangeListener<String>) (observable, oldValue, newValue) -> { //label.setText(((StringConverter) inputComponentWrapper.getConverter()).toDisplay(newValue)); }); }
public static boolean isXPad() { return platformType() == PlatformType.XPAD; }
/** * @{inheritedDoc} */ @Override public void build(IInputComponentWrapper inputComponentWrapper) { super.build(inputComponentWrapper); // NodeHelper.styleClassAddAll(label, getConfiguration(), "viewStyleClass", "form-info-value"); process("/Application"); if(AbstractApplicationRunner.isDesktop()) { // TODO HANDLE TOOLTIP b.setMaxWidth(400); b.setAlignment(Pos.CENTER_RIGHT); } inputComponentWrapper.currentInternalValueProperty().addListener((ChangeListener<String>) (observable, oldValue, newValue) -> { //label.setText(((StringConverter) inputComponentWrapper.getConverter()).toDisplay(newValue)); }); }
/** * MUST BE DONE FIRST */ private void handlePlatformType() { final String platformType = platformProperties.getProperty("platformType"); AbstractApplicationRunner.platformType(PlatformType.valueOf(platformType.toUpperCase())); }
icon.getStyleClass().add("item-presenter-goright-indicator"); if(AbstractApplicationRunner.isDesktop()) { box= new HBox(); box.getStyleClass().add("item-presenter-row-container");