## org.apache.batik.util.gui.xmleditor
Class XMLContext

    java.lang.Object
      javax.swing.text.StyleContext
          org.apache.batik.util.gui.xmleditor.XMLContext

All Implemented Interfaces:
  java.io.Serializable, javax.swing.text.AbstractDocument.AttributeContext

    public class XMLContext

extends javax.swing.text.StyleContext

A pool of styles and their associated resources

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class javax.swing.text.StyleContext
`javax.swing.text.StyleContext.NamedStyle, javax.swing.text.StyleContext.SmallAttributeSet`

Field Summary
`static java.lang.String` `ATTRIBUTE_NAME_STYLE`
`static java.lang.String` `ATTRIBUTE_VALUE_STYLE`
`static java.lang.String` `CDATA_STYLE`
`static java.lang.String` `CHARACTER_DATA_STYLE`
`static java.lang.String` `COMMENT_STYLE`
`static java.lang.String` `DOCTYPE_STYLE`
`static java.lang.String` `ELEMENT_STYLE`
`protected java.util.Map` `syntaxFontMap` Map<String, Font>
`protected java.util.Map` `syntaxForegroundMap` Map<String, Color>
`static java.lang.String` `XML_DECLARATION_STYLE`

Fields inherited from class javax.swing.text.StyleContext
`DEFAULT_STYLE`

Constructor Summary
`XMLContext()`
`XMLContext(java.util.Map syntaxFontMap, java.util.Map syntaxForegroundMap)`

Method Summary
`java.awt.Font` `getSyntaxFont(int ctx)`
`java.awt.Font` `getSyntaxFont(java.lang.String name)`
`java.awt.Color` `getSyntaxForeground(int ctx)`
`java.awt.Color` `getSyntaxForeground(java.lang.String name)`
`java.lang.String` `getSyntaxName(int ctx)`
`void` `setSyntaxFont(java.util.Map syntaxFontMap)`
`void` `setSyntaxForeground(java.util.Map syntaxForegroundMap)`

Methods inherited from class javax.swing.text.StyleContext

`addAttribute, addAttributes, addChangeListener, addStyle, createLargeAttributeSet, createSmallAttributeSet, getBackground, getChangeListeners, getCompressionThreshold, getDefaultStyleContext, getEmptySet, getFont, getFont, getFontMetrics, getForeground, getStaticAttribute, getStaticAttributeKey, getStyle, getStyleNames, readAttributes, readAttributeSet, reclaim, registerStaticAttributeKey, removeAttribute, removeAttributes, removeAttributes, removeChangeListener, removeStyle, toString, writeAttributes, writeAttributeSet`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### XML_DECLARATION_STYLE

    public static final java.lang.String XML_DECLARATION_STYLE

See Also:
  Constant Field Values

### DOCTYPE_STYLE

    public static final java.lang.String DOCTYPE_STYLE

See Also:
  Constant Field Values

### COMMENT_STYLE

    public static final java.lang.String COMMENT_STYLE

See Also:
  Constant Field Values

### ELEMENT_STYLE

    public static final java.lang.String ELEMENT_STYLE

See Also:
  Constant Field Values

### CHARACTER_DATA_STYLE

    public static final java.lang.String CHARACTER_DATA_STYLE

See Also:
  Constant Field Values

### ATTRIBUTE_NAME_STYLE

    public static final java.lang.String ATTRIBUTE_NAME_STYLE

See Also:
  Constant Field Values

### ATTRIBUTE_VALUE_STYLE

    public static final java.lang.String ATTRIBUTE_VALUE_STYLE

See Also:
  Constant Field Values

### CDATA_STYLE

    public static final java.lang.String CDATA_STYLE

See Also:
  Constant Field Values

### syntaxForegroundMap

    protected java.util.Map syntaxForegroundMap

  Map<String, Color>

### syntaxFontMap

    protected java.util.Map syntaxFontMap

  Map<String, Font>

Constructor Detail

### XMLContext

    public XMLContext()

### XMLContext

    public XMLContext(java.util.Map syntaxFontMap,
                      java.util.Map syntaxForegroundMap)

Method Detail

### setSyntaxForeground

    public void setSyntaxForeground(java.util.Map syntaxForegroundMap)

### setSyntaxFont

    public void setSyntaxFont(java.util.Map syntaxFontMap)

### getSyntaxForeground

    public java.awt.Color getSyntaxForeground(int ctx)

### getSyntaxForeground

    public java.awt.Color getSyntaxForeground(java.lang.String name)

### getSyntaxFont

    public java.awt.Font getSyntaxFont(int ctx)

### getSyntaxFont

    public java.awt.Font getSyntaxFont(java.lang.String name)

### getSyntaxName

    public java.lang.String getSyntaxName(int ctx)

Copyright © 2008 Apache Software Foundation. All Rights Reserved.