|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JLayeredPane javax.swing.JDesktopPane org.diamondspin.DSTabletopPane
public class DSTabletopPane
DSTabletopPane is the general circular container which handles menus, views in the middle, elements on top and dispatches
the events. It can be overloaded to build your own app.
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. |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JDesktopPane |
---|
JDesktopPane.AccessibleJDesktopPane |
Nested classes/interfaces inherited from class javax.swing.JLayeredPane |
---|
JLayeredPane.AccessibleJLayeredPane |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected int[] |
ActionMode
Mode that indicates what each user is doing. |
protected DSView |
activeView
The actual view (the one the user sees ) capable to accept events. |
protected AffineTransform |
AffineTransform2
|
protected double |
angleInit
To save the angle of the view when starts to drag&drop it. |
protected Thread |
AsynchronousRepaint
To refresh the interface asynchronously to the user events. |
protected BufferedImage |
BackgroundImage
An image to display in background |
protected BufferedImage |
BackgroundTableImage
|
protected BufferedImage |
BackgroundTableImage24
|
protected double |
betaInit
as AngleInit saves the angle where the drag&drop started, BetaInit save the angle of the dragged element when it starts to move. |
static int |
BLACKHOLE
One of the three fisheye possible modes |
protected Graphics |
BTIHiddenGraphics
|
protected Graphics |
BTIHiddenGraphics24
|
protected int |
DeformationMode
The fisheye mode actually used |
protected double |
distInit
|
protected boolean |
DoubleBuffered
|
static int |
DRAG_TABLE
Input mode: the drag events are panning the view |
protected DSElement[] |
dragObjects
The list of the elements in the top layer, i.e., the ones which are actually drag & dropped by the users. |
protected DSMenuBarManager |
dsMenuBarManager1
The collaborator in charge of handling menubars |
protected DSPopupMenuManager |
dsPopupMenuManager1
The collaborator in charge of handling popup menus |
protected EventListenerList |
DSTableListenerList
register a DSSTablelistener |
protected DSView |
DSViewEmpty
an empty view to start. |
protected DSEngine |
engine
|
protected double |
facingAngle
Which angle the elements must face (if magnetized). |
protected boolean |
first_repaint
|
protected BufferedImage |
HiddenBuffer
|
protected Graphics |
HiddenGraphics
|
static int |
HILL
One of the three fisheye possible modes |
static int |
IMG_16BITS
|
static int |
IMG_32BITS
|
protected double |
MagnetAngle
Angle where the magnet magnetised the table |
protected int |
Magnetid
|
protected double |
magnetRatio
How much the element must face a certain angle (0 = face the border, 1 = face totally the angle) |
static int |
MOUSE_STABILITY
|
static int |
MOVE_ELEMENT
Input mode: the drag events are moving the selected element like a window. |
static int |
MOVE_MENU
Input mode: the drag events are moving a menubar |
protected int |
nbDisp
|
protected int |
NbRepaint
|
protected int |
NbRepaintAll
|
protected static int |
NBSEC
|
protected Float |
NextAngleToFace
|
static int |
NORMAL
One of the three fisheye possible modes |
protected Float |
oldAngleToFace
Which angle the elements faced (used during animation) |
protected Point |
oldTableCenter
|
static int |
ROTATE_TABLE
Input mode: the drag events are moving the table. |
protected double |
saveAngle
save the angle to use it in priority over MagnetAngle |
protected AffineTransform |
SavedMenubarsGraphicsTransform
|
static int |
SHADOW_SIZE
for the active element, so all active element will have a shadow of the same size. |
protected boolean |
Squarified
if the menubars magnetize the documents to the closest border direction instead of the direction of the center of the menubar |
protected Point |
startDrag
|
protected double |
tableAngle
|
protected Point |
tableCenter
|
protected int |
tableRadius
The radius of the circular table. |
protected double |
tableZoom
|
protected long |
TimeStart
|
protected Graphics2D |
topScreenGraphics
|
protected BufferedImage |
topScreenImage
|
protected int[] |
touchOrder
|
static int |
TWO_FINGERS
Input mode: the drag events are panning the view |
static int |
WAITING
Input mode: waiting for input |
static int |
ZOOM_TABLE
Input mode: the drag events are moving the table. |
protected double |
zoomInit
|
Fields inherited from class javax.swing.JDesktopPane |
---|
LIVE_DRAG_MODE, OUTLINE_DRAG_MODE |
Fields inherited from class javax.swing.JLayeredPane |
---|
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Fields inherited from interface org.diamondspin.DSConstants |
---|
COLLAGE_TOP_COLOR, COLLAGE_TOP_THICKNESS, DRAW_COLLAGE_TOP |
Constructor Summary | |
---|---|
DSTabletopPane()
Constructor. |
Method Summary | |
---|---|
void |
activateDSComponents(DSFrame f)
|
void |
activateDSComponents(DSFrame f,
Component c)
|
void |
activateFakeComponent(Component Component_Arg)
Do what's necessary to initialize a swing component without displaying it on screen (what swing does only when it's displayed directly on the screen but here it will never happen) |
Component |
add(Component c)
override this function to register piler and re-route call to the right thread if necessary to avoid deadlock |
void |
addDSMenuBar(DSMenuBar DSMenuBar_Arg)
|
void |
addDSStrokeListener(DSStrokeListener listener_Arg)
DSStrokeListeners listens for stroke drawing on the tabletop |
void |
addDSTableListener(DSTableListener l)
Adds a listener to the DSTableListenerList attribute of the DSTabletopPane object |
int |
checkElementAsEventTarget(MouseEvent event)
checks if an event(mouse, DT, any spatial event) is targetting an element or not (-1) |
void |
collapseMenu(int id)
|
void |
demoteAllDragElementsToTable()
|
void |
demoteDragElementToTable(DSElement dsElement)
|
void |
demoteEverythingForUser(int id)
Special gift function from fred to Kate in memory of "dropElementOnTop()". |
void |
fireStrokeFinished(DSStroke str)
Fire the "new stroke" events to the subscribers |
void |
fireTableEngineChanged()
|
void |
fireTableGrabbed()
|
void |
fireTableReleased()
|
void |
fireTableRotated()
|
void |
fireTableTranslated()
|
void |
fireTableViewChanged()
|
void |
fireTableZoomed()
|
int |
getActionMode(int id)
gets the actionMode of a given user |
DSView |
getActiveView()
|
double |
getAngleInit()
|
BufferedImage |
getBackgroundImage()
|
BufferedImage |
getBackgroundTableImage()
|
BufferedImage |
getBackgroundTableImage24()
|
double |
getBetaInit()
|
static int |
getCurrentUser()
added by Merrie to get current user id fromthe thread name |
int |
getDeformationMode()
|
DSElement |
getDragObject(int id)
|
DSMenuBar |
getDSMenuBar(int index)
|
int |
getDSMenuBarCount()
|
ArrayList<DSMenuBar> |
getDSMenuBarList()
|
DSMenuBarManager |
getDSMenuBarManager()
|
DSPopupMenu |
getDSPopupMenu(int id)
Gets the PopupMenu attribute of the DSTabletopPane object |
DSPopupMenuManager |
getDSPopupMenuManager()
|
DSStrokeListener[] |
getDSStrokeListener()
|
DSEngine |
getEngine()
|
double |
getFacingAngle()
|
int |
getGlobalAction()
|
int |
getIDForDragObject(DSElement dsElement)
|
BufferedImage |
getImage()
Gets the image attribute of the DSTabletopPane object |
double |
getMagnetAngle()
|
int |
getMagnetid()
|
double |
getMagnetRatio()
|
static int |
getMaxFingerCount()
|
static int |
getMaxUserCount()
|
double |
getMenuAngle(int id)
|
Float |
getNextAngleToFace()
|
Float |
getOldAngleToFace()
|
double |
getPreferredAngle(int id)
return a preferred angle for a given user. |
int |
getRadius()
|
double |
getSaveAngle()
|
double |
getScale(double d,
double alpha,
double scale)
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 factor is really used by the matrix. |
JInternalFrame |
getSelectedFrame()
|
double |
getTableAngle()
|
Point |
getTableCenter()
|
double |
getTableZoom()
|
int[] |
getTouchOrder()
|
Color |
getUserColor(int id)
Gets the Color of the giver user |
boolean |
hasAMenuBar(int id)
|
boolean |
imageUpdate(Image Image_Arg,
int Infoflags_Arg,
int X_Arg,
int Y_Arg,
int Width_Arg,
int Height_Arg)
when an image finish to load attached to this component we want to launch a repaintAll() otherwise we call the super.imageUpdate() |
void |
init(int Width_Arg,
int Height_Arg,
int bitNumber_Arg)
Init the repaint process. |
protected void |
initDoubleBuffering(int bitNumber_Arg)
Initialisation of the double buffering system. |
boolean |
isDisplayCursorForUser(int userid)
|
boolean |
isDragObject(DSElement dsElement)
|
boolean |
isDSMenuBarAt(double alpha)
|
boolean |
isFocusable()
have to return true to be able to receive key events |
boolean |
isMenuBarNearUser(DSMenuBar menubar,
int id)
|
boolean |
isPerformingAction()
|
boolean |
isSquarified()
|
void |
keyPressed(KeyEvent event)
Description of the Method |
void |
keyReleased(KeyEvent KeyEvent_Arg)
Description of the Method |
void |
keyTyped(KeyEvent event)
Description of the Method |
void |
mouseClicked(MouseEvent event)
|
void |
mouseClicked2(MouseEvent MouseEvent_Arg)
when the user's finger press and release at the same location |
void |
mouseDragged(MouseEvent event)
mouseDragged callback |
protected void |
mouseDragged2(MouseEvent event)
mouseDragged callback |
void |
mouseEntered(MouseEvent MouseEvent_Arg)
Unused callback |
void |
mouseExited(MouseEvent MouseEvent_Arg)
Unused callback |
void |
mouseMoved(MouseEvent MouseEvent_Arg)
The mouse moved (without button pressed). |
void |
mousePressed(MouseEvent event)
handle a mouse press event from the mouse. |
protected void |
mousePressed2(MouseEvent event)
handle a mouse press from any device. |
boolean |
mousePressedDragObject(MouseEvent event,
int id)
Description of the Method |
void |
mouseReleased(MouseEvent event)
mouseDragged callback |
protected void |
mouseReleased2(MouseEvent event)
When the mouse is released, the system has to change mode, repaint the table in nice if it was rotated, etc. |
void |
moveToFront(Component f)
|
void |
newTouch(int id)
update Touch order which says which user touched last the table |
void |
paint(Graphics g)
|
protected void |
paintInterface(Graphics2D Graphics_Arg)
Display the background then the element on top given by parameter |
void |
paintTable()
Merge the background and the view for fast rotation only. |
protected void |
paintTable(Graphics g)
Display the view on the table using the DiamondSpin layout. |
void |
removeAllDSMenuBars()
|
void |
removeDragObject(DSElement dsElement)
discard a dragged element from one of the 5 users. |
void |
removeDSMenuBar(DSMenuBar menubar)
|
void |
removeDSStrokeListener(DSStrokeListener l)
|
void |
removeDSTableListener(DSTableListener l)
unregister a DSTable listener |
void |
repaint()
As it is asynchronous repaint we just have to increase a counter. |
void |
repaintAll()
repaint everything, refresh all the layer. |
void |
restoreAngle()
restore the angle saved by saveAngle() |
void |
saveAngle()
|
BufferedImage |
scaleImageForBackground(BufferedImage img)
Change the image to display in background |
void |
setActionMode(int mode,
int id)
change the action mode for a given user |
void |
setActiveView(DSView view)
change the active view of the interface |
void |
setAngleInit(double tangle)
|
void |
setAngleToFace(double AngleToFace_Arg)
|
void |
setBackgroundImage(BufferedImage Image_Arg)
Change the image to display in background |
void |
setBetaInit(double angle)
|
void |
setDeformationMode(int DeformationMode_Arg)
Sets the deformationMode attribute of the DSTabletopPane object |
void |
setDesktopManager(DesktopManager d)
|
void |
setDisplayCursorForUser(int userid,
boolean displayCursor)
|
void |
setDragObject(DSElement elem,
int id)
set the element on top for one of the users. |
void |
setEngine(DSEngine engine)
|
void |
setMagnetAngle(double tangle)
|
void |
setMagnetid(int id)
|
void |
setMagnetRatio(double PercentFace_Arg)
|
void |
setNextAngleToFace(Float tangle)
|
void |
setOldAngleToFace(Float angle)
Sets the oldAngleToFace attribute of the PoliciesContainer object |
void |
setPopupMenu(DSPopupMenu DSPopupMenu_Arg,
int id)
Sets a PopupMenu for a given user |
void |
setSelectedFrame(JInternalFrame f)
|
void |
setTableAngle(double tangle)
change the global angle of the current view -> turn the table |
void |
setTableCenter(Point center)
change the center of the table |
void |
setTableZoom(double zoom)
change the global angle of the current view -> turn the table |
void |
setUserColor(int id,
Color col)
Sets the userColor attribute of the DSTabletopPane object |
void |
startDragTable(int x,
int y,
int id)
Start panning the view. |
void |
startRotateTable(int x,
int y,
int id)
Start rotating the table. |
void |
startsStroke(MouseEvent event,
int id)
Start to draw a Stroke. |
void |
startsStroke(MouseEvent event,
int id,
DSElement attachment)
Start to draw a Stroke. |
void |
startZoomTable(int x,
int y,
int id)
Start zooming the view. |
void |
stealDragObject(MouseEvent MouseEvent_Arg,
int id0_Arg,
int index_Arg)
Steal a drag object from another user |
AffineTransform |
transformTable2(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. |
void |
unsetAllPopupMenus()
discard all the popup menus ! usefull for switching views |
void |
unsetAllPopupMenusForElement(DSElement dsElement)
Unset the popup menu for a given element (for instance if the element is deleted, modified, etc.) |
void |
unsetPopupMenu(int id)
unset the popup menu for a given user |
void |
waitRepaintFinished()
Wait until the current asynchronous repaints are all finished |
Methods inherited from class javax.swing.JDesktopPane |
---|
addImpl, getAccessibleContext, getAllFrames, getAllFramesInLayer, getDesktopManager, getDragMode, getUI, getUIClassID, paramString, remove, removeAll, selectFrame, setComponentZOrder, setDragMode, setUI, updateUI |
Methods inherited from class javax.swing.JLayeredPane |
---|
getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, putLayer, setLayer, setLayer, setPosition |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int tableRadius
protected DSView activeView
protected Float oldAngleToFace
protected DSMenuBarManager dsMenuBarManager1
protected DSPopupMenuManager dsPopupMenuManager1
public static final int MOUSE_STABILITY
protected int Magnetid
protected double magnetRatio
protected double facingAngle
protected Float NextAngleToFace
protected boolean Squarified
protected double MagnetAngle
protected double saveAngle
protected Point oldTableCenter
protected Point tableCenter
protected double tableAngle
protected double tableZoom
protected double angleInit
protected Point startDrag
protected double betaInit
protected double zoomInit
protected double distInit
protected EventListenerList DSTableListenerList
public static final int NORMAL
public static final int BLACKHOLE
public static final int HILL
protected int DeformationMode
protected Thread AsynchronousRepaint
public static final int SHADOW_SIZE
protected boolean DoubleBuffered
protected BufferedImage HiddenBuffer
protected BufferedImage BackgroundTableImage
protected BufferedImage BackgroundTableImage24
protected BufferedImage topScreenImage
protected Graphics HiddenGraphics
protected Graphics BTIHiddenGraphics
protected Graphics BTIHiddenGraphics24
protected Graphics2D topScreenGraphics
protected AffineTransform SavedMenubarsGraphicsTransform
protected int nbDisp
protected int NbRepaint
protected int NbRepaintAll
protected static final int NBSEC
public static final int IMG_16BITS
public static final int IMG_32BITS
protected boolean first_repaint
protected long TimeStart
protected DSEngine engine
protected AffineTransform AffineTransform2
protected int[] touchOrder
protected DSView DSViewEmpty
public static final int WAITING
public static final int MOVE_ELEMENT
public static final int MOVE_MENU
public static final int ROTATE_TABLE
public static final int DRAG_TABLE
public static final int TWO_FINGERS
public static final int ZOOM_TABLE
protected int[] ActionMode
protected DSElement[] dragObjects
protected BufferedImage BackgroundImage
Constructor Detail |
---|
public DSTabletopPane()
Method Detail |
---|
public void setDesktopManager(DesktopManager d)
setDesktopManager
in class JDesktopPane
public int getRadius()
public Float getOldAngleToFace()
public void setOldAngleToFace(Float angle)
public static int getMaxUserCount()
public static int getMaxFingerCount()
public DSMenuBarManager getDSMenuBarManager()
public DSPopupMenuManager getDSPopupMenuManager()
public ArrayList<DSMenuBar> getDSMenuBarList()
public boolean hasAMenuBar(int id)
public double getMenuAngle(int id)
public void collapseMenu(int id)
public boolean isMenuBarNearUser(DSMenuBar menubar, int id)
public int getDSMenuBarCount()
public DSMenuBar getDSMenuBar(int index)
public void removeDSMenuBar(DSMenuBar menubar)
public void removeAllDSMenuBars()
public void addDSMenuBar(DSMenuBar DSMenuBar_Arg)
public boolean isDSMenuBarAt(double alpha)
public int getMagnetid()
public void setMagnetid(int id)
public double getMagnetRatio()
public void setMagnetRatio(double PercentFace_Arg)
public double getFacingAngle()
public void setAngleToFace(double AngleToFace_Arg)
public void setNextAngleToFace(Float tangle)
public Float getNextAngleToFace()
public boolean isSquarified()
public double getMagnetAngle()
public void setMagnetAngle(double tangle)
public double getSaveAngle()
public void saveAngle()
public void restoreAngle()
saveAngle()
public double getAngleInit()
public void setAngleInit(double tangle)
public double getBetaInit()
public void setBetaInit(double angle)
public void addDSStrokeListener(DSStrokeListener listener_Arg)
public void removeDSStrokeListener(DSStrokeListener l)
public DSStrokeListener[] getDSStrokeListener()
public void fireStrokeFinished(DSStroke str)
str
- the stroke which is finishedpublic void startsStroke(MouseEvent event, int id)
event
- The mouse event which starts the strokeid
- The id which indicates WHO is starting the stroke. We are in a multiple Input environementpublic void startsStroke(MouseEvent event, int id, DSElement attachment)
event
- The mouse event which starts the strokeid
- The id which indicates WHO is starting the stroke. We are in a multiple Input environementattachment
- stroke may be attached to an other element (drawn on top for instance) that need to be repainted underpublic Component add(Component c)
c
- add a compoennt in the awt component tree
public void addDSTableListener(DSTableListener l)
l
- The feature to be added to the DSTableListener attributepublic void removeDSTableListener(DSTableListener l)
l
- Description of the Parameterpublic void fireTableViewChanged()
public void fireTableEngineChanged()
public void fireTableGrabbed()
public void fireTableReleased()
public void fireTableRotated()
public void fireTableZoomed()
public void fireTableTranslated()
public int getGlobalAction()
public boolean isPerformingAction()
public void startDragTable(int x, int y, int id)
id
- The user id who start this actionpublic void startZoomTable(int x, int y, int id)
id
- The user id who start this actionpublic void startRotateTable(int x, int y, int id)
x
- the point to start the rotation aroundy
- the point to start the rotation aroundid
- The user id who start this actionpublic void setDeformationMode(int DeformationMode_Arg)
DeformationMode_Arg
- The new deformationMode valuepublic int getDeformationMode()
public BufferedImage getImage()
public boolean imageUpdate(Image Image_Arg, int Infoflags_Arg, int X_Arg, int Y_Arg, int Width_Arg, int Height_Arg)
imageUpdate
in interface ImageObserver
imageUpdate
in class Component
public void init(int Width_Arg, int Height_Arg, int bitNumber_Arg)
Width_Arg
- the width covered by the tableHeight_Arg
- the height covered by the tableprotected void initDoubleBuffering(int bitNumber_Arg)
public BufferedImage getBackgroundTableImage()
public BufferedImage getBackgroundTableImage24()
public void repaint()
public void repaintAll()
public void waitRepaintFinished()
public void paintTable()
protected void paintTable(Graphics g)
g
- a graphic context on the general component = the back buffer of this componentprotected void paintInterface(Graphics2D Graphics_Arg)
Graphics_Arg
- a graphic context to really display the component. we''l display the backbuffer in it at the endpublic void paint(Graphics g)
paint
in class JLayeredPane
public void setEngine(DSEngine engine)
public DSEngine getEngine()
public AffineTransform transformTable2(double d, double alpha, double beta, double scale, double tangle, double tzoom, int elType, int userid)
d
- the distance from the center of the table to the center of the element. Distance to the center of the table 0.5 means between the center and the borderalpha
- the Angle of the element around the center of the table (trigonometric system)beta
- The additional rotation of the element around the center of the documentscale
- the scale factor. May be overhelmed by the blackhole or central focus technique (0 to not be concerned by fisheye techniques and always act as scale=1)tangle
- the angle of the whole table to add it to alpha. 0 when dragged and = angle of the view otherwiseelType
- what kind of element is it
public double getScale(double d, double alpha, double scale)
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 blackhole or central focus
public DSView getActiveView()
public void setActiveView(DSView view)
view
- The new activeViewpublic void setPopupMenu(DSPopupMenu DSPopupMenu_Arg, int id)
DSPopupMenu_Arg
- The new PopupMenu valueid
- The user concerned by having a popup menupublic void unsetPopupMenu(int id)
id
- The id of the userpublic DSPopupMenu getDSPopupMenu(int id)
id
- The id of the user
public void unsetAllPopupMenusForElement(DSElement dsElement)
dsElement
- The element concerned by the operationpublic void unsetAllPopupMenus()
public int getActionMode(int id)
id
- the user's id
public void setActionMode(int mode, int id)
mode
- The new actionMode valueid
- The user idpublic boolean mousePressedDragObject(MouseEvent event, int id)
event
- Description of the Parameterid
- Description of the Parameter
public void mousePressed(MouseEvent event)
mousePressed
in interface MouseListener
event
- the object describing the eventprotected void mousePressed2(MouseEvent event)
event
- the object describing the eventpublic void mouseDragged(MouseEvent event)
mouseDragged
in interface MouseMotionListener
event
- Description of the Parameterprotected void mouseDragged2(MouseEvent event)
event
- Description of the Parameterpublic void mouseReleased(MouseEvent event)
mouseReleased
in interface MouseListener
event
- Description of the Parameterprotected void mouseReleased2(MouseEvent event)
event
- Description of the Parameterpublic void mouseMoved(MouseEvent MouseEvent_Arg)
mouseMoved
in interface MouseMotionListener
MouseEvent_Arg
- Description of the Parameterpublic void mouseClicked(MouseEvent event)
mouseClicked
in interface MouseListener
public void mouseClicked2(MouseEvent MouseEvent_Arg)
MouseEvent_Arg
- Description of the Parameterpublic void mouseEntered(MouseEvent MouseEvent_Arg)
mouseEntered
in interface MouseListener
MouseEvent_Arg
- Description of the Parameterpublic void mouseExited(MouseEvent MouseEvent_Arg)
mouseExited
in interface MouseListener
MouseEvent_Arg
- Description of the Parameterpublic void keyPressed(KeyEvent event)
keyPressed
in interface KeyListener
event
- Description of the Parameterpublic void keyReleased(KeyEvent KeyEvent_Arg)
keyReleased
in interface KeyListener
KeyEvent_Arg
- Description of the Parameterpublic void keyTyped(KeyEvent event)
keyTyped
in interface KeyListener
event
- Description of the Parameterpublic static int getCurrentUser()
public boolean isDisplayCursorForUser(int userid)
public void setDisplayCursorForUser(int userid, boolean displayCursor)
public DSElement getDragObject(int id)
id
- Description of the Parameter
public boolean isDragObject(DSElement dsElement)
dsElement
- The DSElement to test
public int getIDForDragObject(DSElement dsElement)
dsElement
- Description of the Parameter
public void removeDragObject(DSElement dsElement)
dsElement
- Description of the Parameterpublic void setDragObject(DSElement elem, int id)
elem
- The new dragObject valueid
- The id of the userpublic void demoteDragElementToTable(DSElement dsElement)
public void demoteAllDragElementsToTable()
public void setSelectedFrame(JInternalFrame f)
setSelectedFrame
in class JDesktopPane
public JInternalFrame getSelectedFrame()
getSelectedFrame
in class JDesktopPane
public void demoteEverythingForUser(int id)
public void stealDragObject(MouseEvent MouseEvent_Arg, int id0_Arg, int index_Arg)
MouseEvent_Arg
- id0_Arg
- Description of the Parameterindex_Arg
- Description of the Parameterpublic final void setBackgroundImage(BufferedImage Image_Arg)
Image_Arg
- The new backgroundImage valuepublic BufferedImage scaleImageForBackground(BufferedImage img)
img
- the image to scale for the background
public BufferedImage getBackgroundImage()
public void moveToFront(Component f)
moveToFront
in class JLayeredPane
public boolean isFocusable()
isFocusable
in class Component
public Color getUserColor(int id)
public void setUserColor(int id, Color col)
id
- user id because every user has a different colorcol
- the new color for the given userpublic int[] getTouchOrder()
public void activateFakeComponent(Component Component_Arg)
Component_Arg
- the component (eventually a panel full of things) to initializepublic void activateDSComponents(DSFrame f, Component c)
public void activateDSComponents(DSFrame f)
public void newTouch(int id)
public double getPreferredAngle(int id)
id
- The user id
public int checkElementAsEventTarget(MouseEvent event)
event
- the mouse event to check
public double getTableZoom()
public void setTableZoom(double zoom)
zoom
- The new zoom valuepublic double getTableAngle()
public void setTableAngle(double tangle)
tangle
- The new angle valuepublic Point getTableCenter()
public void setTableCenter(Point center)
center
- The new center
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |