jview
Class TransferX

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by jview.AbstractTransferProxy
                  extended by jview.TransferX
All Implemented Interfaces:
Cloneable, ViewportTransferring, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class TransferX
extends AbstractTransferProxy

A transfer function that converts the normalized selected rectangle on the source graph into a normalized rectangle on the slave graph by keeping the x-selection, but widing the y-selection to the entire display space. Inparticular this means that the incoming view is transferred to user space with the source's UserCoordinates transform. We then keep the x-bounds and query the slave for its y-span. This y-span together with the x-bounds is now normalized using the slave's coordinate transform.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static int DEFXINDEX
          If the source canvas uses not the first index as x-coordinate.
static String KEY_XINDEX
          The index of the x-component.
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
TransferX(JViewportCanvas slave)
          Chains.
 
Method Summary
protected  Rectangle2D getAttachedView(Object src, Rectangle2D view, JViewportCanvas on)
          Converts to a zommable rectangle if the source is a UserCoordinates instance and if the attached slave is a data canvas.
 
Methods inherited from class jview.AbstractTransferProxy
getBottomRight, getUpLeft, transferViewport
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Field Detail

KEY_XINDEX

public static final String KEY_XINDEX
The index of the x-component.

See Also:
Constant Field Values

DEFXINDEX

private static final int DEFXINDEX
If the source canvas uses not the first index as x-coordinate.

See Also:
Constant Field Values
Constructor Detail

TransferX

public TransferX(JViewportCanvas slave)
Chains.

Method Detail

getAttachedView

protected Rectangle2D getAttachedView(Object src,
                                      Rectangle2D view,
                                      JViewportCanvas on)
Converts to a zommable rectangle if the source is a UserCoordinates instance and if the attached slave is a data canvas. If so, we keep the x-bounds from the selection's upper-left and lower-right corner and add the y-span from the slave. We re-transfer to normalized using the slave. If any process fails, we return null.

Specified by:
getAttachedView in class AbstractTransferProxy