本文整理了Java中org.openide.nodes.Node.assignTo()
方法的一些代码示例,展示了Node.assignTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.assignTo()
方法的具体详情如下:
包路径:org.openide.nodes.Node
类名称:Node
方法名:assignTo
[英]Method that allows Children to change the parent children of the node when the node is add to a children.
[中]
代码示例来源:origin: org.netbeans.api/org-openide-nodes
public void useNodes(Collection<Node> nodes) {
// forces creation of the array
ChildrenArray arr = getArray(null);
arr.useNodes(this, nodes);
// assign all there nodes the new children
for (Node n : nodes) {
n.assignTo(EntrySupportDefault.this.children, -1);
n.fireParentNodeChange(null, children.parent);
}
}
代码示例来源:origin: org.netbeans.api/org-openide-nodes
/** Notifies that a set of nodes has been add to
* children. It is necessary that the system is already
* in consistent state, so any callbacks will return
* valid values.
*
* @param nodes list of removed nodes
*/
void notifyAdd(Collection<Node> nodes) {
if (LOGGER.isLoggable(Level.FINER)) {
LOGGER.finer("notifyAdd: " + nodes);
}
// notify about parent change
for (Node n : nodes) {
n.assignTo(children, -1);
n.fireParentNodeChange(null, children.parent);
}
Node[] arr = nodes.toArray(new Node[nodes.size()]);
Node n = children.parent;
if (n != null && children.getEntrySupport() == this) {
n.fireSubNodesChange(true, arr, null);
}
}
代码示例来源:origin: org.netbeans.api/org-openide-nodes
n.assignTo(children, i);
n.fireParentNodeChange(null, children.parent);
代码示例来源:origin: org.netbeans.api/org-openide-nodes
node.assignTo(ch, -1);
node.fireParentNodeChange(null, ch.parent);
return node;
代码示例来源:origin: org.netbeans.api/org-openide-nodes
/** This method can be called by subclasses that
* directly modify the nodes collection to update the
* state of the nodes appropriatelly.
* This method should be called under
* MUTEX.writeAccess.
*/
final void refreshImpl() {
if (isInitialized()) {
Array.this.entrySupport().refreshEntry(getNodesEntry());
entrySupport().getNodes(false);
} else if (nodes != null) {
for (Node n : nodes) {
n.assignTo(this, -1);
}
}
}
代码示例来源:origin: org.netbeans.api/org-openide-nodes
node.assignTo(Children.this, i);
node.fireParentNodeChange(null, parent);
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
public void useNodes (Collection nodes) {
// forces creation of the array
ChildrenArray arr = getArray (null);
arr.useNodes (this, nodes);
// assign all there nodes the new children
Iterator it = nodes.iterator ();
while (it.hasNext ()) {
Node n = (Node)it.next ();
n.assignTo (Children.this, -1);
n.fireParentNodeChange (null, parent);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
public void useNodes (Collection nodes) {
// forces creation of the array
ChildrenArray arr = getArray (null);
arr.useNodes (this, nodes);
// assign all there nodes the new children
Iterator it = nodes.iterator ();
while (it.hasNext ()) {
Node n = (Node)it.next ();
n.assignTo (Children.this, -1);
n.fireParentNodeChange (null, parent);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Notifies that a set of nodes has been add to
* children. It is necessary that the system is already
* in consistent state, so any callbacks will return
* valid values.
*
* @param nodes list of removed nodes
*/
private void notifyAdd (Collection nodes) {
// notify about parent change
Iterator it = nodes.iterator ();
while (it.hasNext ()) {
Node n = (Node)it.next ();
n.assignTo (this, -1);
n.fireParentNodeChange (null, parent);
}
Node[] arr = (Node[])nodes.toArray (new Node[nodes.size ()]);
Node n = parent;
if (n != null) {
n.fireSubNodesChange (
true, arr, null
);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Notifies that a set of nodes has been add to
* children. It is necessary that the system is already
* in consistent state, so any callbacks will return
* valid values.
*
* @param nodes list of removed nodes
*/
private void notifyAdd (Collection nodes) {
// notify about parent change
Iterator it = nodes.iterator ();
while (it.hasNext ()) {
Node n = (Node)it.next ();
n.assignTo (this, -1);
n.fireParentNodeChange (null, parent);
}
Node[] arr = (Node[])nodes.toArray (new Node[nodes.size ()]);
Node n = parent;
if (n != null) {
n.fireSubNodesChange (
true, arr, null
);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Computes the nodes now.
*/
final Node[] justComputeNodes () {
if (map == null) {
map = new HashMap (17);
// debug.append ("Map initialized\n"); // NOI18N
// printStackTrace();
}
LinkedList l = new LinkedList ();
Iterator it = entries.iterator ();
while (it.hasNext ()) {
Entry entry = (Entry)it.next ();
Info info = findInfo (entry);
try {
l.addAll (info.nodes ());
} catch (RuntimeException ex) {
NodeOp.warning (ex);
}
}
Node[] arr = (Node[])l.toArray (new Node[l.size ()]);
// initialize parent nodes
for (int i = 0; i < arr.length; i++) {
Node n = arr[i];
n.assignTo (this, i);
n.fireParentNodeChange (null, parent);
}
return arr;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Computes the nodes now.
*/
final Node[] justComputeNodes () {
if (map == null) {
map = new HashMap (17);
// debug.append ("Map initialized\n"); // NOI18N
// printStackTrace();
}
LinkedList l = new LinkedList ();
Iterator it = entries.iterator ();
while (it.hasNext ()) {
Entry entry = (Entry)it.next ();
Info info = findInfo (entry);
try {
l.addAll (info.nodes ());
} catch (RuntimeException ex) {
NodeOp.warning (ex);
}
}
Node[] arr = (Node[])l.toArray (new Node[l.size ()]);
// initialize parent nodes
for (int i = 0; i < arr.length; i++) {
Node n = arr[i];
n.assignTo (this, i);
n.fireParentNodeChange (null, parent);
}
return arr;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** This method can be called by subclasses that
* directly modify the nodes collection to update the
* state of the nodes appropriatelly.
* This method should be called under
* MUTEX.writeAccess.
*/
final void refreshImpl () {
if ( isInitialized() ) {
Array.this.refreshEntry (getNodesEntry ());
super.getArray (null).nodes ();
}
else if ( nodes != null ) {
for( Iterator it = nodes.iterator(); it.hasNext(); ) {
Node n = (Node)it.next();
n.assignTo( this, -1 );
}
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** This method can be called by subclasses that
* directly modify the nodes collection to update the
* state of the nodes appropriatelly.
* This method should be called under
* MUTEX.writeAccess.
*/
final void refreshImpl () {
if ( isInitialized() ) {
Array.this.refreshEntry (getNodesEntry ());
super.getArray (null).nodes ();
}
else if ( nodes != null ) {
for( Iterator it = nodes.iterator(); it.hasNext(); ) {
Node n = (Node)it.next();
n.assignTo( this, -1 );
}
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
node.assignTo (Children.this, i);
node.fireParentNodeChange (null, parent);
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
node.assignTo (Children.this, i);
node.fireParentNodeChange (null, parent);
内容来源于网络,如有侵权,请联系作者删除!