JHotDraw 7.5.1

org.jhotdraw.samples.odg.io
Class ODGStylesReader

java.lang.Object
  extended by org.jhotdraw.samples.odg.io.ODGStylesReader

public class ODGStylesReader
extends java.lang.Object

ODGStylesReader reads an ODG <document-styles> element, and creates a map of AttributeKey's and values.

Version:
$Id: ODGStylesReader.java 585 2009-11-24 21:53:05Z rawcoder $
Author:
Werner Randelshofer

Constructor Summary
ODGStylesReader()
          Creates a new instance.
 
Method Summary
 java.util.Map<AttributeKey,java.lang.Object> getAttributes(java.lang.String styleName, java.lang.String familyName)
           
 void read(java.io.File file)
          Reads a <document-styles> element from the specified XML file.
 void read(java.io.InputStream in)
          Reads a <document-styles> element from the specified input stream.
 void read(IXMLElement root)
          Reads a <document-styles> element from the specified XML element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ODGStylesReader

public ODGStylesReader()
Creates a new instance.

Method Detail

getAttributes

public java.util.Map<AttributeKey,java.lang.Object> getAttributes(java.lang.String styleName,
                                                                  java.lang.String familyName)

read

public void read(java.io.File file)
          throws java.io.IOException
Reads a <document-styles> element from the specified XML file.

Parameters:
file - A XML file with a <document> root element or with a <document-styles> root element.
Throws:
java.io.IOException

read

public void read(java.io.InputStream in)
          throws java.io.IOException
Reads a <document-styles> element from the specified input stream.

Parameters:
in - A input stream with a <document> root element or with a <document-styles> root element.
Throws:
java.io.IOException

read

public void read(IXMLElement root)
          throws java.io.IOException
Reads a <document-styles> element from the specified XML element.

Parameters:
root - A <document> element or a <document-styles> element.
Throws:
java.io.IOException

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.