本文整理了Java中javafx.scene.Node.getProperties()
方法的一些代码示例,展示了Node.getProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getProperties()
方法的具体详情如下:
包路径:javafx.scene.Node
类名称:Node
方法名:getProperties
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
private static Object getConstraint(Node node, Object key) {
if (node.hasProperties()) {
Object value = node.getProperties().get(key);
if (value != null) {
return value;
}
}
return null;
}
代码示例来源:origin: jfoenixadmin/JFoenix
private static void setConstraint(Node node, Object key, Object value) {
if (value == null) {
node.getProperties().remove(key);
} else {
node.getProperties().put(key, value);
}
if (node.getParent() != null) {
node.getParent().requestLayout();
}
}
代码示例来源:origin: org.fxmisc.wellbehaved/wellbehavedfx
private static ObservableMap<Object, Object> getProperties(Node node) {
return node.getProperties();
}
}
代码示例来源:origin: com.miglayout/miglayout-javafx
/** called from the subnodes in FXML via MigPane.cc="..." */
public static void setCc(Node node, CC cc)
{
node.getProperties().put(FXML_CC_KEY, cc);
}
代码示例来源:origin: org.codehaus.griffon/griffon-javafx
/**
* Finds out if an {@code Action} has been registered with the target {@code Node}, returning the action id if found.
*
* @param node the target node on which the action may have been registered.
*
* @return the name of the action registered with the target {@code Node} or {@code null} if not found.
*
* @since 2.8.0
*/
@Nullable
public static String getGriffonActionId(@Nonnull Node node) {
requireNonNull(node, ERROR_NODE_NULL);
return (String) node.getProperties().get(Action.class.getName());
}
代码示例来源:origin: org.codehaus.griffon/griffon-javafx
/**
* Associates a {@code Action} with a target {@code Node}.
*
* @param node the target node on which the action will be registered.
* @param actionId the id of the action to be registered.
*
* @since 2.8.0
*/
public static void setGriffonActionId(@Nonnull Node node, @Nonnull String actionId) {
requireNonNull(node, ERROR_NODE_NULL);
requireNonBlank(actionId, ERROR_ID_BLANK);
node.getProperties().put(Action.class.getName(), actionId);
}
代码示例来源:origin: org.controlsfx/controlsfx
/***************************************************************************
* *
* Implementation *
* *
**************************************************************************/
private static final ObservableList<Decoration> getDecorations(Node target, boolean createIfAbsent) {
@SuppressWarnings("unchecked")
ObservableList<Decoration> decorations = (ObservableList<Decoration>) target.getProperties().get(DECORATIONS_PROPERTY_KEY);
if (decorations == null && createIfAbsent) {
decorations = FXCollections.observableArrayList();
target.getProperties().put(DECORATIONS_PROPERTY_KEY, decorations);
}
return decorations;
}
代码示例来源:origin: com.jfoenix/jfoenix
private static Object getConstraint(Node node, Object key) {
if (node.hasProperties()) {
Object value = node.getProperties().get(key);
if (value != null) {
return value;
}
}
return null;
}
代码示例来源:origin: com.jfoenix/jfoenix
private static void setConstraint(Node node, Object key, Object value) {
if (value == null) {
node.getProperties().remove(key);
} else {
node.getProperties().put(key, value);
}
if (node.getParent() != null) {
node.getParent().requestLayout();
}
}
代码示例来源:origin: com.guigarage/responsivefx
private static void updateManagedProperty(Node n, DeviceType type) {
// first time we've set this invisible => store the preset
if (!n.getProperties().containsKey(PROP_MANAGED_STATE)) {
n.getProperties().put(PROP_MANAGED_STATE, n.isManaged());
}
// don't track changes through this
n.managedProperty().removeListener(MANAGED_LISTENER);
// If it's visible we use the stored value for "managed" property
n.setManaged(n.isVisible() ? (Boolean) n.getProperties().get(PROP_MANAGED_STATE) : false);
// need to track changes through API
n.managedProperty().addListener(MANAGED_LISTENER);
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.panes
/**
* Access the current constraint value
*
* @param node
* the node
* @param key
* the key
* @return the value if associated
*/
protected static @Nullable Object getConstraint(@NonNull Node node, @NonNull Object key) {
if (node.hasProperties()) {
Object value = node.getProperties().get(key);
if (value != null) {
return value;
}
}
return null;
}
代码示例来源:origin: eu.mihosoft.vrl.workflow/vworkflows-fx
Class<?> connectorShapeClass = (Class<?>) n.getProperties().get(ConnectorShape.CONNECTOR_SHAPE_CLASS);
if (nodeClass.isAssignableFrom(result.getClass())) {
return result;
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.panes
/**
* Remember a layout constraint
*
* @param node
* the node
* @param key
* the constraint key
* @param value
* the value
*/
protected static void setConstraint(@NonNull Node node, @NonNull Object key, @Nullable Object value) {
if (value == null) {
node.getProperties().remove(key);
} else {
node.getProperties().put(key, value);
}
if (node.getParent() != null) {
node.getParent().requestLayout();
}
}
代码示例来源:origin: org.eclipse.fx/org.eclipse.fx.ui.panes
/**
* Access the current constraint value
*
* @param node
* the node
* @param key
* the key
* @return the value if associated
*/
protected static @Nullable Object getConstraint(@NonNull Node node, @NonNull Object key) {
if (node.hasProperties()) {
Object value = node.getProperties().get(key);
if (value != null) {
return value;
}
}
return null;
}
代码示例来源:origin: org.controlsfx/controlsfx
/**
* Removes all the decorations that have previously been set on the given node.
* @param target The node from which all previously set decorations should be removed.
*/
public static final void removeAllDecorations(Node target) {
List<Decoration> decorations = getDecorations(target, true);
List<Decoration> removed = FXCollections.observableArrayList(decorations);
target.getProperties().remove(DECORATIONS_PROPERTY_KEY);
updateDecorationsOnNode(target, null, removed);
}
代码示例来源:origin: org.eclipse.fx/org.eclipse.fx.ui.panes
/**
* Remember a layout constraint
*
* @param node
* the node
* @param key
* the constraint key
* @param value
* the value
*/
protected static void setConstraint(@NonNull Node node, @NonNull Object key, @Nullable Object value) {
if (value == null) {
node.getProperties().remove(key);
} else {
node.getProperties().put(key, value);
}
if (node.getParent() != null) {
node.getParent().requestLayout();
}
}
代码示例来源:origin: no.tornado/tornadofx-controls
private void configureMnemonicTarget( Node target ){
if( target.getProperties().containsKey("mnemonicTarget") ){
getLabel().setMnemonicParsing(true);
getLabel().setLabelFor(target);
}
}
代码示例来源:origin: no.tornado/tornadofx-controls
public static void setMnemonicTarget( Node target ){
Field parent = NodeHelper.findParentOfType( target, Field.class);
if( parent != null ){
parent.getLabel().setMnemonicParsing(true);
parent.getLabel().setLabelFor(target);
} else {
// we will detect this when this target is added as an input
target.getProperties().put("mnemonicTarget",Boolean.TRUE);
}
}
代码示例来源:origin: org.gillius/jfxutils
Pane parent = (Pane) original.getParent();
replacement.getProperties().putAll( original.getProperties() );
original.getProperties().clear();
代码示例来源:origin: com.miglayout/miglayout-javafx
CC cc = (CC) node.getProperties().remove(FXML_CC_KEY);
FXComponentWrapper wrapper = new FXComponentWrapper(node);
内容来源于网络,如有侵权,请联系作者删除!