Java Code Examples for javafx.collections.ObservableMap#containsKey()

The following examples show how to use javafx.collections.ObservableMap#containsKey() . 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: AbstractLabelPart.java    From gef with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * Retrieves the stored position for the label.
 *
 * @return The label position stored in the attributes.
 */
public Point getLabelPosition() {
	String key = getLabelPositionAttributeKey();
	ObservableMap<String, Object> attributes = getContent().getKey().getAttributes();
	if (!attributes.containsKey(key)) {
		return null;
	}
	return (Point) attributes.get(key);
}
 
Example 2
Source File: ContainersFeaturePanelSkin.java    From phoenicis with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Applies the engine settings belonging to the currently selected container to the given
 * {@link ContainerInformationPanel}
 *
 * @param containerInformationPanel The information panel showing the details for the currently selected container
 */
private void updateEngineSettings(final ContainerInformationPanel containerInformationPanel) {
    final ObservableMap<String, List<EngineSetting>> engineSettings = getControl().getEngineSettings();
    final ContainerDTO container = containerInformationPanel.getContainer();

    if (container != null && engineSettings.containsKey(container.getEngine().toLowerCase())) {
        containerInformationPanel.getEngineSettings()
                .setAll(engineSettings.get(container.getEngine().toLowerCase()));
    } else {
        containerInformationPanel.getEngineSettings().clear();
    }
}
 
Example 3
Source File: ContainersFeaturePanelSkin.java    From phoenicis with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Applies the verbs belonging to the currently selected container to the given {@link ContainerInformationPanel}
 *
 * @param containerInformationPanel The information panel showing the details for the currently selected container
 */
private void updateVerbs(final ContainerInformationPanel containerInformationPanel) {
    final ObservableMap<String, ApplicationDTO> verbs = getControl().getVerbs();
    final ContainerDTO container = containerInformationPanel.getContainer();

    if (container != null && verbs.containsKey(container.getEngine().toLowerCase())) {
        containerInformationPanel.setVerbs(verbs.get(container.getEngine().toLowerCase()));
    } else {
        containerInformationPanel.setVerbs(null);
    }
}
 
Example 4
Source File: ContainersFeaturePanelSkin.java    From phoenicis with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Applies the engine tools belonging to the currently selected container to the given
 * {@link ContainerInformationPanel}
 *
 * @param containerInformationPanel The information panel showing the details for the currently selected container
 */
private void updateEngineTools(final ContainerInformationPanel containerInformationPanel) {
    final ObservableMap<String, ApplicationDTO> engineTools = getControl().getEngineTools();
    final ContainerDTO container = containerInformationPanel.getContainer();

    if (container != null && engineTools.containsKey(container.getEngine().toLowerCase())) {
        containerInformationPanel.setEngineTools(engineTools.get(container.getEngine().toLowerCase()));
    } else {
        containerInformationPanel.setEngineTools(null);
    }
}