|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
jview.AbstractTransferProxy
public abstract class AbstractTransferProxy
An abstract transfer proxy acts as the base class for a superior instance
that keeps track of different JViewportCanvas' and knows how to
transfer incoming zoom changes. Its concrete subclasses should be rather
lightweight to allow easy incorporation within other objects, like
display frames.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyContainer |
|---|
PropertyContainer.URLResource |
| Field Summary | |
|---|---|
private JViewportCanvas |
attached
This is the viewport that should be served. |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES |
| Fields inherited from interface util.PropertyBearing |
|---|
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Constructor Summary | |
|---|---|
protected |
AbstractTransferProxy(JViewportCanvas link)
The only allowed construction is via the concrete canvas. |
| Method Summary | |
|---|---|
protected abstract Rectangle2D |
getAttachedView(Object src,
Rectangle2D view,
JViewportCanvas on)
This method calculates the zoom factor that should be applied on the attached viewport. |
protected static VectorG |
getBottomRight(UserCoordinates src,
Rectangle2D norm)
Returns the bottom-right corner in user space of a normalized rectangle using the provided UserCoordinates. |
protected static VectorG |
getUpLeft(UserCoordinates src,
Rectangle2D norm)
Returns the upper-left corner in user space of a normalized rectangle using the provided UserCoordinates. |
boolean |
transferViewport(Object from,
Rectangle2D view)
This method forks to getAttachedView(java.lang.Object, java.awt.geom.Rectangle2D, jview.JViewportCanvas) using my attached
viewport as the argument. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private JViewportCanvas attached
| Constructor Detail |
|---|
protected AbstractTransferProxy(JViewportCanvas link)
| Method Detail |
|---|
protected abstract Rectangle2D getAttachedView(Object src,
Rectangle2D view,
JViewportCanvas on)
public boolean transferViewport(Object from,
Rectangle2D view)
getAttachedView(java.lang.Object, java.awt.geom.Rectangle2D, jview.JViewportCanvas) using my attached
viewport as the argument. If a non-null rectangle is returned, the
attached viewport is zoomed accordingly. We return true if we can
zoom and our attached canvas returns true, otherwise we return false.
transferViewport in interface ViewportTransferring
protected static VectorG getUpLeft(UserCoordinates src,
Rectangle2D norm)
UserCoordinates.
protected static VectorG getBottomRight(UserCoordinates src,
Rectangle2D norm)
UserCoordinates.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||