Java Code Examples for javafx.beans.property.SimpleStringProperty

The following examples show how to use javafx.beans.property.SimpleStringProperty. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Open-Lowcode   Source File: EditableTreeTable.java    License: Eclipse Public License 2.0 6 votes vote down vote up
/**
 * generates the root column showing label of line elements
 */
private void generateRootColumn() {

	TreeTableColumn<
			EditableTreeTableLineItem<Wrapper<E>>,
			String> rootcolumn = new TreeTableColumn<EditableTreeTableLineItem<Wrapper<E>>, String>("Item");
	rootcolumn.setCellValueFactory(new Callback<
			CellDataFeatures<EditableTreeTableLineItem<Wrapper<E>>, String>, ObservableValue<String>>() {

		@Override
		public ObservableValue<String> call(CellDataFeatures<EditableTreeTableLineItem<Wrapper<E>>, String> param) {
			return new SimpleStringProperty(param.getValue().getValue().getLabel());
		}
	});

	treetableview.getColumns().add(rootcolumn);
}
 
Example 2
@FXML private void renamePlayerOption() {
	try {
		PlayerOption option = playerList.getSelectionModel().getSelectedItem();
		if (option != null) {
			StringProperty id = new SimpleStringProperty(option.getId().get());
			NameEditController.display(id, true);
			if (id.get().contains(".")) {
				BetonQuestEditor.showError("no-cross-conversation");
				return;
			}
			option.getId().set(id.get());
			BetonQuestEditor.getInstance().refresh();
		}
	} catch (Exception e) {
		ExceptionController.display(e);
	}
}
 
Example 3
Source Project: phoebus   Source File: ArchiveListPane.java    License: Eclipse Public License 1.0 6 votes vote down vote up
public ArchiveListPane()
{
    archive_list = new TableView<>(FXCollections.observableArrayList(Preferences.archive_urls));

    final TableColumn<ArchiveDataSource, String> arch_col = new TableColumn<>(Messages.ArchiveName);
    arch_col.setCellValueFactory(cell -> new SimpleStringProperty(cell.getValue().getName()));
    arch_col.setMinWidth(0);
    archive_list.getColumns().add(arch_col);

    final MenuItem item_info = new MenuItem(Messages.ArchiveServerInfo, Activator.getIcon("info_obj"));
    item_info.setOnAction(event -> showArchiveInfo());
    ContextMenu menu = new ContextMenu(item_info);
    archive_list.setContextMenu(menu);

    archive_list.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
    archive_list.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);

    setCenter(archive_list);
}
 
Example 4
Source Project: TelegramClone   Source File: UserViewModel.java    License: MIT License 5 votes vote down vote up
public UserViewModel(String userName, String lastMessage, String time, String notificationsNumber, Image avatarImage) {
    this.userName = userName;
    this.lastMessage = new SimpleStringProperty(lastMessage);
    this.time = new SimpleStringProperty(time);
    this.notificationsNumber = new SimpleStringProperty(notificationsNumber);
    this.avatarImage = avatarImage;
    messagesList = FXCollections.observableArrayList();
}
 
Example 5
public GlobalVariable(QuestPackage pack, String id) throws PackageNotFoundException {
	if (pack == null) {
		throw new PackageNotFoundException();
	}
	this.pack = pack;
	this.id = new SimpleStringProperty(id.replace(" ", "_"));
}
 
Example 6
Source Project: MyBox   Source File: ConvolutionKernel.java    License: Apache License 2.0 5 votes vote down vote up
public void setName(String name) {
    if (name == null) {
        this.name = null;
    } else {
        this.name = new SimpleStringProperty(name);
    }
}
 
Example 7
Source Project: latexdraw   Source File: DrawingImpl.java    License: GNU General Public License v3.0 5 votes vote down vote up
DrawingImpl() {
	super();
	title = new SimpleStringProperty("");
	shapes = new SimpleListProperty<>(FXCollections.observableArrayList());
	selection = ShapeFactory.INST.createGroup();
	modified = false;
}
 
Example 8
Source Project: constellation   Source File: AbstractEditorFactory.java    License: Apache License 2.0 5 votes vote down vote up
protected AbstractEditor(final EditOperation editOperation, final DefaultGetter<V> defaultGetter, final ValueValidator<V> validator, final String editedItemName, final V initialValue) {
    this.editOperation = editOperation;
    this.defaultGetter = defaultGetter;
    this.validator = validator;
    this.disableEditProperty = new SimpleBooleanProperty();
    this.errorMessageProperty = new SimpleStringProperty();
    this.editedItemName = editedItemName;
    setCurrentValue(initialValue);
}
 
