|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.diamondspin.DSDefaultEngine
public class DSDefaultEngine
DSDefaultEngine implements a default transformation engine. Support panning through connection with the view
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.
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. |
Field Summary | |
---|---|
protected DSTabletopPane |
dsTabletopPane
|
Fields inherited from interface org.diamondspin.DSEngine |
---|
BETA_ABS, DRAG_ELEMENT, ELEMENT, MENUBAR, POPUPMENU, STROKE |
Constructor Summary | |
---|---|
DSDefaultEngine(DSTabletopPane dsTabletopPane)
|
Method Summary | |
---|---|
static double |
getScale(double d,
double alpha,
double scale,
DSTabletopPane dsTabletopPane)
This could be seen as part of the transformTable() method but it is better to separate it so element can call it to know which scale factro was really used by the matrix. |
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 elType,
int userid)
Return an AffineTransform object to apply to a Graphics2D before drawing an element. |
protected static AffineTransform |
transformTable(double d,
double alpha,
double beta,
double scale,
double tangle,
double tzoom,
int elType,
int userid,
DSTabletopPane dsTabletopPane)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DSTabletopPane dsTabletopPane
Constructor Detail |
---|
public DSDefaultEngine(DSTabletopPane dsTabletopPane)
Method Detail |
---|
public boolean isMenubarCircular()
DSEngine
isMenubarCircular
in interface DSEngine
public AffineTransform transformTable(double d, double alpha, double beta, double scale, double tangle, double tzoom, int elType, int userid)
DSEngine
transformTable
in interface DSEngine
d
- the distance from the center of the table to the center of the element. 0.5 means between the center and the borderalpha
- the angle of the element. Angle around the center of the table (trigonometric system)beta
- angle around the center of the elementscale
- the scale factor. may be modified by a blackhole or fisheye techniquetangle
- the angle of the whole table to add it to Alpha. 0 when dragged and = angle of the view otherwisetzoom
- the scale of the whole tableelType
- element type tells if the element is metalic or not then subject to magnetization !userid
- user id of the owner of element to transform
protected static AffineTransform transformTable(double d, double alpha, double beta, double scale, double tangle, double tzoom, int elType, int userid, DSTabletopPane dsTabletopPane)
public static double getScale(double d, double alpha, double scale, DSTabletopPane dsTabletopPane)
d
- the distance from the center of the table to the center of the elementalpha
- the angle of the elementscale
- the scale factor. may be modified by the DSTabletopPane.BLACKHOLE or central focusdsTabletopPane
- Description of the Parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |