All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class oracle.xml.srcviewer.XMLSourceView
java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----javax.swing.JComponent
                           |
                           +----javax.swing.JPanel
                                   |
                                   +----oracle.xml.srcviewer.XMLSourceView
  -  public class XMLSourceView
  -  extends JPanel
  -  implements Serializable
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. The default color/font
 settings can be changed by the user.
 Takes as input an  org.w3c.dom.Document object.
   
  -   inputDOMDocument inputDOMDocument
-  
  
-   jScrollPane jScrollPane
-  
  
-   jTextPane jTextPane
-  
  
-   xmlStyledDocument xmlStyledDocument
-  
   
  -   XMLSourceView() XMLSourceView()
-   The class constructor.
   
  -   fontGet(AttributeSet) fontGet(AttributeSet)
-   Extracts and returns the font from a given attributeset.
  
-   fontSet(MutableAttributeSet, Font) fontSet(MutableAttributeSet, Font)
-   Sets the mutableattributeset font.
  
-   getAttributeNameFont() getAttributeNameFont()
-   Returns the Attribute Value font.
  
-   getAttributeNameForeground() getAttributeNameForeground()
-   Returns the Attribute Name foreground color.
  
-   getAttributeValueFont() getAttributeValueFont()
-   Returns the Attribute Value font.
  
-   getAttributeValueForeground() getAttributeValueForeground()
-   Returns the Attribute Value foreground color.
  
-   getBackground() getBackground()
-   Returns the background color.
  
-   getCDATAFont() getCDATAFont()
-   Returns the CDATA font.
  
-   getCDATAForeground() getCDATAForeground()
-   Returns the CDATA foreground color.
  
-   getCommentDataFont() getCommentDataFont()
-   Returns the Comment Data font.
  
-   getCommentDataForeground() getCommentDataForeground()
-   Returns the Comment Data foreground color.
  
-   getEditedText() getEditedText()
-   Returns the edited text.
  
-   getJTextPane() getJTextPane()
-   Returns the viewer JTextPanecomponent.
-   getMinimumSize() getMinimumSize()
-   Returns the XMLSourceView minimal size.
  
-   getNodeAtOffset(int) getNodeAtOffset(int)
-   Returns the XML node at a given offset.
  
-   getPCDATAFont() getPCDATAFont()
-   Returns the PCDATA font.
  
-   getPCDATAForeground() getPCDATAForeground()
-   Returns the PCDATA foreground color.
  
-   getPIDataFont() getPIDataFont()
-   Returns the PI Data font.
  
-   getPIDataForeground() getPIDataForeground()
-   Returns the PI Data foreground color.
  
-   getPINameFont() getPINameFont()
-   Returns the PI Name font.
  
-   getPINameForeground() getPINameForeground()
-   Returns the PI Data foreground color.
  
-   getSymbolFont() getSymbolFont()
-   Returns the NOTATION Symbol font.
  
-   getSymbolForeground() getSymbolForeground()
-   Returns the NOTATION Symbol foreground color.
  
-   getTagFont() getTagFont()
-   Returns the Tag font.
  
-   getTagForeground() getTagForeground()
-   Returns the Tag foreground color.
  
-   getText() getText()
-   Returns the XML document as a String.
  
-   isEditable() isEditable()
-   Returns boolean to indicate whether this object is editable.
  
-   selectNodeAt(int) selectNodeAt(int)
-   Moves the cursor to XML Node at offset i.
-   setAttributeNameFont(Font) setAttributeNameFont(Font)
-   Sets the Attribute Name font.
  
-   setAttributeNameForeground(Color) setAttributeNameForeground(Color)
-   Sets the Attribute Name foreground color.
  
-   setAttributeValueFont(Font) setAttributeValueFont(Font)
-   Sets the Attribute Value font.
  
-   setAttributeValueForeground(Color) setAttributeValueForeground(Color)
-   Sets the Attribute Value foreground color.
  
-   setBackground(Color) setBackground(Color)
-   Sets the background color.
  
-   setCDATAFont(Font) setCDATAFont(Font)
-   Sets the CDATA font.
  
-   setCDATAForeground(Color) setCDATAForeground(Color)
-   Sets the CDATA foreground color.
  
-   setCommentDataFont(Font) setCommentDataFont(Font)
-   Sets the Comment font.
  
-   setCommentDataForeground(Color) setCommentDataForeground(Color)
-   Sets the Comment foreground color.
  
