001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019: package org.netbeans.modules.xslt.project.nodes;
020:
021: import java.awt.Image;
022: import javax.swing.Action;
023: import org.openide.loaders.DataObject;
024: import org.openide.nodes.FilterNode;
025: import org.openide.util.NbBundle;
026: import org.openide.util.Utilities;
027:
028: /**
029: *
030: * @author Vitaly Bychkov
031: * @version 1.0
032: */
033: public class XsltTransformationsNode extends FilterNode {
034:
035: private static Image ICON = Utilities
036: .loadImage("org/netbeans/modules/xslt/project/resources/transformations.gif");
037:
038: public XsltTransformationsNode(DataObject dObj) {
039: super (dObj.getNodeDelegate());
040: // disableDelegation(DELEGATE_GET_DISPLAY_NAME|
041: // DELEGATE_SET_DISPLAY_NAME|DELEGATE_GET_SHORT_DESCRIPTION|
042: // DELEGATE_GET_ACTIONS);
043: disableDelegation(DELEGATE_GET_DISPLAY_NAME
044: | DELEGATE_SET_DISPLAY_NAME
045: | DELEGATE_GET_SHORT_DESCRIPTION);
046: }
047:
048: public XsltTransformationsNode(DataObject dObj,
049: org.openide.nodes.Children children) {
050: super (dObj.getNodeDelegate(), children);
051: // disableDelegation(DELEGATE_GET_DISPLAY_NAME|
052: // DELEGATE_SET_DISPLAY_NAME|DELEGATE_GET_SHORT_DESCRIPTION|
053: // DELEGATE_GET_ACTIONS);
054: // disableDelegation(DELEGATE_GET_DISPLAY_NAME|
055: // DELEGATE_SET_DISPLAY_NAME|DELEGATE_GET_SHORT_DESCRIPTION);
056:
057: // disableDelegation(DELEGATE_GET_DISPLAY_NAME|
058: // DELEGATE_SET_DISPLAY_NAME|DELEGATE_GET_SHORT_DESCRIPTION);
059:
060: }
061:
062: // TODO m | r
063: public PropertySet[] getPropertySets() {
064: return new PropertySet[0];
065: }
066:
067: // public String getDisplayName() {
068: // return NbBundle.getMessage(XsltTransformationsNode.class, "LBL_Transformations");
069: // }
070:
071: // public Image getIcon(int type) {
072: // return ICON;
073: // }
074: //
075: // public Image getOpenedIcon(int type) {
076: // return ICON;
077: // }
078: //
079: public boolean canCopy() {
080: return false;
081: }
082:
083: public boolean canCut() {
084: return false;
085: }
086:
087: public boolean canDestroy() {
088: return false;
089: }
090:
091: public boolean canRename() {
092: return false;
093: }
094:
095: // @Override
096: // public Action[] getActions(boolean context) {
097: // return new Action[] {
098: // org.openide.util.actions.SystemAction.get( org.openide.actions.EditAction.class ),
099: //// CommonProjectActions.newFileAction(),
100: //// null,
101: //// org.openide.util.actions.SystemAction.get( org.openide.actions.FileSystemAction.class ),
102: //// null,
103: //// org.openide.util.actions.SystemAction.get( org.openide.actions.FindAction.class ),
104: //// null,
105: //// org.openide.util.actions.SystemAction.get( org.openide.actions.PasteAction.class ),
106: //// null,
107: //// org.openide.util.actions.SystemAction.get( org.openide.actions.ToolsAction.class ),
108: // };
109: // }
110: }
|