|
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-2003 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.xml.tree.nodes; import java.io.*; import java.awt.*; import java.util.*; import java.beans.*; import org.openide.ErrorManager; import org.openide.loaders.*; import org.openide.explorer.propertysheet.editors.*; import org.openide.actions.*; import org.openide.util.actions.*; import org.openide.nodes.*; import org.netbeans.tax.*; import org.netbeans.tax.io.*; import org.netbeans.modules.xml.core.*; import org.netbeans.modules.xml.tree.children.*; import org.netbeans.modules.xml.tree.settings.*; import org.netbeans.modules.xml.tree.nodes.*; /** * * @author Libor Kramolis * @version 0.1 */ public class DTDDataNode extends AbstractDataNode { /** */ private static final String DTD_SET = "dtd"; // NOI18N /** */ private static final Class[] GROUP_TYPES = new Class[] { TreeElementDecl.class, TreeAttlistDecl.class, TreeEntityDecl.class, TreeNotationDecl.class, }; // // init // /** Default constructor, constructs node */ public DTDDataNode (DTDDataObject dataObject) { super (dataObject); setDefaultAction (SystemAction.get (EditAction.class)); setIconBase ("org/netbeans/modules/xml/core/resources/dtdObject"); // NOI18N } // // itself // /** */ public final DTDDataObject getDTDDataObject () { return (DTDDataObject)getDataObject(); } /** */ public final TreeDTD getTreeDTD () { return (TreeDTD)getTreeObject(); } // // from AbstractDataNode // /** */ protected final AbstractRootNode createRootNode (TreeDocumentRoot documentRoot) { try { return new DTDNode ((TreeDTD)documentRoot); } catch (Exception exc) { return null; } } /** */ protected final String getNodeDescription () { return (Util.THIS.getString ("PROP_DTDNode_description")); } // // Sheet // /** Creates new XML sheet set from TreeDocumentRoot properties. */ protected final Sheet.Set createXMLSheetSet () { Sheet.Set dtdSet = super.createXMLSheetSet(); dtdSet.setName (DTD_SET); dtdSet.setDisplayName (Util.THIS.getString ("PROP_dtdSetName")); dtdSet.setShortDescription (Util.THIS.getString ("HINT_dtdSetName")); return dtdSet; } // // class DataNodeCreatorImpl // /** * */ public static class DataNodeCreatorImpl implements DTDDataObject.DataNodeCreator { /** */ public DataNode createDataNode (DTDDataObject dtdDO) { if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug ("--> DTDDataNode::DataNodeCreatorImpl.createDataNode: dtdDO = " + dtdDO); // NOI18N return new DTDDataNode (dtdDO); } } // end of class DataNodeCreatorImpl } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 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.