Example 9
Source Project: JFX-Browser   Source File: HistoryController.java    License: MIT License 5 votes vote down vote up
public HistoryStoreView(String email,String date, String link, String time, String domain, String title) {
	
	
	this.email1 = new SimpleStringProperty(email);
	this.date1 = new SimpleStringProperty(date);
	this.link1 = new SimpleStringProperty(link);
	this.time1 = new SimpleStringProperty(time);
	this.domain1 = new SimpleStringProperty(domain);
	this.title1 = new SimpleStringProperty(title);
}
 
Example 10
Source Project: cate   Source File: WalletTransaction.java    License: MIT License 5 votes vote down vote up
protected WalletTransaction(final Network network, final Transaction transaction, final Coin balanceChange) {
    this.network = network;
    this.transaction = transaction;
    this.balanceChange = balanceChange;
    final MonetaryFormat monetaryFormatter = network.getParams().getMonetaryFormat();
    dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
    networkNameProperty = new SimpleStringProperty(NetworkResolver.getName(network.getParams()));
    dateProperty = new SimpleStringProperty(dateFormat.format(transaction.getUpdateTime()));
    amountProperty = new SimpleStringProperty(monetaryFormatter.format(balanceChange).toString());
    memoProperty = new SimpleStringProperty(transaction.getMemo());
    memoProperty.addListener(change -> {
        transaction.setMemo(memoProperty.getValue());
    });
}
 
Example 11
Source Project: RentLio   Source File: ReceptionTableModel.java    License: Apache License 2.0 5 votes vote down vote up
public ReceptionTableModel(SimpleStringProperty receptionId, SimpleStringProperty name, SimpleStringProperty branch, SimpleStringProperty address, SimpleStringProperty email, SimpleIntegerProperty tel, SimpleStringProperty nic) {
    this.receptionId = receptionId;
    this.name = name;
    this.branch = branch;
    this.address = address;
    this.email = email;
    this.tel = tel;
    this.nic = nic;
}
 
Example 12
public RecordingDetailsController(Archivo mainApp) {
    this.mainApp = mainApp;
    this.recordingSelection = mainApp.getRecordingListController().getRecordingSelection();
    imageCache = new HashMap<>();
    showPoster = new SimpleBooleanProperty(false);
    expectedRemovalText = new SimpleStringProperty();
}
 
Example 13
public TimingLocationInput() {
     this.IDProperty = new SimpleIntegerProperty();
     this.timingLocationInputName = new SimpleStringProperty("Not Yet Set");
     this.timingInputString = new SimpleStringProperty();
     tailFileBooleanProperty = new SimpleBooleanProperty();
     timingReaderInitialized = new SimpleBooleanProperty();
     skewInput = new SimpleBooleanProperty();
     //attributes = new ConcurrentHashMap <>();
     skewDuration = Duration.ZERO;
     skewInput.setValue(Boolean.FALSE);

     
}
 
Example 14
public IndicatorParameter(String description, IndicatorParameterType type, String value){
    Objects.requireNonNull(description,"Must be not null");
    Objects.requireNonNull(type,"Must be not null");
    Objects.requireNonNull(value,"Must be not null");
    this.description = new SimpleStringProperty(description);
    this.type = new SimpleObjectProperty<IndicatorParameterType>(type);
    this.value = new SimpleStringProperty(value);
}
 
Example 15
Source Project: bisq   Source File: ChatMessage.java    License: GNU Affero General Public License v3.0 5 votes vote down vote up
private ChatMessage(SupportType supportType,
                    String tradeId,
                    int traderId,
                    boolean senderIsTrader,
                    String message,
                    @Nullable List<Attachment> attachments,
                    NodeAddress senderNodeAddress,
                    long date,
                    boolean arrived,
                    boolean storedInMailbox,
                    String uid,
                    int messageVersion,
                    boolean acknowledged,
                    @Nullable String sendMessageError,
                    @Nullable String ackError,
                    boolean wasDisplayed) {
    super(messageVersion, uid, supportType);
    this.tradeId = tradeId;
    this.traderId = traderId;
    this.senderIsTrader = senderIsTrader;
    this.message = message;
    this.wasDisplayed = wasDisplayed;
    Optional.ofNullable(attachments).ifPresent(e -> addAllAttachments(attachments));
    this.senderNodeAddress = senderNodeAddress;
    this.date = date;
    arrivedProperty = new SimpleBooleanProperty(arrived);
    storedInMailboxProperty = new SimpleBooleanProperty(storedInMailbox);
    acknowledgedProperty = new SimpleBooleanProperty(acknowledged);
    sendMessageErrorProperty = new SimpleStringProperty(sendMessageError);
    ackErrorProperty = new SimpleStringProperty(ackError);
    notifyChangeListener();
}
 
