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

java.lang.Object
  extended byjavax.swing.text.StyleContext
      extended byorg.apache.batik.util.gui.xmleditor.XMLContext
All Implemented Interfaces:
AbstractDocument.AttributeContext, Serializable

public class XMLContext
extends StyleContext

A pool of styles and their associated resources

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.text.StyleContext
StyleContext.NamedStyle, StyleContext.SmallAttributeSet
 
Field Summary
static String ATTRIBUTE_NAME_STYLE
           
static String ATTRIBUTE_VALUE_STYLE
           
static String CDATA_STYLE
           
static String CHARACTER_DATA_STYLE
           
static String COMMENT_STYLE
           
static String DOCTYPE_STYLE
           
static String ELEMENT_STYLE
           
protected  Map syntaxFontMap
          Map
protected  Map syntaxForegroundMap
          Map
static String XML_DECLARATION_STYLE
           
 
Fields inherited from class javax.swing.text.StyleContext
DEFAULT_STYLE
 
Constructor Summary
XMLContext()
           
XMLContext(Map syntaxFontMap, Map syntaxForegroundMap)
           
 
Method Summary
 Font getSyntaxFont(int ctx)
           
 Font getSyntaxFont(String name)
           
 Color getSyntaxForeground(int ctx)
           
 Color getSyntaxForeground(String name)
           
 String getSyntaxName(int ctx)
           
 void setSyntaxFont(Map syntaxFontMap)
           
 void setSyntaxForeground(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 String XML_DECLARATION_STYLE
See Also:
Constant Field Values

DOCTYPE_STYLE

public static final String DOCTYPE_STYLE
See Also:
Constant Field Values

COMMENT_STYLE

public static final String COMMENT_STYLE
See Also:
Constant Field Values

ELEMENT_STYLE

public static final String ELEMENT_STYLE
See Also:
Constant Field Values

CHARACTER_DATA_STYLE

public static final String CHARACTER_DATA_STYLE
See Also:
Constant Field Values

ATTRIBUTE_NAME_STYLE

public static final String ATTRIBUTE_NAME_STYLE
See Also:
Constant Field Values

ATTRIBUTE_VALUE_STYLE

public static final String ATTRIBUTE_VALUE_STYLE
See Also:
Constant Field Values

CDATA_STYLE

public static final String CDATA_STYLE
See Also:
Constant Field Values

syntaxForegroundMap

protected Map syntaxForegroundMap
Map


syntaxFontMap

protected Map syntaxFontMap
Map

Constructor Detail

XMLContext

public XMLContext()

XMLContext

public XMLContext(Map syntaxFontMap,
                  Map syntaxForegroundMap)
Method Detail

setSyntaxForeground

public void setSyntaxForeground(Map syntaxForegroundMap)

setSyntaxFont

public void setSyntaxFont(Map syntaxFontMap)

getSyntaxForeground

public Color getSyntaxForeground(int ctx)

getSyntaxForeground

public Color getSyntaxForeground(String name)

getSyntaxFont

public Font getSyntaxFont(int ctx)

getSyntaxFont

public Font getSyntaxFont(String name)

getSyntaxName

public String getSyntaxName(int ctx)


Copyright © 2009 Apache Software Foundation. All Rights Reserved.