-   setEditable(boolean) setEditable(boolean)
-   Sets the specified boolean to indicate whether this object should be editable.
  
-   setPCDATAFont(Font) setPCDATAFont(Font)
-   Sets the PCDATA font.
  
-   setPCDATAForeground(Color) setPCDATAForeground(Color)
-   Sets the PCDATA foreground color.
  
-   setPIDataFont(Font) setPIDataFont(Font)
-   Sets the PI Data font.
  
-   setPIDataForeground(Color) setPIDataForeground(Color)
-   Sets the PI Data foreground color.
  
-   setPINameFont(Font) setPINameFont(Font)
-   Sets the PI Name font.
  
-   setPINameForeground(Color) setPINameForeground(Color)
-   Sets the PI Name foreground color.
  
-   setSelectedNode(Node) setSelectedNode(Node)
-   Sets the cursor position at the selected XML node.
  
-   setSymbolFont(Font) setSymbolFont(Font)
-   Sets the NOTATION Symbol font.
  
-   setSymbolForeground(Color) setSymbolForeground(Color)
-   Sets the NOTATION Symbol foreground color.
  
-   setTagFont(Font) setTagFont(Font)
-   Sets the Tag font.
  
-   setTagForeground(Color) setTagForeground(Color)
-   Sets the Tag foreground color.
  
-   setXMLDocument(Document) setXMLDocument(Document)
-   Associates the XMLviewer with a XML document.
   
 jTextPane
jTextPane
 protected JTextPane jTextPane
 jScrollPane
jScrollPane
 protected JScrollPane jScrollPane
 inputDOMDocument
inputDOMDocument
 protected Document inputDOMDocument
 xmlStyledDocument
xmlStyledDocument
 protected XMLStyledDocument xmlStyledDocument
   
 XMLSourceView
XMLSourceView
 public XMLSourceView()
  -  The class constructor.
 Creates an object of type XMLSourceView.
 
   
 getAttributeNameFont
getAttributeNameFont
 public Font getAttributeNameFont()
  -  Returns the Attribute Value font.
   
- 
    -  Returns:
    
-  The Fontobject.
 
 getAttributeNameForeground
getAttributeNameForeground
 public Color getAttributeNameForeground()
  -  Returns the Attribute Name foreground color.
   
- 
    -  Returns:
    
-  The Colorobject.
 
 getAttributeValueFont
getAttributeValueFont
 public Font getAttributeValueFont()
  -  Returns the Attribute Value font.
   
- 
    -  Returns:
    
-  The Fontobject.
 
 getAttributeValueForeground
getAttributeValueForeground
 public Color getAttributeValueForeground()
  -  Returns the Attribute Value foreground color.
   
- 
    -  Returns:
    
-  The Colorobject.
 
 getBackground
getBackground
 public Color getBackground()
  -  Returns the background color.
   
- 
    -  Returns:
    
-  The Colorobject.
-  Overrides:
    
-  getBackground in class Component
  
 
 getCDATAFont
getCDATAFont
 public Font getCDATAFont()
  -  Returns the CDATA font.
   
- 
    -  Returns:
    
-  The Fontobject.
 
 getCDATAForeground
getCDATAForeground
 public Color getCDATAForeground()
  -  Returns the CDATA foreground color.
   
- 
    -  Returns:
    
-  The Colorobject.
 
 getCommentDataFont
getCommentDataFont
 public Font getCommentDataFont()
  -  Returns the Comment Data font.
   
- 
    -  Returns:
    
-  The Fontobject.
 
 getCommentDataForeground
getCommentDataForeground
 public Color getCommentDataForeground()
  -  Returns the Comment Data foreground color.
   
- 
    -  Returns:
    
-  The Colorobject.
 
 getJTextPane
getJTextPane
 public JTextPane getJTextPane()
  -  Returns the viewer JTextPanecomponent.
   
- 
    -  Returns:
    
-  The JTextPaneobject used by XMLSourceViewer
 
 getMinimumSize
getMinimumSize
 public Dimension getMinimumSize()
  -  Returns the XMLSourceView minimal size.
   
- 
    -  Returns:
    
-  The Dimensionobject containing
 the XMLSourceView minimum size.
-  Overrides:
    
-  getMinimumSize in class JComponent
  
 
 getNodeAtOffset
