org.diamondspin
Class DSFoldingManager

java.lang.Object
  extended by org.diamondspin.DSFoldingManager
All Implemented Interfaces:
Serializable

public class DSFoldingManager
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
static int ALL_FOLD
           
protected  Shape backClippingShape
           
protected  Graphics2D backGraphics
           
protected  BufferedImage backImage
           
protected  float backOpacity
           
protected  boolean corner_fold_back
           
protected  boolean corner_rotation_back
           
protected  boolean corners_resize_BR_back
           
protected  boolean corners_resize_TL_back
           
protected  DSFrame element
           
protected  boolean foldable
           
protected  double foldAngle
           
protected  Point2D.Double foldPoint
           
protected  Point2D.Double foldPoint1
           
protected  Point2D.Double foldPoint2
           
protected  double foldProportion
           
protected  boolean foldReverse
           
protected  Polygon foldShapeBack
           
protected  Polygon foldShapeFront
           
protected  int foldType
           
protected  Shape frontClippingShape
           
protected  Graphics2D frontGraphics
           
protected  BufferedImage frontImage
           
protected  float frontOpacity
           
protected  Shape globalClippingShape
           
static int LB_FOLD
           
static int LR_FOLD
           
static int NO_FOLD
           
static int TB_FOLD
           
static int TR_FOLD
           
 
Constructor Summary
DSFoldingManager(DSFrame frame)
           
 
Method Summary
protected  void applyBackClip(Graphics2D g)
           
protected  void applyFrontClip(Graphics2D g)
           
 void fold(Point2D.Double p)
          Fold the frame.
protected  void fold(Point2D.Double p, int cause)
           
 Shape getBackClippingShape()
           
 BufferedImage getBackImage()
           
 float getBackOpacity()
           
 Point2D.Double getFoldPoint()
           
 Point2D.Double getFoldPoint1()
           
 Point2D.Double getFoldPoint2()
           
 double getFoldProportion()
           
 Shape getFoldShapeBack()
           
 Shape getFoldShapeFront()
           
 int getFoldType()
           
 Shape getFrontClippingShape()
           
 BufferedImage getFrontImage()
           
 float getFrontOpacity()
           
 Shape getGlobalClippingShape()
           
protected  void init()
          initialize usefull ressources
 boolean isClip()
           
 boolean isCornerFold_back()
           
 boolean isCornerResizeBR_back()
           
 boolean isCornerResizeTL_back()
           
 boolean isCornerRotation_back()
           
 boolean isFoldable()
           
 boolean isFolded()
           
 boolean isFoldReverse()
           
 void paint(Graphics2D g)
           
 void setBackClippingShape(Shape backClippingShape)
          set the clipping Shape used to restrict the painting
 void setBackOpacity(float backOpacity)
           
 void setFoldable(boolean f)
           
 void setFoldReverse(boolean fr)
           
 void setFrontClippingShape(Shape frontClippingShape)
          set the clipping Shape used to restrict the painting
 void setFrontOpacity(float frontOpacity)
           
 void setGlobalClippingShape(Shape globalClippingShape)
          set the clipping Shape used to restrict the painting
 void transformLocalToBack(AffineTransform local)
          transform a transformation matrix to take into accoud folding
protected  void unfold(int cause)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

protected DSFrame element

frontImage

protected transient BufferedImage frontImage

backImage

protected transient BufferedImage backImage

frontGraphics

protected transient Graphics2D frontGraphics

backGraphics

protected transient Graphics2D backGraphics

globalClippingShape

protected transient Shape globalClippingShape

frontClippingShape

protected transient Shape frontClippingShape

backClippingShape

protected transient Shape backClippingShape

foldable

protected boolean foldable

foldReverse

protected boolean foldReverse

foldShapeFront

protected Polygon foldShapeFront

foldShapeBack

protected Polygon foldShapeBack

foldPoint

protected Point2D.Double foldPoint

foldAngle

protected double foldAngle

backOpacity

protected float backOpacity

frontOpacity

protected float frontOpacity

foldProportion

protected double foldProportion

foldPoint1

protected Point2D.Double foldPoint1

foldPoint2

protected Point2D.Double foldPoint2

corners_resize_TL_back

protected boolean corners_resize_TL_back

corners_resize_BR_back

protected boolean corners_resize_BR_back

corner_rotation_back

protected boolean corner_rotation_back

corner_fold_back

protected boolean corner_fold_back

ALL_FOLD

public static final int ALL_FOLD
See Also:
Constant Field Values

NO_FOLD

public static final int NO_FOLD
See Also:
Constant Field Values

TR_FOLD

public static final int TR_FOLD
See Also:
Constant Field Values

LR_FOLD

public static final int LR_FOLD
See Also:
Constant Field Values

TB_FOLD

public static final int TB_FOLD
See Also:
Constant Field Values

LB_FOLD

public static final int LB_FOLD
See Also:
Constant Field Values

foldType

protected int foldType
Constructor Detail

DSFoldingManager

public DSFoldingManager(DSFrame frame)
Method Detail

isFolded

public boolean isFolded()
Returns:
Is the DSFrame curently folded ?

isFoldable

public boolean isFoldable()
Returns:
Is the DSFrame foldable ?

setFoldable

public void setFoldable(boolean f)
Parameters:
f - Is the DSFrame foldable ? If not, the DSFrame is first unfolded with cause NO_MORE_ALLOWED.

isFoldReverse

public boolean isFoldReverse()
Returns:
Is the backpane model a recto verso one (true) or a transparent slide (false) one ?

setFoldReverse

public void setFoldReverse(boolean fr)
Parameters:
fr - Is the backpane model a recto verso one (true) or a transparent slide (false) one ?

setFrontClippingShape

public void setFrontClippingShape(Shape frontClippingShape)
set the clipping Shape used to restrict the painting


getFrontClippingShape

public Shape getFrontClippingShape()
Returns:
the clipping Shape used to restrict the painting

setBackClippingShape

public void setBackClippingShape(Shape backClippingShape)
set the clipping Shape used to restrict the painting


getBackClippingShape

public Shape getBackClippingShape()
Returns:
the clipping Shape used to restrict the painting

setGlobalClippingShape

public void setGlobalClippingShape(Shape globalClippingShape)
set the clipping Shape used to restrict the painting


getGlobalClippingShape

public Shape getGlobalClippingShape()
Returns:
the clipping Shape used to restrict the painting

isClip

public boolean isClip()
Returns:
if a clipping Shape is used

unfold

protected void unfold(int cause)

transformLocalToBack

public void transformLocalToBack(AffineTransform local)
transform a transformation matrix to take into accoud folding

To do:
take foldReverse into account !

fold

public void fold(Point2D.Double p)
Fold the frame. The folded corner is put in P. P is in local coordinate.


fold

protected void fold(Point2D.Double p,
                    int cause)

init

protected void init()
initialize usefull ressources


paint

public void paint(Graphics2D g)

getFrontImage

public BufferedImage getFrontImage()

getBackImage

public BufferedImage getBackImage()

getFoldShapeFront

public Shape getFoldShapeFront()

getFoldShapeBack

public Shape getFoldShapeBack()

isCornerResizeTL_back

public boolean isCornerResizeTL_back()

isCornerResizeBR_back

public boolean isCornerResizeBR_back()

isCornerRotation_back

public boolean isCornerRotation_back()

isCornerFold_back

public boolean isCornerFold_back()

getBackOpacity

public float getBackOpacity()

setBackOpacity

public void setBackOpacity(float backOpacity)

getFrontOpacity

public float getFrontOpacity()

setFrontOpacity

public void setFrontOpacity(float frontOpacity)

getFoldProportion

public double getFoldProportion()

getFoldType

public int getFoldType()

getFoldPoint

public Point2D.Double getFoldPoint()

getFoldPoint1

public Point2D.Double getFoldPoint1()

getFoldPoint2

public Point2D.Double getFoldPoint2()

applyFrontClip

protected void applyFrontClip(Graphics2D g)

applyBackClip

protected void applyBackClip(Graphics2D g)


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