de.tubs.macs.control.controllers.visco
Class VCanvas

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--de.tubs.macs.control.controllers.visco.VCanvas

public class VCanvas
extends javax.swing.JPanel
implements java.awt.image.ImageObserver

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent, javax.swing.JComponent.IntVector, javax.swing.JComponent.KeyboardBinding, javax.swing.JComponent.KeyboardState
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
protected  boolean[] dimChanged
           
 java.awt.Point lastMove
           
protected  int LECTURE_BIG
           
protected  int LECTURE_MEDIUM
           
protected  int LECTURE_SMALL
           
protected  int LECTURE_TINY
           
protected  boolean[] posChanged
           
protected  int[] userDim
           
protected  java.awt.Point[] userPos
           
 
Fields inherited from class javax.swing.JComponent
_bounds, accessibleContext, listenerList, paintingChild, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
component, containerListener, layoutMgr, ncomponents
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
VCanvas(Visco visco)
           
 
Method Summary
 int arrowClicked(int x, int y)
           
 java.awt.Rectangle CamControlArrowsRect()
           
 java.awt.Rectangle CamControlCompassRect()
           
 java.awt.Rectangle cameraRect()
           
 java.awt.Rectangle conferenceRect(int num)
           
 java.awt.Rectangle crossRect()
           
 java.awt.Rectangle doorRect()
           
 void drawCamControlCompass(java.awt.Graphics g)
           
 java.awt.Rectangle exitdoorRect()
           
 int getCamControlArrow(int x, int y)
           
 java.awt.Point getCamControlCompass(int x, int y)
           
protected  int getLectureSize()
           
 int getUserScale(int number)
           
 boolean imageUpdate(java.awt.Image img, int infoflags, int x, int y, int width, int height)
           
 void init()
           
 boolean isCamControlMode()
           
 boolean isDisplayCameraMode()
           
 java.awt.Rectangle learnerRect(int number, int size)
           
 java.awt.Rectangle lecturetableRect()
           
 void moveUser(int number, int x, int y)
           
 void paint(java.awt.Graphics g)
           
 boolean positionContainsLearner(int x, int y)
           
 boolean positionContainsSpeechbubble(int x, int y)
           
 void scaleUser(int number, int fact)
           
 java.awt.Rectangle seminartableRect()
           
protected  void setLectureRoomImage()
           
protected  void setLectureSize(int size)
           
protected  void setPodiumRoomImage()
           
protected  void setSeminarRoomImage()
           
 void storeCameraPosition(java.awt.Point position)
           
protected  void storeUserValues(int number)
           
 boolean switchCameraDisplay()
           
 java.awt.Rectangle tableRect()
           
 void toggleCamControlMode()
           
 java.awt.Point toScr(int x, int y)
           
 java.awt.Point toVirt(int x, int y)
           
 java.awt.Rectangle userCamControlRect(int number)
           
 java.awt.Rectangle userCamRect(int number)
           
 java.awt.Rectangle userClockRect(int number)
           
 java.awt.Rectangle userRect(int number)
           
static void waitForImage(java.awt.Image image, java.awt.Component component)
           
 java.awt.Rectangle wbRect()
           
 
Methods inherited from class javax.swing.JPanel
, getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
_paintImmediately, addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, alwaysOnTop, bindingForKeyStroke, checkIfChildObscuredBySibling, computeVisibleRect, computeVisibleRect, contains, createToolTip, enableSerialization, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyBindings, processKeyBindingsForAllComponents, processKeyEvent, processMouseMotionEvent, putClientProperty, rectangleIsObscured, rectangleIsObscuredBySibling, registerKeyboardAction, registerKeyboardAction, registerWithKeyboardManager, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPaintingChild, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, shouldDebugGraphics, superProcessMouseMotionEvent, unregisterKeyboardAction, unregisterWithKeyboardManager, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, countComponents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getCursorTarget, getLayout, getMouseEventTarget, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, nextFocus, paintComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setCursor, setFocusOwner, setLayout, transferFocus, updateCursor, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, constructComponentName, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getIntrinsicCursor, getLocale, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getToolkit, getToolkitImpl, getTreeLock, gotFocus, handleEvent, hide, inside, isDisplayable, isEnabled, isEnabledImpl, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

