visit(XSSchemaSet)
function on your schema set.getModel(). SchemaTreeTraverser.SchemaTreeNode ,
and the model itself is SchemaTreeTraverser.SchemaTreeModel . You can
use SchemaTreeTraverser.SchemaTreeCellRenderer as a cell renderer for
your tree.
| Modifier and Type | Class and Description |
|---|---|
| public static class | SchemaTreeTraverser.
The root node of the schema hierarchy tree. |
| public static class | SchemaTreeTraverser.
Sample cell renderer for the schema tree. |
| public static class | SchemaTreeTraverser.
Tree model for schema hierarchy tree. |
| public static class | SchemaTreeTraverser.
The node of the schema hierarchy tree. |
| Modifier and Type | Field and Description |
|---|---|
| private SchemaTreeTraverser. | currNode
The current node in the tree. |
| private SchemaTreeTraverser. | model
The associated tree model. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| private void | dump(XSAttributeDecl
Attribute declaration. decl, String Additional attributes. additionalAtts)Creates node for attribute declaration with additional attributes. |
| private void | |
| public void | dumpRef(XSAttGroupDecl
Attribute group decalration reference. decl)Creates node of attribute group decalration reference. |
| public void | |
| private void | elementDecl(XSElementDecl
Element declaration. decl, String Additional attributes. extraAtts)Creates node for element declaration with additional attributes. |
| public void | |
| public void | |
| public SchemaTreeTraverser. | |
| public void | |
| public void | |
| public void | |
| private void | modelGroup(XSModelGroup
Model group. group, String Additional attributes. extraAtts)Creates node for model group with additional attributes. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| private void | wildcard(XSWildcard
Wild card. wc, String Additional attributes. extraAtts)Creates node for wild card with additional attributes. |
| public void |
| currNode | back to summary |
|---|---|
| private SchemaTreeTraverser. The current node in the tree. | |
| model | back to summary |
|---|---|
| private SchemaTreeTraverser. The associated tree model. | |
| SchemaTreeTraverser | back to summary |
|---|---|
| public SchemaTreeTraverser() Simple constructor. | |
| annotation | back to summary |
|---|---|
| public void annotation(XSAnnotation ann) Implements com. | |
| attGroupDecl | back to summary |
|---|---|
| public void attGroupDecl(XSAttGroupDecl decl) Implements com. | |
| attributeDecl | back to summary |
|---|---|
| public void attributeDecl(XSAttributeDecl decl) Implements com. | |
| attributeUse | back to summary |
|---|---|
| public void attributeUse(XSAttributeUse use) Implements com. | |
| complexType | back to summary |
|---|---|
| public void complexType(XSComplexType type) Implements com. | |
| dump | back to summary |
|---|---|
| private void dump(XSAttributeDecl decl, String additionalAtts) Creates node for attribute declaration with additional attributes.
| |
| dumpComplexTypeAttribute | back to summary |
|---|---|
| private void dumpComplexTypeAttribute(XSComplexType type) Creates node for complex type.
| |
| dumpRef | back to summary |
|---|---|
| public void dumpRef(XSAttGroupDecl decl) Creates node of attribute group decalration reference.
| |
| elementDecl | back to summary |
|---|---|
| public void elementDecl(XSElementDecl decl) Implements com. | |
| elementDecl | back to summary |
|---|---|
| private void elementDecl(XSElementDecl decl, String extraAtts) Creates node for element declaration with additional attributes.
| |
| empty | back to summary |
|---|---|
| public void empty(XSContentType t) Implements com. | |
| facet | back to summary |
|---|---|
| public void facet(XSFacet facet) Implements com. | |
| getModel | back to summary |
|---|---|
| public SchemaTreeTraverser. Retrieves the tree model of
| |
| identityConstraint | back to summary |
|---|---|
| public void identityConstraint(XSIdentityConstraint ic) Implements com. | |
| listSimpleType | back to summary |
|---|---|
| public void listSimpleType(XSListSimpleType type) Implements com. | |
| modelGroup | back to summary |
|---|---|
| public void modelGroup(XSModelGroup group) Implements com. | |
| modelGroup | back to summary |
|---|---|
| private void modelGroup(XSModelGroup group, String extraAtts) Creates node for model group with additional attributes.
| |
| modelGroupDecl | back to summary |
|---|---|
| public void modelGroupDecl(XSModelGroupDecl decl) Implements com. | |
| notation | back to summary |
|---|---|
| public void notation(XSNotation notation) Implements com. | |
| particle | back to summary |
|---|---|
| public void particle(XSParticle part) Implements com. | |
| restrictionSimpleType | back to summary |
|---|---|
| public void restrictionSimpleType(XSRestrictionSimpleType type) Implements com. | |
| schema | back to summary |
|---|---|
| public void schema(XSSchema s) Implements com. | |
| simpleType | back to summary |
|---|---|
| public void simpleType(XSSimpleType type) Implements com. | |
| unionSimpleType | back to summary |
|---|---|
| public void unionSimpleType(XSUnionSimpleType type) Implements com. | |
| visit | back to summary |
|---|---|
| public void visit(XSSchemaSet s) Visits the root schema set.
| |
| wildcard | back to summary |
|---|---|
| public void wildcard(XSWildcard wc) Implements com. | |
| wildcard | back to summary |
|---|---|
| private void wildcard(XSWildcard wc, String extraAtts) Creates node for wild card with additional attributes.
| |
| xpath | back to summary |
|---|---|
| public void xpath(XSXPath xp) Implements com. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| SchemaRootNode | back to summary |
|---|---|
| public SchemaRootNode() A simple constructor. | |
| Modifier and Type | Field and Description |
|---|---|
| protected final JLabel | iconLabel
The icon label. |
| private boolean | isSelected
The selection indicator. |
| public final Font | nameFont
Default font for the text label. |
| protected final JLabel | nameLabel
The text label |
| public final Color | selectedBackground
Background color for selected cells (light brown). |
| public final Color | selectedForeground
Foreground color for selected cells, both text and border (dark brown). |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final Component | getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
Implements javax. Sets the value of the current tree cell to |
| public final void | paintComponent(Graphics g)
Overrides javax. Calls the UI delegate's paint method, if the UI delegate
is non- |
| protected final void |
| iconLabel | back to summary |
|---|---|
| protected final JLabel iconLabel The icon label. | |
| isSelected | back to summary |
|---|---|
| private boolean isSelected The selection indicator. | |
| nameFont | back to summary |
|---|---|
| public final Font nameFont Default font for the text label. | |
| nameLabel | back to summary |
|---|---|
| protected final JLabel nameLabel The text label | |
| selectedBackground | back to summary |
|---|---|
| public final Color selectedBackground Background color for selected cells (light brown). | |
| selectedForeground | back to summary |
|---|---|
| public final Color selectedForeground Foreground color for selected cells, both text and border (dark brown). | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SchemaTreeCellRenderer | back to summary |
|---|---|
| public SchemaTreeCellRenderer() Simple constructor. | |
| getTreeCellRendererComponent | back to summary |
|---|---|
| public final Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) Implements javax. Doc from javax. Sets the value of the current tree cell to
The
JTree.DropLocation dropLocation = tree.getDropLocation();
if (dropLocation != null
&& dropLocation.getChildIndex() == -1
&& tree.getRowForPath(dropLocation.getPath()) == row) {
// this row represents the current drop location
// so render it specially, perhaps with a different color
}
| |
| paintComponent | back to summary |
|---|---|
| public final void paintComponent(Graphics g) Overrides javax. Doc from javax. Calls the UI delegate's paint method, if the UI delegate
is non-
If you override this in a subclass you should not make permanent
changes to the passed in
The passed in | |
| setValues | back to summary |
|---|---|
| protected final void setValues(Icon icon, String caption, boolean selected) Sets values for the icon and text of | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public static SchemaTreeTraverser. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SchemaTreeModel | back to summary |
|---|---|
| private SchemaTreeModel(SchemaTreeTraverser. A simple constructor. Is made private to allow creating the root node first.
| |
| addSchemaNode | back to summary |
|---|---|
| public void addSchemaNode(SchemaTreeTraverser. | |
| getInstance | back to summary |
|---|---|
| public static SchemaTreeTraverser. A factory method for creating a new empty tree.
| |
| Modifier and Type | Field and Description |
|---|---|
| private String | artifactName
The caption of the corresponding artifact. |
| private String | fileName
File name of the corresponding schema artifact. |
| private int | lineNumber
Line number of the corresponding schema artifact. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | SchemaTreeNode(String
Artifact name. artifactName, Locator Artifact locator. locator)Simple constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String | |
| public int | |
| public void | |
| public void |
| artifactName | back to summary |
|---|---|
| private String artifactName The caption of the corresponding artifact. | |
| fileName | back to summary |
|---|---|
| private String fileName File name of the corresponding schema artifact. | |
| lineNumber | back to summary |
|---|---|
| private int lineNumber Line number of the corresponding schema artifact. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides javax. | |
| SchemaTreeNode | back to summary |
|---|---|
| public SchemaTreeNode(String artifactName, Locator locator) Simple constructor. | |
| getCaption | back to summary |
|---|---|
| public String getCaption() Returns the caption for
| |
| getFileName | back to summary |
|---|---|
public String getFileName()
| |
| getLineNumber | back to summary |
|---|---|
public int getLineNumber()
| |
| setFileName | back to summary |
|---|---|
public void setFileName(String fileName)
| |
| setLineNumber | back to summary |
|---|---|
public void setLineNumber(int lineNumber)
| |