本文整理了Java中org.openide.nodes.Node.getValue()
方法的一些代码示例,展示了Node.getValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getValue()
方法的具体详情如下:
包路径:org.openide.nodes.Node
类名称:Node
方法名:getValue
暂无
代码示例来源:origin: org.netbeans.api/org-openide-nodes
@Override
public Object getValue(String attributeName) {
if (delegating(DELEGATE_GET_VALUE)) {
return original.getValue(attributeName);
} else {
return super.getValue(attributeName);
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject
protected final Project getProject(Node[] activatedNodes) {
if (activatedNodes.length != 1) {
return null;
}
Object project = activatedNodes[0].getValue("Project"); // NOI18N
if (project == null || (!(project instanceof Project))) {
return null;
}
return (Project)project;
}
代码示例来源:origin: stackoverflow.com
public void updateNode(int value) {
if (value != this.value) {
this.value = value;
if (getParent() != null) {
int sum = 0;
for (Node n : getParent().getChildren()) {
sum += n.getValue();
}
getParent.updateNode(sum);
}
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
public Object getValue(String attributeName) {
if (delegating (DELEGATE_GET_VALUE)) {
return original.getValue (attributeName);
} else {
return super.getValue (attributeName);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
public Object getValue(String attributeName) {
if (delegating (DELEGATE_GET_VALUE)) {
return original.getValue (attributeName);
} else {
return super.getValue (attributeName);
}
}
代码示例来源:origin: stackoverflow.com
private List<string> getSlidesFromDocument(Document doc)
{
NodeList nodeList = doc.getElementsByTagName("urlslide");
List<String> slides = new ArrayList<String>();
for(Node node : nodelist) slides.add(node.getValue());
return slides;
}
代码示例来源:origin: stackoverflow.com
PriorityQueue<Node> queue = new PriorityQueue<Node>(10, new Comparator<Node>() {
public int compare(Node left, Node right) {
return left.getValue() - other.getValue();
}
});
代码示例来源:origin: stackoverflow.com
List<Node> nodes = new DOMXPath("//p").selectNodes(document);
for (Node node : nodes) {
// do something with the matched nodes
node.getValue();
}
代码示例来源:origin: stackoverflow.com
public int get(int index) throws IndexOutOfBoundsException {
if (index < 0 || index > length) {
throw new IndexOutOfBoundsException();
} else {
Node cursor = head;
for (int i = 0; i < index; i++) {
cursor = cursor.getNext();
}
return cursor.getValue();
}
}
代码示例来源:origin: stackoverflow.com
public void recursionMethodTwo(Node n) {
if (n == null) {
// Standard way to exit a void function without executing remaing code
// note that return null; doesn't compile
return;
}
System.out.println(n.getValue());
recursionMethodTwo(n.next());
}
代码示例来源:origin: stackoverflow.com
public static List traversePreRecursive(Node node) {
if (node == null) return new ArrayList();
List nodeValues = new ArrayList();
nodeValues.add(node.getValue());
nodeValues.addAll(traversePreRecursive(node.getLeft()));
nodeValues.addAll(traversePreRecursive(node.getRight()));
return nodeValues;
}
代码示例来源:origin: stackoverflow.com
Leaf b1 = new Leaf(5);
Leaf b2 = new Leaf(5);
Node b = new Node(b1, b2);
Leaf c1 = new Leaf(3);
Leaf c2 = new Leaf(7);
Node c = new Node(c1, c2);
Node a = new Node(b, c);
System.out.println("a value = " + a.getValue());
代码示例来源:origin: stackoverflow.com
Node previous = null;
Node current = first;
while (current != null && current.getValue() != searchedValue) {
previous = current;
current = current.getNext();
}
previous.setNext(newNode);
newNode.setNext(current);
代码示例来源:origin: stackoverflow.com
void traverse(Node root, String path) {
path += root.getValue();
for (Node child : root.getChildren())
traverse(child, path);
// end of current traversal
if (root.getChildren().isEmpty())
System.out.print(path + " ");
}
代码示例来源:origin: stackoverflow.com
private static List<Integer> extractValues(Node n) {
List<Integer> result = new ArrayList<>();
if (n.getLeft() != null) {
result.addAll(extractValues(n.getLeft()));
}
if (n.getRight() != null) {
result.addAll(extractValues(n.getRight()));
}
result.add(n.getValue());
return result;
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
public void run() {
//the following must run in EDT to avoid deadlocks, see #91371
if (isDescriptionVisible() &&
(Node.PROP_DISPLAY_NAME.equals(nm) || Node.PROP_SHORT_DESCRIPTION.equals(nm))) {
//XXX SHOULD NOT BE FIRED TO NODELISTENERS
Node n = (Node) evt.getSource();
if (currNode == n) {
String description = (String) n.getValue("nodeDescription"); //NOI18N
psheet.setDescription(n.getDisplayName(), (description == null) ? n.getShortDescription() : description);
table.setBeanName(n.getDisplayName());
}
}
}
};
代码示例来源:origin: org.codehaus.mevenide/nb-project
void store(WizardDescriptor d) {
if (manager.getSelectedNodes().length > 0) {
d.putProperty(PROP_ARCHETYPE, manager.getSelectedNodes()[0].getValue(PROP_ARCHETYPE));
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject
private static Node findItemNode(Node root, Item item) {
Node parentNode = findFolderNode(root, item.getFolder());
if (parentNode != null) {
Node[] nodes = parentNode.getChildren().getNodes(true);
for (int i = 0; i < nodes.length; i++) {
if (nodes[i].getValue("Item") == item) { // NOI18N
return nodes[i];
}
}
}
return null;
}
代码示例来源:origin: stackoverflow.com
private static int extractValues(Node n, int[] results, int index) {
if (n.getLeft() != null) {
index = extractValues(n.getLeft(), results, index);
}
if (n.getRight() != null) {
index = extractValues(n.getRight(), results, index);
}
results[index] = n.getValue();
return index + 1;
}
代码示例来源:origin: stackoverflow.com
public boolean contains(Node node, Integer value) {
if(node != null && node.hasValue())
if(value == node.getValue())
return true;
boolean found = false
if(node.hasLeft())
found = contains(node.getLeft(), value);
if(!found && node.hasRight())
found = contains(node.getRight(), value);
return found;
}
内容来源于网络,如有侵权,请联系作者删除!