|
What this is
Other links
The source code
/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans, Community Edition. The Initial
* Developer of the Original Code is Sun Microsystems, Inc. Portions
* Copyright 1997-2003 Sun Microsystems, Inc. All Rights Reserved.
*/
package org.netbeans.api.nodes2looks;
import org.netbeans.spi.looks.Look;
import org.netbeans.spi.looks.LookSelector;
import org.openide.nodes.Node;
/**
* Interoperability of nodes and looks.
*/
public final class Nodes {
private static final Look NODE_LOOK = new NodeProxyLook( "NodeProxyLook" );
private Nodes() {}
/** Creates a new node representing an object using a look.
* @see org.netbeans.spi.looks.Selectors#defaultTypes
* @param representedObject the object which the node will represent
*/
public static Node node( Object representedObject ) {
return node (representedObject, null, null );
}
/** Creates new LookNode.
* @see Look#attachTo(Object)
* @param representedObject The object which the node will represent.
* @param look Explicit look which will be set on the node.
*/
public static Node node (Object representedObject, Look look ) {
return node ( representedObject, look, null );
}
/** Creates new LookNode.
* @see Look#attachTo(Object)
* @param representedObject The object which the node will represent.
* @param look Explicit look which will be set on the node. If null
* first look from the lookSelector which accepts the represented
* object will be used for this node.
* @param lookSelector LookSelector for this node.
*/
public static Node node (Object representedObject, Look look, LookSelector lookSelector ) {
return node ( representedObject, look, lookSelector, null );
}
/** Creates new LookNode.
* @see Look#attachTo(Object)
* @param representedObject The object which the node will represent.
* @param look Explicit look which will be set on the node. If null
* first look from the lookSelector which accepts the represented
* object will be used for this node.
* @param lookSelector LookSelector for this node.
* @param handle Node.Handle which will take care of the persistence.
*/
public static Node node(Object representedObject, Look look, LookSelector lookSelector, Node.Handle handle ) {
return new LookNode(
representedObject,
look,
lookSelector,
handle
);
}
/** Look that works with {@link Node}. If the represented object
* is
|
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.