|
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. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.netbeans.modules.struts;
import org.openide.loaders.*;
import org.openide.nodes.*;
import org.openide.util.NbBundle;
import org.netbeans.modules.struts.nodes.ElementChildren;
// JDOM
import org.jdom.Document;
/** A node to represent this object.
*
* @author mk115033
*/
public class StrutsConfigDataNode extends DataNode implements Node.Cookie{
Document nodeStructure;
public StrutsConfigDataNode(StrutsConfigDataObject obj,Document nodeStructure, Document jdomDocument) {
this(obj, new ElementChildren(obj,nodeStructure.getRootElement(),
(jdomDocument==null?null:jdomDocument.getRootElement()),
obj.getNodeStructureBundle()));
getCookieSet().add(this);
}
public StrutsConfigDataNode(StrutsConfigDataObject obj, Children ch) {
super(obj, ch);
setIconBase("org/netbeans/modules/struts/resources/StrutsConfigIcon");
}
protected StrutsConfigDataObject getStrutsConfigDataObject() {
return (StrutsConfigDataObject) getDataObject();
}
/* Example of adding Executor / Debugger / Arguments to node:
protected Sheet createSheet () {
Sheet sheet = super.createSheet ();
Sheet.Set set = sheet.get (ExecSupport.PROP_EXECUTION);
if (set == null) {
set = new Sheet.Set ();
set.setName (ExecSupport.PROP_EXECUTION);
set.setDisplayName (NbBundle.getMessage (StrutsConfigDataNode.class, "LBL_DataNode_exec_sheet"));
set.setShortDescription (NbBundle.getMessage (StrutsConfigDataNode.class, "HINT_DataNode_exec_sheet"));
}
((ExecSupport) getCookie (ExecSupport.class)).addProperties (set);
// Maybe:
((CompilerSupport) getCookie (CompilerSupport.class)).addProperties (set);
sheet.put (set);
return sheet;
}
*/
/*
public SystemAction getDefaultAction () {
return SystemAction.get (MyFavoriteAction.class);
}
*/
}
|
| ... 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.