getNodeAtOffset
 public Node getNodeAtOffset(int i) throws BadLocationException
  -  Returns the XML node at a given offset.
   
- 
    -  Parameters:
    
-  i - The node offset.
    
-  Returns:
    
-  The Nodeobject from offseti.
 
 getPCDATAFont
getPCDATAFont
 public Font getPCDATAFont()
  -  Returns the PCDATA font.
   
- 
    -  Returns:
    
-  The Fontobject.
 
 getPCDATAForeground
getPCDATAForeground
 public Color getPCDATAForeground()
  -  Returns the PCDATA foreground color.
   
- 
    -  Returns:
    
-  The Colorobject.
 
 getPIDataFont
getPIDataFont
 public Font getPIDataFont()
  -  Returns the PI Data font.
   
- 
    -  Returns:
    
-  The Fontobject
 
 getPIDataForeground
getPIDataForeground
 public Color getPIDataForeground()
  -  Returns the PI Data foreground color.
   
- 
    -  Returns:
    
-  The Colorobject.
 
 getPINameFont
getPINameFont
 public Font getPINameFont()
  -  Returns the PI Name font.
   
- 
    -  Returns:
    
-  The Fontobject.
 
 getPINameForeground
getPINameForeground
 public Color getPINameForeground()
  -  Returns the PI Data foreground color.
   
- 
    -  Returns:
    
-  The Colorobject.
 
 getText
getText
 public String getText()
  -  Returns the XML document as a String.
   
- 
    -  Returns:
    
-  The Stringobject containing the XML document.
 
 getEditedText
getEditedText
 public String getEditedText()
  -  Returns the edited text.
   
- 
    -  Returns:
    
-  The Stringobject containing the edited text.
 
 getSymbolFont
getSymbolFont
 public Font getSymbolFont()
  -  Returns the NOTATION Symbol font.
   
- 
    -  Returns:
    
-  The Fontobject.
 
 getSymbolForeground
getSymbolForeground
 public Color getSymbolForeground()
  -  Returns the NOTATION Symbol foreground color.
   
- 
    -  Returns:
    
-  The Colorobject.
 
 getTagFont
getTagFont
 public Font getTagFont()
  -  Returns the Tag font.
   
- 
    -  Returns:
    
-  The Fontobject.
 
 getTagForeground
getTagForeground
 public Color getTagForeground()
  -  Returns the Tag foreground color.
   
- 
    -  Returns:
    
-  The Colorobject.
 
 selectNodeAt
selectNodeAt
 public void selectNodeAt(int i) throws BadLocationException
  -  Moves the cursor to XML Node at offset i.
   
- 
    -  Parameters:
    
-  i - The node offset.
  
 
 setAttributeNameFont
setAttributeNameFont
 public void setAttributeNameFont(Font font) throws IllegalArgumentException
  -  Sets the Attribute Name font.
   
- 
    -  Parameters:
    
-  font - The new Fontfor Attribute Name.
 
 setAttributeNameForeground
setAttributeNameForeground
 public void setAttributeNameForeground(Color color) throws IllegalArgumentException
  -  Sets the Attribute Name foreground color.
   
- 
    -  Parameters:
    
-  color - The new Colorfor Attribute Name.
 
 setAttributeValueFont
setAttributeValueFont
 public void setAttributeValueFont(Font font) throws IllegalArgumentException
  -  Sets the Attribute Value font.
   
- 
    -  Parameters:
    
-  font - The new Fontfor Attribute Value.
 
 setAttributeValueForeground
setAttributeValueForeground
 public void setAttributeValueForeground(Color color) throws IllegalArgumentException
  -  Sets the Attribute Value foreground color.
   
- 
    -  Parameters:
    
-  color - The new Colorfor Attribute Value.
 
 setBackground
setBackground
 public void setBackground(Color color)
  -  Sets the background color.
   
- 
    -  Parameters:
    
-  color - The new background Color.
-  Overrides:
    
-  setBackground in class JComponent
  
 
 setCDATAFont
setCDATAFont
 public void setCDATAFont(Font font) throws IllegalArgumentException
  -  Sets the CDATA font.
   
- 
    -  Parameters:
    
-  font - The new Fontfor CDATA.
 
 setCDATAForeground
setCDATAForeground
 public void setCDATAForeground(Color color) throws IllegalArgumentException
  -  Sets the CDATA foreground color.
   
- 
    -  Parameters:
    
