org.diamondspin
Class DSUserCenteredEngine

java.lang.Object
  extended by org.diamondspin.DSUserCenteredEngine
All Implemented Interfaces:
DSEngine

public class DSUserCenteredEngine
extends Object
implements DSEngine

Author:
vernier

Nested Class Summary
static class DSUserCenteredEngine.UserSide
           
 
Field Summary
protected  DSTabletopPane dsTabletopPane
           
 
Fields inherited from interface org.diamondspin.DSEngine
BETA_ABS, DRAG_ELEMENT, ELEMENT, MENUBAR, POPUPMENU, STROKE
 
Constructor Summary
DSUserCenteredEngine(DSTabletopPane dsTabletopPane_Arg)
          Creates a new instance of DSUserCenteredEngine
 
Method Summary
 double getDistUser()
           
static int getFirstUserForSide(DSTabletopPane dsTabletopPane, DSUserCenteredEngine.UserSide side)
           
static DSMenuBar getMenuBarForUserID(DSTabletopPane dsTabletopPane, int userid)
           
static DSUserCenteredEngine.UserSide getSide(DSTabletopPane dsTabletopPane, double angle)
           
static DSUserCenteredEngine.UserSide getSideForUserID(DSTabletopPane dsTabletopPane, int userid)
           
 boolean isMenubarCircular()
          tells to DSMenubar which policy to choose to draw the border of the menubar
 void setDistUser(double distUser)
           
 AffineTransform transformTable(double d, double alpha, double beta, double scale, double tangle, double tzoom, int elType, int userid)
          Return an AffineTransform object to apply to a Graphics2D before drawing an element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dsTabletopPane

protected DSTabletopPane dsTabletopPane
Constructor Detail

DSUserCenteredEngine

public DSUserCenteredEngine(DSTabletopPane dsTabletopPane_Arg)
Creates a new instance of DSUserCenteredEngine

Method Detail

isMenubarCircular

public boolean isMenubarCircular()
Description copied from interface: DSEngine
tells to DSMenubar which policy to choose to draw the border of the menubar

Specified by:
isMenubarCircular in interface DSEngine

transformTable

public AffineTransform transformTable(double d,
                                      double alpha,
                                      double beta,
                                      double scale,
                                      double tangle,
                                      double tzoom,
                                      int elType,
                                      int userid)
Description copied from interface: DSEngine
Return an AffineTransform object to apply to a Graphics2D before drawing an element.

Specified by:
transformTable in interface DSEngine
Parameters:
d - the distance from the center of the table to the center of the element. 0.5 means between the center and the border
alpha - the angle of the element. Angle around the center of the table (trigonometric system)
beta - angle around the center of the element
scale - the scale factor. may be modified by a blackhole or fisheye technique
tangle - the angle of the whole table to add it to Alpha. 0 when dragged and = angle of the view otherwise
tzoom - the scale of the whole table
elType - element type tells if the element is metalic or not then subject to magnetization !
userid - user id of the owner of element to transform
Returns:
a transformation matrix decribing the element rotations, scale, translation according to the parameter values

getDistUser

public double getDistUser()

setDistUser

public void setDistUser(double distUser)

getSide

public static DSUserCenteredEngine.UserSide getSide(DSTabletopPane dsTabletopPane,
                                                    double angle)

getSideForUserID

public static DSUserCenteredEngine.UserSide getSideForUserID(DSTabletopPane dsTabletopPane,
                                                             int userid)

getMenuBarForUserID

public static DSMenuBar getMenuBarForUserID(DSTabletopPane dsTabletopPane,
                                            int userid)

getFirstUserForSide

public static int getFirstUserForSide(DSTabletopPane dsTabletopPane,
                                      DSUserCenteredEngine.UserSide side)


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