jview
Class JViewportCanvas.ViewportKey

java.lang.Object
  extended by jview.JViewportCanvas.ViewportKey
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
JObjectComponent.ObjectKey
Enclosing class:
JViewportCanvas

public abstract static class JViewportCanvas.ViewportKey
extends Object
implements Serializable

The class that allows selecting of only a portion of an JViewport . It contains a normalized viewport. It implements Serializable and serializes its mostly non-serializable Rectangle2D (I think its an insult that sun did fix this only in 1.6.3, as it was reported already agains 1.2.2).
The class is abstract to force subclassing

See Also:
Serialized Form

Field Summary
private  Rectangle2D view
          The normalized view in this tab.
 
Constructor Summary
protected JViewportCanvas.ViewportKey(Rectangle2D zoom)
          Constructs a new key from the tab name and the current zoom.
 
Method Summary
 Rectangle2D getView()
          Returns the zoom.
private  void readObject(ObjectInputStream in)
          To allow serialization, we read the rectangle after the default object as four doubles.
private  void writeObject(ObjectOutputStream out)
          To allow serialization, we write the rectangle after the default object as four doubles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

view

private transient Rectangle2D view
The normalized view in this tab. Transient to allow serialize.

Constructor Detail

JViewportCanvas.ViewportKey

protected JViewportCanvas.ViewportKey(Rectangle2D zoom)
Constructs a new key from the tab name and the current zoom.

Method Detail

getView

public Rectangle2D getView()
Returns the zoom.


writeObject

private void writeObject(ObjectOutputStream out)
                  throws IOException
To allow serialization, we write the rectangle after the default object as four doubles.

Throws:
IOException

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
To allow serialization, we read the rectangle after the default object as four doubles.

Throws:
IOException
ClassNotFoundException