Java Code Examples for javafx.collections.FXCollections#unmodifiableObservableList()

The following examples show how to use javafx.collections.FXCollections#unmodifiableObservableList() . 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 File: SetMultimapBinding.java    From gef with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public ObservableList<?> getDependencies() {
	if (dependencies == null) {
		return FXCollections.emptyObservableList();
	}
	return FXCollections.unmodifiableObservableList(dependencies);
}
 
Example 2
Source File: AbstractVisualPart.java    From gef with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public ObservableList<IVisualPart<? extends Node>> getChildrenUnmodifiable() {
	if (childrenUnmodifiable == null) {
		childrenUnmodifiable = FXCollections
				.unmodifiableObservableList(children);
	}
	return childrenUnmodifiable;
}
 
Example 3
Source File: MultisetBinding.java    From gef with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public ObservableList<?> getDependencies() {
	if (dependencies == null) {
		return FXCollections.emptyObservableList();
	}
	return FXCollections.unmodifiableObservableList(dependencies);
}
 
Example 4
Source File: BindingUtils.java    From gef with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * Creates a new {@link ObjectBinding} that contains the values mapped to
 * the specified key.
 *
 * @param <K>
 *            The key type of the {@link ObservableSetMultimap}.
 * @param <V>
 *            The value type of the {@link ObservableSetMultimap}.
 *
 * @param setMultimap
 *            The {@link ObservableSetMultimap} from which the values are to
 *            be retrieved.
 * @param key
 *            the key of the mapping
 * @return A new {@code ObjectBinding}.
 */
public static <K, V> SetBinding<V> valuesAt(
		final ObservableSetMultimap<K, V> setMultimap,
		final ObservableValue<K> key) {
	if (setMultimap == null) {
		throw new UnsupportedOperationException(
				"setMultimap may not be null.");
	}
	if (key == null) {
		throw new UnsupportedOperationException("key may not be null");
	}
	return new SetBinding<V>() {
		{
			super.bind(setMultimap);
		}

		@Override
		protected ObservableSet<V> computeValue() {
			return FXCollections
					.observableSet(setMultimap.get(key.getValue()));
		}

		@Override
		public void dispose() {
			super.unbind(setMultimap);
		}

		@Override
		public ObservableList<?> getDependencies() {
			return FXCollections.unmodifiableObservableList(
					FXCollections.observableArrayList(setMultimap, key));
		}
	};
}
 
Example 5
Source File: DialogControl.java    From WorkbenchFX with Apache License 2.0 4 votes vote down vote up
public final ObservableList<Button> getButtons() {
  return FXCollections.unmodifiableObservableList(buttons);
}
 
Example 6
Source File: Page.java    From WorkbenchFX with Apache License 2.0 4 votes vote down vote up
public final ObservableList<Tile> getTiles() {
  return FXCollections.unmodifiableObservableList(tiles);
}
 
Example 7
Source File: ViewerPanelFX.java    From paintera with GNU General Public License v2.0 4 votes vote down vote up
@Override
public ObservableList<Node> getChildren()
{
	return FXCollections.unmodifiableObservableList(super.getChildren());
}
 
Example 8
Source File: ImagePane.java    From paintera with GNU General Public License v2.0 4 votes vote down vote up
@Override
public ObservableList<Node> getChildren()
{
	return FXCollections.unmodifiableObservableList(super.getChildren());
}
 
Example 9
Source File: AlarmModel.java    From FXTutorials with MIT License 4 votes vote down vote up
public ObservableList<Alarm> getAlarms() {
    return FXCollections.unmodifiableObservableList(alarms);
}
 
Example 10
Source File: ConnectionModel.java    From rapidminer-studio with GNU Affero General Public License v3.0 2 votes vote down vote up
/**
 * Use {@link #removeParameterGroup(String)} or {@link #addOrSetParameter} and {@link #removeParameter} to add and
 * remove placeholders
 *
 * @return unmodifiable observable list
 */
public ObservableList<ConnectionParameterGroupModel> getParameterGroups() {
	return FXCollections.unmodifiableObservableList(parameterGroups);
}
 
Example 11
Source File: Connection.java    From gef with Eclipse Public License 2.0 2 votes vote down vote up
/**
 * Returns the {@link Point}s constituting this {@link Connection} within
 * its coordinate system in the order: start point, control points, end
 * point.
 *
 * @return The {@link Point}s constituting this {@link Connection}.
 */
public ObservableList<Point> getPointsUnmodifiable() {
	return FXCollections.unmodifiableObservableList(points);
}
 
Example 12
Source File: Connection.java    From gef with Eclipse Public License 2.0 2 votes vote down vote up
/**
 * Returns a {@link List} containing the {@link IAnchor}s which are assigned
 * to this {@link Connection} in the order: start anchor, control point
 * anchorsByKeys, end anchor.
 *
 * @return A {@link List} containing the {@link IAnchor}s which are assigned
 *         to this {@link Connection}.
 */
public ObservableList<IAnchor> getAnchorsUnmodifiable() {
	return FXCollections.unmodifiableObservableList(anchors);
}
 
Example 13
Source File: LogEntryModel.java    From phoebus with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Return an unmodifiable list of the model's files.
 *
 * @return
 */
public ObservableList<File> getFiles() {
    return FXCollections.unmodifiableObservableList(files);
}
 
Example 14
Source File: LogEntryModel.java    From phoebus with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Return an unmodifiable list of the model's images.
 *
 * @return
 */
public ObservableList<Image> getImages() {
    return FXCollections.unmodifiableObservableList(images);
}
 
Example 15
Source File: LogEntryModel.java    From phoebus with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Get an unmodifiable list of the selected tags.
 *
 * @return
 */
public ObservableList<String> getSelectedTags() {
    return FXCollections.unmodifiableObservableList(selectedTags);
}
 
Example 16
Source File: Workbench.java    From WorkbenchFX with Apache License 2.0 2 votes vote down vote up
/**
 * Returns an unmodifiableObservableList of the currently open modules.
 * @return an unmodifiableObservableList of the currently open modules.
 */
public final ObservableList<WorkbenchModule> getOpenModules() {
  return FXCollections.unmodifiableObservableList(openModules);
}
 
Example 17
Source File: LogEntryModel.java    From phoebus with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Get an unmodifiable list of the log books.
 *
 * @return
 */
public ObservableList<String> getLogbooks() {
    return FXCollections.unmodifiableObservableList(logbooks);
}
 
Example 18
Source File: LogEntryModel.java    From phoebus with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Get an unmodifiable list of supported log levels.
 *
 * @return - supported log levels
 */
public ObservableList<String> getLevels() {
    return FXCollections.unmodifiableObservableList(levels);
}
 
Example 19
Source File: ActivityLogger.java    From PeerWasp with MIT License 2 votes vote down vote up
/**
 * Returns a read-only view of the activity items.
 *
 * @return list of activity items
 */
public ObservableList<ActivityItem> getActivityItems() {
	return FXCollections.unmodifiableObservableList(activityItems);
}
 
Example 20
Source File: ConnectionModel.java    From rapidminer-studio with GNU Affero General Public License v3.0 2 votes vote down vote up
/**
 * Use {@link #addOrSetPlaceholder} and {@link #removePlaceholder} to add and remove placeholders
 *
 * @return unmodifiable observable list
 */
public ObservableList<PlaceholderParameterModel> getPlaceholders() {
	return FXCollections.unmodifiableObservableList(placeholders);
}