Example 16
Source Project: G-Earth   Source File: InteractableScheduleItem.java    License: MIT License 5 votes vote down vote up
@Override
public void constructFromString(String str) {
    String[] parts = str.split("\t");
    if (parts.length == 6) {
        int index = Integer.parseInt(parts[0]);
        boolean paused = parts[1].equals("true");
        Interval delay = new Interval(parts[2]);
        HPacket packet = new HPacket(parts[3]);
        HMessage.Direction direction = parts[4].equals(HMessage.Direction.TOSERVER.name()) ? HMessage.Direction.TOSERVER : HMessage.Direction.TOCLIENT;
        String packetAsString = parts[5];

        construct(index, paused, delay, packet, direction);
        this.packetAsStringProperty = new SimpleStringProperty(packetAsString);
    }
}
 
Example 17
/**
 * Constructor
 *
 * @param filter The library filter utility class
 * @param items The items shown inside a toggle button group in the sidebar
 * @param selectedListWidget The currently selected {@link ListWidgetType} by the user
 */
public LibrarySidebar(LibraryFilter filter, ObservableList<ShortcutCategoryDTO> items,
        ObjectProperty<ListWidgetType> selectedListWidget) {
    super(items, filter.searchTermProperty(), selectedListWidget);

    this.applicationName = new SimpleStringProperty();
    this.onCreateShortcut = new SimpleObjectProperty<>();
    this.onScriptRun = new SimpleObjectProperty<>();
    this.onOpenConsole = new SimpleObjectProperty<>();
    this.filter = filter;

    this.selectedShortcutCategory = filter.selectedShortcutCategoryProperty();
}
 
Example 18
Source Project: RentLio   Source File: BranchTableModel.java    License: Apache License 2.0 5 votes vote down vote up
public BranchTableModel(SimpleStringProperty branchId, SimpleStringProperty registerId, SimpleStringProperty address, SimpleStringProperty email, SimpleIntegerProperty tel, SimpleStringProperty postalCode) {
    this.branchId = branchId;
    this.registerId = registerId;
    this.address = address;
    this.email = email;
    this.tel = tel;
    this.postalCode = postalCode;
}
 
Example 19
Source Project: JFX8CustomControls   Source File: LedBuilder.java    License: Apache License 2.0 4 votes vote down vote up
public final LedBuilder styleClass(final String STYLE_CLASS) {
    properties.put("styleClass", new SimpleStringProperty(STYLE_CLASS));
    return this;
}
 
Example 20
Source Project: TelegramClone   Source File: UserViewModel.java    License: MIT License 4 votes vote down vote up
public SimpleStringProperty notificationsNumberProperty() {
    return notificationsNumber;
}
 
Example 21
Source Project: RentLio   Source File: BranchTableModel.java    License: Apache License 2.0 4 votes vote down vote up
public SimpleStringProperty postalCodeProperty() {
    return postalCode;
}
 
Example 22
Source Project: Enzo   Source File: SimpleGaugeBuilder.java    License: Apache License 2.0 4 votes vote down vote up
public final SimpleGaugeBuilder unit(final String UNIT) {
    properties.put("unit", new SimpleStringProperty(UNIT));
    return this;
}
 
Example 23
Source Project: regulators   Source File: FeedbackRegulatorBuilder.java    License: Apache License 2.0 4 votes vote down vote up
public final B unit(final String TEXT) {
    properties.put("unit", new SimpleStringProperty(TEXT));
    return (B)this;
}
 
Example 24
Source Project: charts   Source File: XYSeriesBuilder.java    License: Apache License 2.0 4 votes vote down vote up
public final B name(final String NAME) {
    properties.put("name", new SimpleStringProperty(NAME));
    return (B)this;
}
 
Example 25
Source Project: Enzo   Source File: TButtonBuilder.java    License: Apache License 2.0 4 votes vote down vote up
public final TButtonBuilder text(final String TEXT) {
    properties.put("text", new SimpleStringProperty(TEXT));
    return this;
}
 
Example 26
Source Project: RentLio   Source File: ReservationTableModel.java    License: Apache License 2.0 4 votes vote down vote up
public SimpleStringProperty vehicleNumberProperty() {
    return vehicleNumber;
}
 
Example 27
Source Project: OEE-Designer   Source File: TileBuilder.java    License: MIT License 4 votes vote down vote up
@SuppressWarnings("unchecked")
public final B unit(final String UNIT) {
       properties.put("unit", new SimpleStringProperty(UNIT));
       return (B)this;
   }
 
