/** * Returns the value of the closeButtonEnabled property. * * @return true if the header's close button is enabled * * @see #closeButtonEnabledProperty() */ public final boolean isCloseButtonEnabled() { return closeButtonEnabled.getValue(); }
/** * Returns the value of the detachable property. * * @return true if the header is visible even while attached * * @see #headerAlwaysVisibleProperty() */ public final boolean isHeaderAlwaysVisible() { return headerAlwaysVisible.getValue(); }
@Override public Boolean getValue() { return delegate.getValue(); }
public final boolean isGapStartAndEnd() { return gapStartAndEnd.getValue(); }
public boolean isShowSearchIcon() { return showSearchIcon == null ? false : showSearchIcon.getValue(); }
/** * Returns a boolean indicating if the current row is expanded or not * * @return A boolean indicating the expanded state of the current editor */ public Boolean isExpanded() { return expandedProperty().getValue(); }
private void doAppletConfig() { System.setProperty("applet.enabled", appletSupport.selectedProperty().getValue().toString()); }
/** * Toggle the expanded state of the row at the given index. * * @param index The index of the row you want to toggle expansion for. */ public void toggleExpanded(int index) { BooleanProperty expanded = (BooleanProperty) getCellObservableValue(index); expanded.setValue(!expanded.getValue()); }
/** * Toggle the expanded state of this row editor. */ public void toggleExpanded() { BooleanProperty expanded = expandedProperty(); expanded.setValue(!expanded.getValue()); }
/** * Creates a new filter predicate for a {@link EngineCategoryDTO} and {@link EngineSubCategoryDTO}. * This predicate then accepts a {@link EngineVersionDTO} object and returns true if the given object fulfills the * filter predicate and false otherwise * * @param engineCategory The engine category * @param engineSubCategory The engine sub category * @return A new filter predicate */ public Predicate<EngineVersionDTO> createFilter(EngineCategoryDTO engineCategory, EngineSubCategoryDTO engineSubCategory) { return engineVersion -> { final boolean containsSearchTerm = Optional.ofNullable(searchTerm.getValueSafe()) .map(searchTerm -> engineVersion.getVersion().toLowerCase().contains(searchTerm.toLowerCase())) .orElse(true); final boolean fulfillsShowInstalled = showInstalled.getValue() && isInstalled(engineCategory, engineSubCategory, engineVersion); final boolean fulfillsShowNotInstalled = showNotInstalled.getValue() && !isInstalled(engineCategory, engineSubCategory, engineVersion); return containsSearchTerm && (fulfillsShowInstalled || fulfillsShowNotInstalled); }; }
@Override public final OptionalBoolean getAsBoolean(String key) { final BooleanProperty prop = (BooleanProperty) properties.get(key); if (prop == null) { return OptionalBoolean.empty(); } else { return OptionalBoolean.ofNullable(prop.getValue()); } }
/** * Creates a new {@link BooleanField} with the given property. * * @param binding * The property from the model to be bound with. * * @return Returns a new {@link BooleanField}. */ public static BooleanField ofBooleanType(BooleanProperty binding) { return new BooleanField(new SimpleBooleanProperty(binding.getValue()), new SimpleBooleanProperty(binding.getValue())).bind(binding); }
/** * The constructor of {@code BooleanField}. * * @param valueProperty * The property that is used to store the current valid value * of the field. * @param persistentValueProperty * The property that is used to store the latest persisted * value of the field. */ protected BooleanField(SimpleBooleanProperty valueProperty, SimpleBooleanProperty persistentValueProperty) { super(valueProperty, persistentValueProperty); stringConverter = new AbstractStringConverter<Boolean>() { @Override public Boolean fromString(String string) { return Boolean.parseBoolean(string); } }; renderer = new SimpleBooleanControl(); userInput.set(stringConverter.toString(value.getValue())); }
import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.scene.control.TextArea; public class LogTextArea extends TextArea { private final BooleanProperty pausedScrollProperty = new SimpleBooleanProperty(false); private double scrollPosition = 0; public LogTextArea() { super(); } public void setMessage(String data) { if (isPausedScroll()) { scrollPosition = this.getScrollTop(); this.setText(data); this.setScrollTop(scrollPosition); } else { this.setText(data); this.setScrollTop(Double.MAX_VALUE); } } public final BooleanProperty pausedScrollProperty() { return pausedScrollProperty; } public final boolean isPausedScroll() { return pausedScrollProperty.getValue(); } public final void setPausedScroll(boolean value) { pausedScrollProperty.setValue(value); } }
if (!commitModeProperty.getValue()) { getItem().resetCurrentEntry();
/** * Creates a new SportType domain object from the edited JavaFX properties. * * @return SportType */ public SportType getSportType() { final SportType sportType = new SportType(id); sportType.setName(name.getValue().trim()); sportType.setRecordDistance(recordDistance.getValue()); sportType.setSpeedMode(speedMode.getValue().getSpeedMode()); sportType.setIcon(StringUtils.getTrimmedTextOrNull(icon.getValue())); sportType.setColor(color.getValue()); sportSubtypes.forEach(sportSubType -> sportType.getSportSubTypeList().set(sportSubType)); equipments.forEach(equipment -> sportType.getEquipmentList().set(equipment)); return sportType; } }