|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DSElement
A DSElement is the interface every element present on the table must implement.
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 | |
---|---|
static int |
HIGH_QUALITY
According to the repaint speed of rotated element it can be interesting to distinguish when a high quality repaint is necessary and when a low quality repaint is enough. |
static int |
LOW_QUALITY
According to the repaint speed of rotated element it can be interesting to distinguish when a high quality repaint is necessary and when a low quality repaint is enough. |
Method Summary | |
---|---|
boolean |
acceptSlavery(DSElement dsElement)
tells if this dselement accept to be slave of an other one. |
boolean |
acceptSlaveryRelease()
tells if I accept to be released |
void |
addDSElementListener(DSElementListener DSElementListener_Arg)
I'm a element so I can dispatch DSElement events to the listener which suscribe through this method |
boolean |
doesContain(double x,
double y)
Description of the Method |
double |
getAbsoluteScale()
Gets the Absolute Scale attribute of the DSElement object |
double |
getAlpha()
The degrees of freedom of the DSElements are their distance to the center, their angle comparing to the right direction (from center to the ful right), a scale (for zooming features) and |
double |
getBeta()
The angle around its center |
double |
getD()
The degrees of freedom of the DSElements are their distance to the center, their angle comparing to the right direction (from center to the ful right), a scale (for zooming features) and |
int |
getHeight()
Elements are displayed around their center (not around their top left corner) Width and Height are the amount of space used by the repaint. |
int |
getIDOwner()
Gets the iDOwner attribute of the DSElement object |
double |
getScale()
The degrees of freedom of the DSElements are their distance to the center, their angle comparing to the right direction (from center to the ful right), a scale (for zooming features) and |
AffineTransform |
getTransform()
The matrix decribing how this element is transformed before rendering |
int |
getWidth()
Elements are displayed around their center (not around their top left corner) Width and Height are the amount of space used by the repaint. |
boolean |
grabElement(int DX_Arg,
int DY_Arg)
Simulate the element has been dragged. |
boolean |
isActive()
in the centralized architecture we have some elements are in the views and one or few element are handled directly by the DSTabletopPane as drag&dropped elements. |
boolean |
isBetaAbs()
indicate how to use beta. |
boolean |
isMouseTarget(MouseEvent MouseEvent_Arg)
tell whether a mouse click is within a certain element without actually selecting that element |
boolean |
isVisible()
|
void |
mouseClicked(MouseEvent MouseEvent_Arg)
mouse callbacks the DSTabletopPane or the view will call |
void |
mouseDragged(MouseEvent MouseEvent_Arg)
mouse callbacks the DSTabletopPane or the view will call |
void |
mouseMoved(MouseEvent MouseEvent_Arg)
mouse callbacks the DSTabletopPane or the view will call |
void |
mousePressed(MouseEvent MouseEvent_Arg)
mouse callbacks the DSTabletopPane or the view will call |
void |
mouseReleased(MouseEvent MouseEvent_Arg)
mouse callbacks the DSTabletopPane or the view will call |
void |
moveElementCenterTo(Point2D.Double touchPoint)
MERRIE??? |
void |
paint(Graphics Graphics_Arg)
the default paint method. |
void |
paint(Graphics2D Graphics_Arg,
int Quality)
According to the repaint speed of rotated element it can be interesting to distinguish when a high quality repaint is necessary and when a low quality repaint is enough. |
void |
removeDSElementListener(DSElementListener DSElementListener_Arg)
remove a listener |
void |
setActive(boolean Active_Arg)
in the centralized architecture we have some elements are in the views and one or few element are handled directly by the DSTabletopPane as drag&dropped elements. |
void |
setAlpha(double alpha)
The degrees of freedom of the DSElements are their distance to the center, their angle comparing to the right direction (from center to the ful right), a scale (for zooming features) and |
void |
setBeta(double alpha)
The angle around its center |
void |
setBetaAbs(boolean betaAbs)
change how to use beta. |
void |
setD(double d)
The degrees of freedom of the DSElements are their distance to the center, their angle comparing to the right direction (from center to the ful right), a scale (for zooming features) and |
void |
setIDOwner(int Id)
elements can have an owner associated with them -1 means no owner |
void |
setScale(double scale)
The degrees of freedom of the DSElements are their distance to the center, their angle comparing to the right direction (from center to the ful right), a scale (for zooming features) and |
void |
setSize(int Width_Arg,
int Height_Arg)
Elements are displayed around their center (not around their top left corner) Width and Height are the amount of space used by the repaint. |
void |
setVisible(boolean visible_Arg)
say if the component is visible |
Field Detail |
---|
static final int LOW_QUALITY
static final int HIGH_QUALITY
Method Detail |
---|
double getD()
void setD(double d)
d
- The new d valuedouble getAlpha()
void setAlpha(double alpha)
alpha
- The new alpha valuedouble getBeta()
void setBeta(double alpha)
alpha
- The new beta valueboolean isBetaAbs()
void setBetaAbs(boolean betaAbs)
double getScale()
void setScale(double scale)
scale
- The new scale valueAffineTransform getTransform()
void setActive(boolean Active_Arg)
Active_Arg
- The new active valueboolean isActive()
int getWidth()
int getHeight()
void setSize(int Width_Arg, int Height_Arg)
Width_Arg
- The new size valueHeight_Arg
- The new size valuevoid paint(Graphics2D Graphics_Arg, int Quality)
Graphics_Arg
- Description of the ParameterQuality
- Description of the Parametervoid paint(Graphics Graphics_Arg)
Graphics_Arg
- Description of the Parametervoid addDSElementListener(DSElementListener DSElementListener_Arg)
DSElementListener_Arg
- The feature to be added to the DSElementListener attributevoid removeDSElementListener(DSElementListener DSElementListener_Arg)
DSElementListener_Arg
- Description of the Parametervoid mouseDragged(MouseEvent MouseEvent_Arg)
MouseEvent_Arg
- Description of the Parametervoid mouseReleased(MouseEvent MouseEvent_Arg)
MouseEvent_Arg
- Description of the Parametervoid mouseClicked(MouseEvent MouseEvent_Arg)
MouseEvent_Arg
- Description of the Parametervoid mouseMoved(MouseEvent MouseEvent_Arg)
MouseEvent_Arg
- Description of the Parametervoid mousePressed(MouseEvent MouseEvent_Arg)
MouseEvent_Arg
- Description of the Parameterboolean grabElement(int DX_Arg, int DY_Arg)
DX_Arg
- Description of the ParameterDY_Arg
- Description of the Parameterboolean isMouseTarget(MouseEvent MouseEvent_Arg)
MouseEvent_Arg
- Description of the Parameter
boolean doesContain(double x, double y)
x
- Description of the Parametery
- Description of the Parameter
void setIDOwner(int Id)
Id
- The new iDOwner valueint getIDOwner()
void setVisible(boolean visible_Arg)
visible_Arg
- The new visibility valueboolean isVisible()
double getAbsoluteScale()
void moveElementCenterTo(Point2D.Double touchPoint)
touchPoint
- Description of the Parameterboolean acceptSlavery(DSElement dsElement)
boolean acceptSlaveryRelease()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |