|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.diamondspin.DSView org.diamondspin.DSDefaultView
public class DSDefaultView
DSDefaultView is a generic object with all the common functionnalities like annotation, element list, etc..
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 |
ANNOTATE_MODE
|
static int |
DEMOTE_MODE
|
static int |
DRAG_MODE
|
protected int[] |
dragMode
mode of what happen when an user hits the background of the view and start moving ... |
static int |
DRAW_MODE
|
protected List<DSElement> |
elemList
list of the elements present in the view |
static int |
ERASE_MODE
|
static int |
LASSO_MODE
|
static int |
NOTHING_MODE
|
static int |
PAN_BCKGRND_MODE
|
static int |
PAN_MODE
|
static int |
PAN_VIEW_MODE
|
protected boolean |
pilableDSFrames
|
static int |
RECT_MODE
|
static int |
ROTATE_BCKGRND_MODE
|
static int |
ROTATE_MODE
|
static int |
ROTATE_VIEW_MODE
|
static int |
ZOOM_BCKGRND_MODE
|
static int |
ZOOM_MODE
|
static int |
ZOOM_VIEW_MODE
|
Fields inherited from class org.diamondspin.DSView |
---|
backgroundAngle, backgroundCenter, backgroundImage, backgroundMarginX, backgroundMarginY, backgroundPaint, backgroundZoom, dsTabletopPane, FOLDED_HEIGHT_PERCENTAGE, FOLDED_WIDTH_PERCENTAGE, foldedHeightPercentage, foldedWidthPercentage, oldBackgroundAngle, oldBackgroundCenter, oldBackgroundZoom, resizedBackground, viewListeners |
Fields inherited from interface org.diamondspin.DSConstants |
---|
COLLAGE_TOP_COLOR, COLLAGE_TOP_THICKNESS, DRAW_COLLAGE_TOP |
Constructor Summary | |
---|---|
DSDefaultView(DSTabletopPane dsTabletopPane)
Construct the view for the specified number of users. |
Method Summary | |
---|---|
void |
addDSElement(DSElement elem)
add an element under everything |
void |
addDSElement(int pos,
DSElement elem)
insert an element exactly where you want in the list of elements |
void |
addDSViewContentListener(DSViewContentListener l)
a view listen for all its element and can forward event to listeners registered to view |
void |
clear()
remove ALL the elements from this view |
boolean |
containsDSElement(DSElement elem)
|
void |
demoteAllElementsToTable()
demote all drag element in the view |
void |
demoteElementToTable(DSElement elem)
take the drag element of DSTabletopPane and put it in my list |
void |
fireElementAdded(DSElement el)
a view listen for all its element and can forward event to listeners registered to view |
void |
fireElementDrawn(DSElement el)
|
void |
fireElementPiled(DSElement el)
|
void |
fireElementRemoved(DSElement el)
|
void |
fireMoveAll()
|
int |
getDragMode()
|
int |
getDragMode(int userID)
|
List<DSElement> |
getElementList()
|
boolean |
isPilableDSFrames()
|
void |
mouseClicked(MouseEvent event)
handle click on element |
void |
mouseDragged(MouseEvent event)
mouseDragged callback |
void |
mousePressed(MouseEvent event)
see if clicked on one element |
void |
mousePressedBehindElements(MouseEvent event)
|
void |
mouseReleased(MouseEvent event)
handle click on element |
void |
openPopupMenuElement(double d,
double alpha,
DSElement DSElement_Arg,
int Id)
open the popup menu for a given element |
void |
paint(Graphics2D Graphics_Arg)
paint the elements |
void |
promoteElementToTable(DSElement element,
int id)
take the drag element in the list and promote it as dragobject of the DSTabletopPane |
void |
removeElement(DSElement el)
remove an element of the view |
void |
removeViewContentListener(DSViewContentListener l)
|
void |
resetAllBeta()
reset all beta angles of element to zero |
void |
setDragMode(int dragMode)
|
void |
setDragMode(int userID,
int dragMode)
|
void |
setPilableDSFrames(boolean pilableDSFrames)
|
protected DSElement |
strokeAt(double x,
double y,
DSStroke stroke)
Take a stroke and see if it can apply to an element here. |
protected boolean |
strokeOn(double x,
double y,
DSStroke stroke,
DSElement el)
Take a stroke and see if it can apply to an element here. |
void |
switchDSElements(int pos0,
int pos1)
insert an element exactly where you want in the list of elements |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final List<DSElement> elemList
protected boolean pilableDSFrames
protected int[] dragMode
public static final int NOTHING_MODE
public static final int ROTATE_MODE
public static final int DRAG_MODE
public static final int PAN_BCKGRND_MODE
public static final int ROTATE_BCKGRND_MODE
public static final int ZOOM_BCKGRND_MODE
public static final int DEMOTE_MODE
public static final int PAN_VIEW_MODE
public static final int ROTATE_VIEW_MODE
public static final int ZOOM_VIEW_MODE
public static final int PAN_MODE
public static final int DRAW_MODE
public static final int ZOOM_MODE
public static final int ANNOTATE_MODE
public static final int ERASE_MODE
public static final int LASSO_MODE
public static final int RECT_MODE
Constructor Detail |
---|
public DSDefaultView(DSTabletopPane dsTabletopPane)
dsTabletopPane
- Description of the ParameterMethod Detail |
---|
public void openPopupMenuElement(double d, double alpha, DSElement DSElement_Arg, int Id)
d
- the Alpha the popup should havealpha
- the D the popup should haveDSElement_Arg
- the element the popup should be onId
- the user initializing the popuppublic void demoteAllElementsToTable()
public boolean containsDSElement(DSElement elem)
elem
- the element to test
public void promoteElementToTable(DSElement element, int id)
element
- the element to be promotedpublic void demoteElementToTable(DSElement elem)
elem
- the element (suposely a dragobject handled directly by the pane) to drop in the viewpublic void paint(Graphics2D Graphics_Arg)
paint
in class DSView
Graphics_Arg
- Description of the Parameterpublic void mousePressed(MouseEvent event)
mousePressed
in interface MouseListener
mousePressed
in class DSView
event
- Description of the Parameterpublic void mousePressedBehindElements(MouseEvent event)
public void mouseDragged(MouseEvent event)
mouseDragged
in interface MouseMotionListener
mouseDragged
in class DSView
event
- the callback event objectpublic void mouseReleased(MouseEvent event)
mouseReleased
in interface MouseListener
mouseReleased
in class DSView
event
- Description of the Parameterpublic void mouseClicked(MouseEvent event)
mouseClicked
in interface MouseListener
mouseClicked
in class DSView
event
- Description of the Parameterpublic void resetAllBeta()
public void addDSElement(DSElement elem)
elem
- The feature to be added to the Element attributepublic void switchDSElements(int pos0, int pos1)
pos0
- the position in the list of the first element to switchpos1
- the position in the list of the second element to switchpublic void addDSElement(int pos, DSElement elem)
elem
- The feature to be added to the Element attributepublic void clear()
public void removeElement(DSElement el)
el
- the element to remove from the element listprotected DSElement strokeAt(double x, double y, DSStroke stroke)
x
- Description of the Parametery
- Description of the Parameterstroke
- Description of the Parameter
protected boolean strokeOn(double x, double y, DSStroke stroke, DSElement el)
x
- the location to look at (x)y
- the location to look at (y)stroke
- the stroke around the point suposely mening somethingel
- the dselement under the point x,y
public List<DSElement> getElementList()
public int getDragMode()
public void setDragMode(int dragMode)
public int getDragMode(int userID)
public void setDragMode(int userID, int dragMode)
public boolean isPilableDSFrames()
public void setPilableDSFrames(boolean pilableDSFrames)
public void addDSViewContentListener(DSViewContentListener l)
public void removeViewContentListener(DSViewContentListener l)
public void fireMoveAll()
public void fireElementAdded(DSElement el)
public void fireElementRemoved(DSElement el)
public void fireElementPiled(DSElement el)
public void fireElementDrawn(DSElement el)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |