Skip Headers

Oracle9i Supplied Java Packages Reference
Release 2 (9.2)

Part Number A96609-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

15
Package oracle.xml.srcviewer

This chapter describes package oracle.xml.srcviewer for, which contains the XMLSourceView bean.

The Oracle XML Transviewer Beans are provided as part of Oracle9i XDK for Java Beans. XML Transviewer Beans facilitate the addition of graphical or visual interfaces to your XML applications.

This chaper contains these sections:


Package oracle.xml.srcviewer Description

The classes in oracle.xml.srcviewer implement the XMLSourceView bean for displaying the attributes and source for an XML document. The XMLSourceView bean presents a visual interface for XML documents for easier editing. It enables the display of XML and XSL formatted files with color syntax highlighting when modifying an XML document with a text editor. This helps view and edit the files. It can be integrated with DOMBuilder bean, and allows pre- or post-parsing visualization and validation against a specified DTD. Information about developing applications using Oracle XML Transviewer Java Beans can be found in the Oracle resources listed here under See Also.


Package oracle.xml.srcviewer Summary

Table 15-1 oracle.xml.srcviewer Classes
Class Description

XMLSourceView Class

Shows an XML document.

XMLSourceViewBeanInfo Class

Extends java.beans.SimpleBeanInfo.


XMLSourceView Class

Syntax

public class XMLSourceView extends javax.swing.JPanel implements 
java.io.Serializable
 
java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--oracle.xml.srcviewer.XMLSourceView

All Implemented Interfaces

javax.accessibility.Accessible, java.awt.image.ImageObserver, 
java.awt.MenuContainer, java.io.Serializable

Description

Shows an XML document. Recognizes the following XML token types: Tag, Attribute Name, Attribute Value, Comment, CDATA, PCDATA, PI Data, PI Name and NOTATION Symbol. Each token type has a foreground color and font setting. The default color and font settings can be changed by the user. Takes as input an org.w3c.dom.Document object.


Fields

inputDOMDocument

protected org.w3c.dom.Document inputDOMDocument

jScrollPane

protected javax.swing.JScrollPane jScrollPane

jTextPane

protected javax.swing.JTextPane jTextPane

xmlStyledDocument

protected oracle.xml.srcviewer.XMLStyledDocument xmlStyledDocument

Constructors

XMLSourceView()

public  XMLSourceView()

The class constructor. Creates an object of type XMLSourceView.


Methods

fontGet(AttributeSet)

public static java.awt.Font fontGet(javax.swing.text.AttributeSet attributeset)

Extracts and returns the font from a given attributeset.

Parameters

attributeset - The source Attributeset.

Returns

The extracted Font.

fontSet(MutableAttributeSet, Font)

public static void fontSet(javax.swing.text.MutableAttributeSet 
mutableattributeset, java.awt.Font font)

Sets the mutableattributeset font.

Parameters

mutableattributeset - The mutableattributeset to update.

font - The new Font for the mutableattributeset.

getAttributeNameFont()

public java.awt.Font getAttributeNameFont()

Returns the Attribute Value font.

Returns

The Font object.

getAttributeNameForeground()

public java.awt.Color getAttributeNameForeground()

Returns the Attribute Name foreground color.

Returns

The Color object.

getAttributeValueFont()

public java.awt.Font getAttributeValueFont()

Returns the Attribute Value font.

Returns

The Font object.

getAttributeValueForeground()

public java.awt.Color getAttributeValueForeground()

Returns the Attribute Value foreground color.

Returns

The Color object.

getBackground()

public java.awt.Color getBackground()

Returns the background color.

Overrides

java.awt.Component.getBackground() in class java.awt.Component

Returns

The Color object.

getCDATAFont()

public java.awt.Font getCDATAFont()

Returns the CDATA font.

Returns

The Font object.

getCDATAForeground()

public java.awt.Color getCDATAForeground()

Returns the CDATA foreground color.

Returns

The Color object.

getCommentDataFont()

public java.awt.Font getCommentDataFont()

Returns the Comment Data font.

Returns

The Font object.

getCommentDataForeground()

public java.awt.Color getCommentDataForeground()

Returns the Comment Data foreground color.

Returns

The Color object.

getEditedText()

public java.lang.String getEditedText()

Returns the edited text.

Returns

The String object containing the edited text.

getJTextPane()

public javax.swing.JTextPane getJTextPane()

Returns the viewer JTextPane component.

Returns

The JTextPane object used by XMLSourceViewer

getMinimumSize()

public java.awt.Dimension getMinimumSize()

Returns the XMLSourceView minimal size.

Overrides

javax.swing.JComponent.getMinimumSize() in class javax.swing.JComponent

Returns

The Dimension object containing the XMLSourceView minimum size.

getNodeAtOffset(int)

public org.w3c.dom.Node getNodeAtOffset(int i)

Returns the XML node at a given offset.

Parameters

i - The node offset.

Returns

The Node object from offset i.

getPCDATAFont()

public java.awt.Font getPCDATAFont()

Returns the PCDATA font.

Returns

The Font object.

getPCDATAForeground()

public java.awt.Color getPCDATAForeground()

Returns the PCDATA foreground color.

Returns

The Color object.

getPIDataFont()

public java.awt.Font getPIDataFont()

Returns the PI Data font.

Returns

The Font object

getPIDataForeground()

public java.awt.Color getPIDataForeground()

Returns the PI Data foreground color.

Returns

The Color object.

getPINameFont()

public java.awt.Font getPINameFont()

Returns the PI Name font.

Returns

The Font object.

getPINameForeground()

