sventon subversion web client - http://www.sventon.org
[show recent changes]
 
  Help
HEAD
Rev: 10305 - svn://svn.freehep.org/svn / freehep / branches / vectorgraphics-emfplus / freehep-graphicsio-emf / src / main / java / org / freehep / graphicsio / emf / EMFTag.java
Unified Diff View - EMFTag.java
Search for Help
/freehep/branches/vectorgraphics-emfplus/freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/EMFTag.java @ revision 10304
/freehep/branches/vectorgraphics-emfplus/freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/EMFTag.java @ revision 10305
@@ -1,4 +1,4 @@ -// Copyright 2001, FreeHEP. +// Copyright 2001-2006, FreeHEP. package org.freehep.graphicsio.emf; import java.io.IOException; @@ -11,10 +11,12 @@  * EMF specific tag, from which all other EMF Tags inherit.  *  * @author Mark Donszelmann - * @version $Id: EMFTag.java 10188 2006-12-11 20:26:14Z duns $ + * @version $Id: EMFTag.java 10305 2007-01-12 23:43:03Z duns $  */ public abstract class EMFTag extends Tag { +    protected int flags = 0; +     /**      * Constructs a EMFTag.      * @@ -28,7 +30,10 @@     public Tag read(int tagID, TaggedInputStream input, int len)             throws IOException { -        return read(tagID, (EMFInputStream) input, len); +        EMFInputStream emf = (EMFInputStream)input; +        EMFTagHeader tagHeader = (EMFTagHeader)emf.getTagHeader(); +        flags = tagHeader.getFlags(); +        return read(tagID, emf, len);     }     public abstract EMFTag read(int tagID, EMFInputStream emf, int len) @@ -49,11 +54,16 @@     public void write(int tagID, EMFOutputStream emf) throws IOException {         // empty     } + +    public int getFlags() { +        return flags; +    }     /**      * @return a description of the tagName and tagID      */     public String toString() { -        return "EMFTag " + getName() + " (" + getTag() + ")"; +        int id = getTag(); +        return "EMFTag " + getName() + " (" + id + ") (0x"+Integer.toHexString(id)+")";     } }


feed icon

sventon 2.5.1