-  color - The new Colorfor CDATA.
 
 setCommentDataFont
setCommentDataFont
 public void setCommentDataFont(Font font) throws IllegalArgumentException
  -  Sets the Comment font.
   
- 
    -  Parameters:
    
-  font - The new Fontfor the XML Comments.
 
 setCommentDataForeground
setCommentDataForeground
 public void setCommentDataForeground(Color color) throws IllegalArgumentException
  -  Sets the Comment foreground color.
   
- 
    -  Parameters:
    
-  color - The new Colorfor Comment.
 
 setEditable
setEditable
 public void setEditable(boolean edit)
  -  Sets the specified boolean to indicate whether this object should be editable.
   
- 
    -  Parameters:
    
-  doc - The new booleanvalue.
 
 isEditable
isEditable
 public boolean isEditable()
  -  Returns boolean to indicate whether this object is editable.
 
 setXMLDocument
setXMLDocument
 public void setXMLDocument(Document document)
  -  Associates the XMLviewer with a XML document.
   
- 
    -  Parameters:
    
-  doc - The Documentdocument to display.
-  See Also:
    
-  getText
  
 
 setPCDATAFont
setPCDATAFont
 public void setPCDATAFont(Font font) throws IllegalArgumentException
  -  Sets the PCDATA font.
   
- 
    -  Parameters:
    
-  font - The new Fontfor PCDATA.
 
 setPCDATAForeground
setPCDATAForeground
 public void setPCDATAForeground(Color color) throws IllegalArgumentException
  -  Sets the PCDATA foreground color.
   
- 
    -  Parameters:
    
-  color - The new Colorfor PCDATA.
 
 setPIDataFont
setPIDataFont
 public void setPIDataFont(Font font) throws IllegalArgumentException
  -  Sets the PI Data font.
   
- 
    -  Parameters:
    
-  font - The new Fontfor PI Data.
 
 setPIDataForeground
setPIDataForeground
 public void setPIDataForeground(Color color) throws IllegalArgumentException
  -  Sets the PI Data foreground color.
   
- 
    -  Parameters:
    
-  color - The new Colorfor PI Data.
 
 setPINameFont
setPINameFont
 public void setPINameFont(Font font) throws IllegalArgumentException
  -  Sets the PI Name font.
   
- 
    -  Parameters:
    
-  font - The new Fontfor the PI Names.
 
 setPINameForeground
setPINameForeground
 public void setPINameForeground(Color color) throws IllegalArgumentException
  -  Sets the PI Name foreground color.
   
- 
    -  Parameters:
    
-  color - The new Colorfor PI Name.
 
 setSelectedNode
setSelectedNode
 public void setSelectedNode(Node node)
  -  Sets the cursor position at the selected XML node.
   
- 
    -  Parameters:
    
-  node - The selected node.
  
 
 setSymbolFont
setSymbolFont
 public void setSymbolFont(Font font) throws IllegalArgumentException
  -  Sets the NOTATION Symbol font.
   
- 
    -  Parameters:
    
-  color - The new Fontfor NOTATION Symbol.
 
 setSymbolForeground
setSymbolForeground
 public void setSymbolForeground(Color color) throws IllegalArgumentException
  -  Sets the NOTATION Symbol foreground color.
   
- 
    -  Parameters:
    
-  color - The new Colorfor NOTATION Symbol.
 
 setTagFont
setTagFont
 public void setTagFont(Font font) throws IllegalArgumentException
  -  Sets the Tag font.
   
- 
    -  Parameters:
    
-  font - The new Fontfor the XML Tags.
 
 setTagForeground
setTagForeground
 public void setTagForeground(Color color) throws IllegalArgumentException
  -  Sets the Tag foreground color.
   
- 
    -  Parameters:
    
-  color - The new Colorfor the XML Tags.
 
 fontGet
fontGet
 public static Font fontGet(AttributeSet attributeset)
  -  Extracts and returns the font from a given attributeset.
   
- 
    -  Parameters:
    
-  attributeset - The source Attributeset.
-  Returns:
    
-  The extracted Font.
 
 fontSet
fontSet
 public static void fontSet(MutableAttributeSet mutableattributeset,
                            Font font)
  -  Sets the mutableattributeset font.
   
- 
    -  Parameters:
    
-  mutableattributeset - The mutableattributesetto update.
-  font - The new Fontfor the mutableattributeset.
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index