org.diamondspin
Interface DSEngine

All Known Implementing Classes:
DSDefaultEngine, DSDiamondEngine, DSEmeraldEngine, DSEngineForN, DSRectLinearEngine, DSUserCenteredEngine

public interface DSEngine

A DSEngine is an interface for the object which can rotate/translate/scale the elements.
with the 1.1 version you may have to modify all your code with the following regexp : transformTable\(\n?(.*),\s*\n?(.*),\s*\n?(.*),\s*\n?(.*),\s*\n?(.*),\s*true\) transformTable\($1, $2, $3, $4, $5, DSEngine.STROKE) OR transformTable\($1, $2, $3, $4, $5, DSEngine.MENUBAR) OR transformTable\($1, $2, $3, $4, $5, DSEngine.ELEMENT)

Copyright 2002-2009 DiamondSpin project. All Rights Reserved.

Permission to use, copy, modify and distribute this software and its documentation for educational, research and non-profit purposes, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and the following three paragraphs appear in all copies.

To request Permission to incorporate this software into commercial products contact one of the authors of the project.
  • Frederic Vernier (frederic.vernier@limsi.fr)
  • Chia Shen (chia_shen@harvard.edu)
  • Guillaume Besacier (guillaume.besacier@limsi.fr)
  • Daniel Wigdor (dwigdor@microsoft.com)

IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHORS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

THE AUTHORS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE AUTHORS HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

creation date: 06/03/2003

Version:
: 1.1
Author:
: Frederic vernier, (frederic.vernier@gmail.com) under Chia Shen supervision (chia_shen@harvard.edu).

Field Summary
static int BETA_ABS
           
static int DRAG_ELEMENT
           
static int ELEMENT
           
static int MENUBAR
           
static int POPUPMENU
           
static int STROKE
           
 
Method Summary
 boolean isMenubarCircular()
          tells to DSMenubar which policy to choose to draw the border of the menubar
 AffineTransform transformTable(double d, double alpha, double beta, double scale, double tangle, double tzoom, int elementType, int userid)
          Return an AffineTransform object to apply to a Graphics2D before drawing an element.
 

Field Detail

ELEMENT

static final int ELEMENT
See Also:
Constant Field Values

DRAG_ELEMENT

static final int DRAG_ELEMENT
See Also:
Constant Field Values

MENUBAR

static final int MENUBAR
See Also:
Constant Field Values

STROKE

static final int STROKE
See Also:
Constant Field Values

POPUPMENU

static final int POPUPMENU
See Also:
Constant Field Values

BETA_ABS

static final int BETA_ABS
See Also:
Constant Field Values
Method Detail

transformTable

AffineTransform transformTable(double d,
                               double alpha,
                               double beta,
                               double scale,
                               double tangle,
                               double tzoom,
                               int elementType,
                               int userid)
Return an AffineTransform object to apply to a Graphics2D before drawing an element.

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
elementType - 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

isMenubarCircular

boolean isMenubarCircular()
tells to DSMenubar which policy to choose to draw the border of the menubar



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