@Override public void putAll(Map<? extends K, ? extends V> m) { getDelegate().putAll(m); }
public static void injectPane(Parent parent, Parent injectedParent, boolean useReflection) { if (parent == null) { throw new IllegalArgumentException("parent can not be null"); //$NON-NLS-1$ } List<Node> ownerParentChildren = getChildren(parent.getParent(), useReflection); // we've got the children list, now we need to insert a temporary // layout container holding our dialogs and opaque layer / effect // in place of the owner (the owner will become a child of the dialog // stack) int ownerPos = ownerParentChildren.indexOf(parent); ownerParentChildren.remove(ownerPos); ownerParentChildren.add(ownerPos, injectedParent); // now we install the parent as a child of the injectedParent getChildren(injectedParent, useReflection).add(0, parent); // copy in layout properties, etc, so that the dialogStack displays // properly in (hopefully) whatever layout the owner node is in injectedParent.getProperties().putAll(parent.getProperties()); }
public static void injectAsRootPane(Scene scene, Parent injectedParent, boolean useReflection) { Parent originalParent = scene.getRoot(); scene.setRoot(injectedParent); if (originalParent != null) { getChildren(injectedParent, useReflection).add(0, originalParent); // copy in layout properties, etc, so that the dialogStack displays // properly in (hopefully) whatever layout the owner node is in injectedParent.getProperties().putAll(originalParent.getProperties()); } }
@Override public void onChanged(MapChangeListener.Change<?, ?> change) { T btn = btnWeakReference.get(); if (btn == null) { action.getProperties().removeListener(this); } else { btn.getProperties().clear(); btn.getProperties().putAll(action.getProperties()); } }
@Override public void onChanged(MapChangeListener.Change<?, ?> change) { T menuItem = menuItemWeakReference.get(); if (menuItem == null) { action.getProperties().removeListener(this); } else { menuItem.getProperties().clear(); menuItem.getProperties().putAll(action.getProperties()); } }
/** * Updates the shortcut of this {@link LibraryDetailsPanelSkin} instance */ private void updateShortcut() { final ShortcutDTO shortcut = getControl().getShortcut(); if (shortcut != null) { title.setValue(shortcut.getInfo().getName()); description.setValue(shortcut.getInfo().getDescription()); try { final Map<String, Object> shortcutProperties = getControl().getObjectMapper() .readValue(shortcut.getScript(), new TypeReference<Map<String, Object>>() { // nothing }); this.shortcutProperties.clear(); this.shortcutProperties.putAll(shortcutProperties); } catch (IOException e) { LOGGER.error("An error occurred during a shortcut update", e); } } }
/** * Updates the shortcut of this {@link LibraryDetailsPanelSkin} instance */ private void updateShortcut() { final ShortcutDTO shortcut = getControl().getShortcut(); if (shortcut != null) { title.setValue(shortcut.getInfo().getName()); description.setValue(shortcut.getInfo().getDescription()); try { final Map<String, Object> shortcutProperties = getControl().getObjectMapper() .readValue(shortcut.getScript(), new TypeReference<Map<String, Object>>() { // nothing }); this.shortcutProperties.clear(); this.shortcutProperties.putAll(shortcutProperties); } catch (IOException e) { LOGGER.error("An error occurred during a shortcut update", e); } } }
/** * Updates the {@link Engine} and {@link EngineDTO} of this {@link EngineDetailsPanelSkin} instance */ private void updateEngine() { final EngineDTO engine = getControl().getEngineDTO(); if (engine != null) { title.setValue(engine.getCategory() + " " + engine.getSubCategory()); engineVersionName.setValue(engine.getVersion()); engineUserData.clear(); engineUserData.putAll(engine.getUserData()); } } }
menuItem.getProperties().putAll(action.getProperties()); action.getProperties().addListener(new MenuItemPropertiesMapChangeListener<>(menuItem, action));
btn.getProperties().putAll(action.getProperties()); action.getProperties().addListener(new ButtonPropertiesMapChangeListener<>(btn, action));
Pane parent = (Pane) original.getParent(); replacement.getProperties().putAll( original.getProperties() ); original.getProperties().clear();