net.xoetrope.deprecated.xui.wmf
Class RecordStore

java.lang.Object
  extended by net.xoetrope.deprecated.xui.wmf.RecordStore
Direct Known Subclasses:
WmfRecordStore

public class RecordStore
extends java.lang.Object

An object that stores the vector graphics records.


Field Summary
protected  boolean bReading
           
 int lastObjectIdx
           
protected  int numObjects
           
protected  int numRecords
           
protected  java.util.Vector objectVector
           
protected  java.util.Vector records
           
protected  int vpH
           
protected  int vpW
           
protected  int vpX
           
protected  int vpY
           
 
Constructor Summary
RecordStore()
           
 
Method Summary
 int addObject(int type, java.lang.Object obj)
          Adds a GdiObject to the internal handle table.
 int addObjectAt(int type, java.lang.Object obj, int idx)
          Adds a GdiObject to the internal handle table.
 int getNumObjects()
          Returns the number of GdiObjects in the handle table
 int getNumRecords()
          Returns a number of records in the image
 net.xoetrope.deprecated.xui.wmf.GdiObject getObject(int idx)
          Returns a GdiObject from the handle table
 net.xoetrope.deprecated.xui.wmf.MetaRecord getRecord(int idx)
          Returns a meta record.
 java.net.URL getUrl()
          Returns the current URL
 int getVpH()
          Returns the viewport height
 int getVpW()
          Returns the viewport width
 int getVpX()
          Returns the viewport x origin
 int getVpY()
          Returns the viewport y origin
 boolean read(java.io.DataInputStream is)
          Reads the JMF file from the specified Stream.
 void reset()
          Resets the internal storage and viewport coordinates.
 void setUrl(java.net.URL newUrl)
          Sets the current URL
 void setVpH(int newValue)
          Sets the viewport height
 void setVpW(int newValue)
          Sets the viewport width
 void setVpX(int newValue)
          Sets the viewport x origin
 void setVpY(int newValue)
          Sets the viewport y origin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numRecords

protected transient int numRecords

numObjects

protected transient int numObjects

lastObjectIdx

public transient int lastObjectIdx

vpX

protected transient int vpX

vpY

protected transient int vpY

vpW

protected transient int vpW

vpH

protected transient int vpH

records

protected transient java.util.Vector records

objectVector

protected transient java.util.Vector objectVector

bReading

protected transient boolean bReading
Constructor Detail

RecordStore

public RecordStore()
Method Detail

reset

public void reset()
Resets the internal storage and viewport coordinates.


read

public boolean read(java.io.DataInputStream is)
             throws java.io.IOException
Reads the JMF file from the specified Stream. A JMF file can be produced using the GConvert utility found at http://www.asd.ie/jmf.htm The JMF format is slightly more compact than the original WMF format and in some cases may produce better handling of colours.

Throws:
java.io.IOException

addObject

public int addObject(int type,
                     java.lang.Object obj)
Adds a GdiObject to the internal handle table. Adds the object at the next free location. This function should not normally be called by an application.


addObjectAt

public int addObjectAt(int type,
                       java.lang.Object obj,
                       int idx)
Adds a GdiObject to the internal handle table. JMF files specify the index as given in EMF records such as EMRCREATEPENINDIRECT whereas WMF files always use 0. This function should not normally be called by an application.


getUrl

public java.net.URL getUrl()
Returns the current URL


setUrl

public void setUrl(java.net.URL newUrl)
Sets the current URL


getObject

public net.xoetrope.deprecated.xui.wmf.GdiObject getObject(int idx)
Returns a GdiObject from the handle table


getRecord

public net.xoetrope.deprecated.xui.wmf.MetaRecord getRecord(int idx)
Returns a meta record.


getNumRecords

public int getNumRecords()
Returns a number of records in the image


getNumObjects

public int getNumObjects()
Returns the number of GdiObjects in the handle table


getVpX

public int getVpX()
Returns the viewport x origin


getVpY

public int getVpY()
Returns the viewport y origin


getVpW

public int getVpW()
Returns the viewport width


getVpH

public int getVpH()
Returns the viewport height


setVpX

public void setVpX(int newValue)
Sets the viewport x origin


setVpY

public void setVpY(int newValue)
Sets the viewport y origin


setVpW

public void setVpW(int newValue)
Sets the viewport width


setVpH

public void setVpH(int newValue)
Sets the viewport height