userPos

protected java.awt.Point[] userPos

userDim

protected int[] userDim

posChanged

protected boolean[] posChanged

dimChanged

protected boolean[] dimChanged

LECTURE_TINY

protected final int LECTURE_TINY

LECTURE_SMALL

protected final int LECTURE_SMALL

LECTURE_MEDIUM

protected final int LECTURE_MEDIUM

LECTURE_BIG

protected final int LECTURE_BIG

lastMove

public java.awt.Point lastMove
Constructor Detail

VCanvas

public VCanvas(Visco visco)
Method Detail

init

public void init()

switchCameraDisplay

public boolean switchCameraDisplay()

isDisplayCameraMode

public boolean isDisplayCameraMode()

toggleCamControlMode

public void toggleCamControlMode()

isCamControlMode

public boolean isCamControlMode()

storeCameraPosition

public void storeCameraPosition(java.awt.Point position)

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class javax.swing.JComponent

imageUpdate

public boolean imageUpdate(java.awt.Image img,
                           int infoflags,
                           int x,
                           int y,
                           int width,
                           int height)
Specified by:
imageUpdate in interface java.awt.image.ImageObserver
Overrides:
imageUpdate in class java.awt.Component

setLectureSize

protected void setLectureSize(int size)

getLectureSize

protected int getLectureSize()

setLectureRoomImage

protected void setLectureRoomImage()

setSeminarRoomImage

protected void setSeminarRoomImage()

setPodiumRoomImage

protected void setPodiumRoomImage()

storeUserValues

protected void storeUserValues(int number)

toScr

public java.awt.Point toScr(int x,
                            int y)

toVirt

public java.awt.Point toVirt(int x,
                             int y)

userRect

public java.awt.Rectangle userRect(int number)

learnerRect

public java.awt.Rectangle learnerRect(int number,
                                      int size)

positionContainsLearner

public boolean positionContainsLearner(int x,
                                       int y)

positionContainsSpeechbubble

public boolean positionContainsSpeechbubble(int x,
                                            int y)

moveUser

public void moveUser(int number,
                     int x,
                     int y)

scaleUser

public void scaleUser(int number,
                      int fact)

getUserScale

public int getUserScale(int number)

userCamRect

public java.awt.Rectangle userCamRect(int number)

userCamControlRect

public java.awt.Rectangle userCamControlRect(int number)

userClockRect

public java.awt.Rectangle userClockRect(int number)

doorRect

public java.awt.Rectangle doorRect()

exitdoorRect

public java.awt.Rectangle exitdoorRect()

tableRect

public java.awt.Rectangle tableRect()

lecturetableRect

public java.awt.Rectangle lecturetableRect()

seminartableRect

public java.awt.Rectangle seminartableRect()

conferenceRect

public java.awt.Rectangle conferenceRect(int num)

cameraRect

public java.awt.Rectangle cameraRect()

wbRect

public java.awt.Rectangle wbRect()

crossRect

public java.awt.Rectangle crossRect()

arrowClicked

public int arrowClicked(int x,
                        int y)

waitForImage

public static void waitForImage(java.awt.Image image,
                                java.awt.Component component)

CamControlArrowsRect

public java.awt.Rectangle CamControlArrowsRect()

getCamControlArrow

public int getCamControlArrow(int x,
                              int y)

drawCamControlCompass

public void drawCamControlCompass(java.awt.Graphics g)

CamControlCompassRect

public java.awt.Rectangle CamControlCompassRect()

getCamControlCompass

public java.awt.Point getCamControlCompass(int x,
                                           int y)