jview
Class JSplittedDataDisplay

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by jview.AbstractDisplayable
                  extended by jview.JSplittedDataDisplay
All Implemented Interfaces:
Cloneable, EventListener, DataCanvasProviding, DataObserver, Displayable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying
Direct Known Subclasses:
JDataModelDisplay

public class JSplittedDataDisplay
extends AbstractDisplayable
implements DataCanvasProviding, DataObserver

A splitted data display should always be used when two interlinked JDataCanvas should be displayed. A splitted data display defines a master data canvas that displays to the top or left, and a slave data canvas to the bottom or right. If the user zooms in the master, the slave zoom changes according to the KEY_TRANSFER.


Nested Class Summary
static class JSplittedDataDisplay.Show
          Test the splitted display.
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static boolean DEFCONTINUOUS
          Default we want continuopus layout.
private static String DEFLINKDELETE
          Default we link delete actions.
private static double DEFMASTERWEIGHT
          Default weight 50:50.
private static boolean DEFONETOUCH
          Default we want one-touch expandable action.
private static boolean DEFTOPBOTTOM
          Default we synchronize in x, so deliver a top-bottom pane.
static String KEY_CONTINUOUS
          If true, we set continuous layout.
static String KEY_LINKDELETE
          If given, we linke deletes between the two canvas at those sets.
static String KEY_MASTERCANVAS
          The properties of the master canvas.
static String KEY_MASTERWEIGHT
          The master resize weight.
static String KEY_ONETOUCH
          If true, we show a quick enroll button.
static String KEY_SLAVECANVAS
          The properties of the slave canvas.
static String KEY_TOPBOTTOM
          If true, we deploy a top-bottom pane.
static String KEY_TRANSFER
          The class that joins the displays, if null, not joined.
private  JDataCanvas master
          The master canvas, call getMasterCanvas() to draw into it.
private  Map<String,List<DataTransfer>> mastercache
          If dels are linked, we store deletes in the master issued by slave.
private  JDataCanvas slave
          The slave canvas, call getMasterCanvas() to draw into it.
private  Map<String,List<DataTransfer>> slavecache
          If dels are linked, we store deletes in the slaves issued by master.
private  JSplitPane split
          The split pane used to display master and slave canvas.
 
Fields inherited from class jview.AbstractDisplayable
KEY_COMPONENTNAME, KEY_ICON, KEY_INSETS
 
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
JSplittedDataDisplay(Map<String,String> prop)
          Creates a new splitted display.
 
Method Summary
private  JDataCanvas createCanvas(String resource)
          Creates a data canvas from a resource.
 void dataChanged(DataChangeEvent dce)
          This method is called if one of the delete-linked sets cahnged.
 Collection<JDataCanvas> getComposingCanvases()
          Returns the master and the slave canvas.
 JDataCanvas getMainCanvas()
          Returns the master canvas.
 JDataCanvas getMasterCanvas()
          Returns the empty master canvas.
 Component getRepresentation()
          We return a newly instantiated splitted pane here.
 JDataCanvas getSlaveCanvas()
          Returns the empty slave canvas.
 void init()
          Initializes the two data canvas.
private  boolean joinZoom()
          Tries to join the two data canvas together.
 
Methods inherited from class jview.AbstractDisplayable
getComponentName, getIcon, getIcon
 
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, 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
 

Field Detail

KEY_MASTERCANVAS

public static final String KEY_MASTERCANVAS
The properties of the master canvas.

See Also:
Constant Field Values

KEY_SLAVECANVAS

public static final String KEY_SLAVECANVAS
The properties of the slave canvas.

See Also:
Constant Field Values

KEY_LINKDELETE

public static final String KEY_LINKDELETE
If given, we linke deletes between the two canvas at those sets.

See Also:
Constant Field Values

KEY_MASTERWEIGHT

public static final String KEY_MASTERWEIGHT
The master resize weight.

See Also:
Constant Field Values

KEY_TRANSFER

public static final String KEY_TRANSFER
The class that joins the displays, if null, not joined.

See Also:
Constant Field Values

KEY_TOPBOTTOM

public static final String KEY_TOPBOTTOM
If true, we deploy a top-bottom pane.

See Also:
Constant Field Values

KEY_ONETOUCH

public static final String KEY_ONETOUCH
If true, we show a quick enroll button.

See Also:
Constant Field Values

KEY_CONTINUOUS

public static final String KEY_CONTINUOUS
If true, we set continuous layout.

See Also:
Constant Field Values

DEFMASTERWEIGHT

private static final double DEFMASTERWEIGHT
Default weight 50:50.

See Also:
Constant Field Values

DEFTOPBOTTOM

private static final boolean DEFTOPBOTTOM
Default we synchronize in x, so deliver a top-bottom pane.

See Also:
Constant Field Values

DEFONETOUCH

private static final boolean DEFONETOUCH
Default we want one-touch expandable action.

See Also:
Constant Field Values

DEFCONTINUOUS

private static final boolean DEFCONTINUOUS
Default we want continuopus layout.

See Also:
Constant Field Values

DEFLINKDELETE

private static final String DEFLINKDELETE
Default we link delete actions.

See Also:
Constant Field Values

master

private JDataCanvas master
The master canvas, call getMasterCanvas() to draw into it.


mastercache

private Map<String,List<DataTransfer>> mastercache
If dels are linked, we store deletes in the master issued by slave.


slave

private JDataCanvas slave
The slave canvas, call getMasterCanvas() to draw into it.


slavecache

private Map<String,List<DataTransfer>> slavecache
If dels are linked, we store deletes in the slaves issued by master.


split

private JSplitPane split
The split pane used to display master and slave canvas.

Constructor Detail

JSplittedDataDisplay

public JSplittedDataDisplay(Map<String,String> prop)
Creates a new splitted display. The KEY_MASTERCANVAS and KEY_SLAVECANVAS must be set.

Method Detail

init

public void init()
Initializes the two data canvas. Assigns a zoom cursor to it.

Specified by:
init in interface Initializable
Overrides:
init in class PropertyResources

getMainCanvas

public JDataCanvas getMainCanvas()
Returns the master canvas.

Specified by:
getMainCanvas in interface DataCanvasProviding

getComposingCanvases

public Collection<JDataCanvas> getComposingCanvases()
Returns the master and the slave canvas.

Specified by:
getComposingCanvases in interface DataCanvasProviding

joinZoom

private boolean joinZoom()
Tries to join the two data canvas together.


getMasterCanvas

public JDataCanvas getMasterCanvas()
Returns the empty master canvas. This is the method for objects that want to draw on the master canvas once it is constructed.


getSlaveCanvas

public JDataCanvas getSlaveCanvas()
Returns the empty slave canvas. This is the method for objects that want to draw on the slave canvas once it is constructed.


dataChanged

public void dataChanged(DataChangeEvent dce)
This method is called if one of the delete-linked sets cahnged. We scan for data cards in the linked canvas with identical keys and delete them. Additionally, a reference to this delted data is kept locally. If data has been added, we look if there has been delete data in the linked canvas that we can restore.

Specified by:
dataChanged in interface DataObserver

getRepresentation

public Component getRepresentation()
We return a newly instantiated splitted pane here.

Specified by:
getRepresentation in interface Displayable

createCanvas

private JDataCanvas createCanvas(String resource)
Creates a data canvas from a resource.