@Override public void saveStateTo(Map<String, String> data) { data.put(defaultString(getId()) + "input.size", Integer.toString(getItems().size())); IntStream.range(0, getItems().size()).forEach(i -> { SelectionTableRowData current = getItems().get(i); String id = defaultString(getId()); data.put(id + "input." + i, current.descriptor().getFile().getAbsolutePath()); if (new DefaultUserContext().isSavePwdInWorkspaceFile()) { data.put(id + "input.password.enc" + i, encrypt(current.descriptor().getPassword())); } data.put(id + "input.range." + i, defaultString(current.pageSelection.get())); data.put(id + "input.step." + i, defaultString(current.pace.get())); data.put(id + "input.reverse." + i, Boolean.toString(current.reverse.get())); }); }
return married.get();
@Override public void apply(AlternateMixParametersBuilder builder, Consumer<String> onError) { if (table().getItems().isEmpty()) { onError.accept(DefaultI18nContext.getInstance().i18n("No PDF document has been selected")); } else { for (SelectionTableRowData row : table().getItems()) { String step = defaultIfBlank(row.pace.get(), "1").trim(); if (step.matches("[1-9]\\d*")) { PdfMixInput input = new PdfMixInput(row.descriptor().toPdfFileSource(), row.reverse.get(), Integer.parseInt(step)); input.addAllPageRanges(row.toPageRangeSet()); builder.addInput(input); } else { onError.accept(DefaultI18nContext.getInstance().i18n("Select a positive integer number as pace")); break; } } } }
public SelectionTableRowData duplicate() { descriptor.retain(); SelectionTableRowData dupe = new SelectionTableRowData(descriptor); dupe.pageSelection.set(pageSelection.get()); dupe.reverse.set(reverse.get()); dupe.pace.set(pace.get()); return dupe; }
/** * * @return whether a visual option is presented to * users to switch between the various {@link Mode modes} available. */ public final boolean isModeSwitcherVisible() { return modeSwitcherVisible.get(); }
/** * * @return whether a text field should be presented to * users to allow for them to filter the properties in the property sheet to * only show ones matching the typed input. */ public final boolean isSearchBoxVisible() { return searchBoxVisible.get(); }
/** * Get the isModifying * * @return the isModifying */ public boolean isModifying() { return isModifying.get(); }
/** * Get the isModifying * * @return the isModifying */ public boolean isModifying() { return isModifying.get(); }
/** * @return */ @Override public final boolean isLastRow() { return this.lastRowProperty().get(); }
/** * @return */ public final boolean isDisplayNavigationBar() { return this.displayNavigationBarProperty().get(); }
/** * @return */ default boolean isModifying() { return modifyingProperty().get(); }
private void onCollapseExpand() { if (collpased.get()) { collpased.set(false); } else { collpased.set(true); } }
@Override public boolean isClosable() { if (!saved.get()) { return GseAlerts.showSaveDialog(store.getName(), this); } return true; } }
@Override public boolean isClosable() { if (!saved.get()) { return GseAlerts.showSaveDialog(((ProjectFile) storableScript).getName(), this); } return true; }
public void switchMaximize() { if (!maximizeProperty.get()) { maximizeProperty.set(true); getController().maximize(); } }
@Override public void closeSwitchable(ViewLayoutPosition position) { super.closeSwitchable(position); if (position == ViewLayoutPosition.LEFT) { if(minimized.get()) { closeLeftPane(); } } if (position == ViewLayoutPosition.RIGHT) { closeRightPane(); } }
/** * * @param attributeVisualisationMappingBuilder attributeEditorBuilder * @param uniformDesign uniformDesign * @param dataVisualisationCustomizer way to customize or extend the editor visualisation for a specific data class, e.g. add a green border(silly example), add special button */ public DataEditor(AttributeVisualisationMappingBuilder attributeVisualisationMappingBuilder, UniformDesign uniformDesign, BiFunction<Node,Data,Node> dataVisualisationCustomizer) { this.dataEditorState = new DataEditorState(null, new ArrayList<>(), attributeVisualisationMappingBuilder,uniformDesign,this,dataVisualisationCustomizer,true); historyNavigationVisible.set(true); historyNavigationVisible.addListener(observable -> updateState(dataEditorState.setShowNavigation(historyNavigationVisible.get()))); }
protected void closeRightPane() { if (!minimized.get()) { rightFloatingPaneContentWrapper.setVisible(false); } else { if (popOverFloatingScrollPane.isVisible()) { endPopOverRight(); } } hideRightPaneButton.setVisible(false); }
protected void closeRightPane() { if (!minimized.get()) { rightFloatingPaneContentWrapper.setVisible(false); } else { if (popOverFloatingScrollPane.isVisible()) { endPopOverRight(); } } rightFloatingPaneMenuWrapper.getStyleClass().remove("ep-right-menu-shadow-effect"); hideRightPaneButton.setVisible(false); }
public void handleIdentityDisplay() { if (hideIdentity.get()) { detailsViewLayout.maximized.getDetailsView().getHeader().hideDetailsIdentity(); if (detailsViewLayout.minimized != null) detailsViewLayout.minimized.getDetailsView().getHeader().hideDetailsIdentity(); } else { detailsViewLayout.maximized.getDetailsView().getHeader().showIdentity(); if (detailsViewLayout.minimized != null) detailsViewLayout.minimized.getDetailsView().getHeader().showIdentity(); } }