public java.awt.Color getPINameForeground()

Returns the PI Data foreground color.

Returns

The Color object.

getSymbolFont()

public java.awt.Font getSymbolFont()

Returns the NOTATION Symbol font.

Returns

The Font object.

getSymbolForeground()

public java.awt.Color getSymbolForeground()

Returns the NOTATION Symbol foreground color.

Returns

The Color object.

getTagFont()

public java.awt.Font getTagFont()

Returns the Tag font.

Returns

The Font object.

getTagForeground()

public java.awt.Color getTagForeground()

Returns the Tag foreground color.

Returns

The Color object.

getText()

public java.lang.String getText()

Returns the XML document as a String.

Returns

The String object containing the XML document.

isEditable()

public boolean isEditable()

Returns boolean to indicate whether this object is editable.

selectNodeAt(int)

public void selectNodeAt(int i)

Moves the cursor to XML Node at offset i.

Parameters

i - The node offset.

setAttributeNameFont(Font)

public void setAttributeNameFont(java.awt.Font font)

Sets the Attribute Name font.

Parameters

font - The new Font for Attribute Name.

setAttributeNameForeground(Color)

public void setAttributeNameForeground(java.awt.Color color)

Sets the Attribute Name foreground color.

Parameters

color - The new Color for Attribute Name.

setAttributeValueFont(Font)

public void setAttributeValueFont(java.awt.Font font)

Sets the Attribute Value font.

Parameters

font - The new Font for Attribute Value.

setAttributeValueForeground(Color)

public void setAttributeValueForeground(java.awt.Color color)

Sets the Attribute Value foreground color.

Parameters

color - The new Color for Attribute Value.

setBackground(Color)

public void setBackground(java.awt.Color color)

Sets the background color.

Overrides

javax.swing.JComponent.setBackground(java.awt.Color) in class javax.swing.JComponent

Parameters

color - The new background Color.

setCDATAFont(Font)

public void setCDATAFont(java.awt.Font font)

Sets the CDATA font.

Parameters

font - The new Font for CDATA.

setCDATAForeground(Color)

public void setCDATAForeground(java.awt.Color color)

Sets the CDATA foreground color.

Parameters

color - The new Color for CDATA.

setCommentDataFont(Font)

public void setCommentDataFont(java.awt.Font font)

Sets the Comment font.

Parameters

font - The new Font for the XML Comments.

setCommentDataForeground(Color)

public void setCommentDataForeground(java.awt.Color color)

Sets the Comment foreground color.

Parameters

color - The new Color for Comment.

setEditable(boolean)

public void setEditable(boolean edit)

Sets the specified boolean to indicate whether this object should be editable.

Parameters

doc - The new boolean value.

setPCDATAFont(Font)

public void setPCDATAFont(java.awt.Font font)

Sets the PCDATA font.

Parameters

font - The new Font for PCDATA.

setPCDATAForeground(Color)

public void setPCDATAForeground(java.awt.Color color)

Sets the PCDATA foreground color.

Parameters

color - The new Color for PCDATA.

setPIDataFont(Font)

public void setPIDataFont(java.awt.Font font)

Sets the PI Data font.

Parameters

font - The new Font for PI Data.

setPIDataForeground(Color)

public void setPIDataForeground(java.awt.Color color)

Sets the PI Data foreground color.

Parameters

color - The new Color for PI Data.

setPINameFont(Font)

public void setPINameFont(java.awt.Font font)

Sets the PI Name font.

Parameters

font - The new Font for the PI Names.

setPINameForeground(Color)

public void setPINameForeground(java.awt.Color color)

Sets the PI Name foreground color.

Parameters

color - The new Color for PI Name.

setSelectedNode(Node)

public void setSelectedNode(org.w3c.dom.Node node)

Sets the cursor position at the selected XML node.

Parameters

node - The selected node.

setSymbolFont(Font)

public void setSymbolFont(java.awt.Font font)

Sets the NOTATION Symbol font.

Parameters

color - The new Font for NOTATION Symbol.

setSymbolForeground(Color)

public void setSymbolForeground(java.awt.Color color)

Sets the NOTATION Symbol foreground color.

Parameters

color - The new Color for NOTATION Symbol.

setTagFont(Font)

public void setTagFont(java.awt.Font font)

Sets the Tag font.

Parameters

font - The new Font for the XML Tags.

setTagForeground(Color)

public void setTagForeground(java.awt.Color color)

Sets the Tag foreground color.

Parameters

color - The new Color for the XML Tags.

setXMLDocument(Document)

public void setXMLDocument(org.w3c.dom.Document document)

Associates the XMLviewer with a XML document.

Parameters

doc - The Document document to display.

See Also

getText()


XMLSourceViewBeanInfo Class

Syntax

public class XMLSourceViewBeanInfo extends java.beans.SimpleBeanInfo
 
java.lang.Object
  |
  +--java.beans.SimpleBeanInfo
        |
        +--oracle.xml.srcviewer.XMLSourceViewBeanInfo

All Implemented Interfaces

java.beans.BeanInfo

Constructors

XMLSourceViewBeanInfo()

public  XMLSourceViewBeanInfo()


Methods

getIcon(int)

public java.awt.Image getIcon(int iconKind)

Overrides

java.beans.SimpleBeanInfo.getIcon(int) in class java.beans.SimpleBeanInfo

getPropertyDescriptors()

public java.beans.PropertyDescriptor[] getPropertyDescriptors()

Overrides

java.beans.SimpleBeanInfo.getPropertyDescriptors() in class java.beans.SimpleBeanInfo


Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback