org.diamondspin
Class DSPiler

java.lang.Object
  extended by org.diamondspin.DSElementAdapter
      extended by org.diamondspin.DSPiler
All Implemented Interfaces:
EventListener, DSElementListener

public class DSPiler
extends DSElementAdapter

able to listen a frame and enslave it when it is inserted into a folded document

Author:
guillaume besacier

Field Summary
protected  DSDefaultView defaultview
           
protected  DSSideHandler dssh
           
static int ELEM_DRAGGED
           
static int ELEM_OVER_ONE_SIDE
           
static int ELEM_OVER_PILE
           
static int ELEM_PILED
           
protected  DSFrame frame
           
protected  int state
           
protected  long time
           
 
Constructor Summary
DSPiler(DSFrame f, DSDefaultView dsv)
           
 
Method Summary
 void elementDropped(DSElementEvent evt)
          Invoked when the DSelement is dropped (then it was drag&dropped by the user)
 boolean elementGrabbing(DSElementEvent evt)
          Invoked when the DSelement is beieng grabbed.
 void elementMoved(DSElementEvent evt)
          Invoked when the DSelement is moved (d or alpha)
protected  boolean needClip(DSFrame m, DSFrame s)
          Basicaly does the same calculation than updateClip without actually changing the clip
 void pile(DSFrame master)
           
 String toString()
           
protected  void updateClip(DSFrame m, DSFrame s)
          Update clipping of the slave (s) when piling in folded master (m)
 
Methods inherited from class org.diamondspin.DSElementAdapter
elementCenterChanged, elementContentRepainted, elementDemoted, elementDropped, elementFolded, elementFolded, elementGrabbing, elementMoved, elementResized, elementResized, elementRotated, elementRotated, elementZoomed, elementZoomed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ELEM_DRAGGED

public static final int ELEM_DRAGGED
See Also:
Constant Field Values

ELEM_OVER_ONE_SIDE

public static final int ELEM_OVER_ONE_SIDE
See Also:
Constant Field Values

ELEM_OVER_PILE

public static final int ELEM_OVER_PILE
See Also:
Constant Field Values

ELEM_PILED

public static final int ELEM_PILED
See Also:
Constant Field Values

state

protected int state

dssh

protected DSSideHandler dssh

frame

protected DSFrame frame

defaultview

protected DSDefaultView defaultview

time

protected long time
Constructor Detail

DSPiler

public DSPiler(DSFrame f,
               DSDefaultView dsv)
Parameters:
f - the frame to pile
dsv - the view where the piling occurs
Method Detail

pile

public void pile(DSFrame master)

elementMoved

public void elementMoved(DSElementEvent evt)
Description copied from interface: DSElementListener
Invoked when the DSelement is moved (d or alpha)

Specified by:
elementMoved in interface DSElementListener
Overrides:
elementMoved in class DSElementAdapter

needClip

protected boolean needClip(DSFrame m,
                           DSFrame s)
Basicaly does the same calculation than updateClip without actually changing the clip


updateClip

protected void updateClip(DSFrame m,
                          DSFrame s)
Update clipping of the slave (s) when piling in folded master (m)


elementGrabbing

public boolean elementGrabbing(DSElementEvent evt)
Description copied from interface: DSElementListener
Invoked when the DSelement is beieng grabbed. Must return false if don't want to be grabbed

Specified by:
elementGrabbing in interface DSElementListener
Overrides:
elementGrabbing in class DSElementAdapter

elementDropped

public void elementDropped(DSElementEvent evt)
Description copied from interface: DSElementListener
Invoked when the DSelement is dropped (then it was drag&dropped by the user)

Specified by:
elementDropped in interface DSElementListener
Overrides:
elementDropped in class DSElementAdapter

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006 Frederic Vernier(LIMSI) Chia Shen(MERL) Guillaume Besacier(LIMSI). All Rights Reserved.