Example 28
Source Project: OEE-Designer   Source File: MonitorController.java    License: MIT License 4 votes vote down vote up
private void createNotificationTable() {
	// collector host
	TableColumn<CollectorNotification, String> tcCollector = new TableColumn<>(
			MonitorLocalizer.instance().getLangString("collector"));
	tvNotifications.getColumns().add(tcCollector);

	TableColumn<CollectorNotification, String> tcCollectorHost = new TableColumn<>(
			MonitorLocalizer.instance().getLangString("host"));
	tcCollectorHost.setPrefWidth(150);
	tcCollectorHost.setCellValueFactory(cellDataFeatures -> {
		return new SimpleStringProperty(cellDataFeatures.getValue().getCollectorHost());
	});
	tcCollector.getColumns().add(tcCollectorHost);

	// collector IP
	TableColumn<CollectorNotification, String> tcCollectorIp = new TableColumn<>(
			MonitorLocalizer.instance().getLangString("ip.address"));
	tcCollectorIp.setPrefWidth(150);
	tcCollectorIp.setCellValueFactory(cellDataFeatures -> {
		return new SimpleStringProperty(cellDataFeatures.getValue().getCollectorIpAddress());
	});
	tcCollector.getColumns().add(tcCollectorIp);

	// timestamp
	TableColumn<CollectorNotification, String> tcTimestamp = new TableColumn<>(
			MonitorLocalizer.instance().getLangString("timestamp"));
	tcTimestamp.setPrefWidth(250);
	tcTimestamp.setCellValueFactory(cellDataFeatures -> {
		String timestamp = cellDataFeatures.getValue().getTimestamp();
		OffsetDateTime odt = DomainUtils.offsetDateTimeFromString(timestamp, DomainUtils.OFFSET_DATE_TIME_8601);
		return new SimpleStringProperty(
				DomainUtils.offsetDateTimeToString(odt, DomainUtils.OFFSET_DATE_TIME_PATTERN));
	});
	tvNotifications.getColumns().add(tcTimestamp);

	// severity
	TableColumn<CollectorNotification, Text> tcSeverity = new TableColumn<>(
			MonitorLocalizer.instance().getLangString("severity"));
	tcSeverity.setPrefWidth(100);
	tcSeverity.setCellValueFactory(cellDataFeatures -> {
		NotificationSeverity severity = cellDataFeatures.getValue().getSeverity();
		Text text = new Text(severity.toString());
		text.setFill(severity.getColor());
		return new SimpleObjectProperty<Text>(text);
	});

	tvNotifications.getColumns().add(tcSeverity);

	// message
	TableColumn<CollectorNotification, String> tcText = new TableColumn<>(
			MonitorLocalizer.instance().getLangString("message"));
	tcText.setPrefWidth(600);
	tcText.setCellValueFactory(cellDataFeatures -> {
		return new SimpleStringProperty(cellDataFeatures.getValue().getText());
	});
	tvNotifications.getColumns().add(tcText);
}
 
Example 29
Source Project: visual-spider   Source File: CrawlConfig.java    License: MIT License 4 votes vote down vote up
public static SimpleStringProperty getProxyPass() {
    return proxyPass;
}
 
Example 30
public List<MemoryLine> parse(int[] values, BiConsumer<Integer, Integer> memoryListener) {
	List<MemoryLine> lines = new ArrayList<>();
	
	int address = 0;
	MemoryLine currLine = null;
	for(int value : values) {
		if(currLine == null) {
			currLine = new MemoryLine(address);
		}
		
		SimpleStringProperty prop = new SimpleStringProperty(parseValue(value));
		
		if(memoryListener != null) {
			MemoryLine currMemoryLine = currLine;
			int currSize = currMemoryLine.values.size();
			prop.addListener(
					(observable, oldValue, newValue) ->
							memoryListener.accept(currMemoryLine.address + currSize, parseValue(newValue)));
		}
		
		currLine.values.add(prop);
		
		if(currLine.values.size() == 16) {
			lines.add(currLine);
			currLine = null;
			address += 16;
		}
	}
	
	while(address < (1 << addressBits)) {
		if(currLine == null) {
			currLine = new MemoryLine(address);
		}
		
		currLine.values.add(new SimpleStringProperty("0"));
		
		if(currLine.values.size() == 16) {
			lines.add(currLine);
			currLine = null;
			address += 16;
		}
	}
	
	if(currLine != null) {
		lines.add(currLine);
	}
	
	return lines;
}