Anka Home Page

org.kizna.anka
Class WhiteBoardPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--org.kizna.anka.WhiteBoardPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.lang.Runnable, java.io.Serializable

public class WhiteBoardPanel
extends javax.swing.JPanel
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.lang.Runnable

Insert the type's description here. Creation date: (3/30/2001 2:15:04 PM)

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
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
 
Constructor Summary
WhiteBoardPanel(boolean isDoubleBuffered, WhiteBoard whiteBoard)
          WhiteBoardPanel constructor comment.
WhiteBoardPanel(java.awt.LayoutManager layout, boolean isDoubleBuffered, WhiteBoard whiteBoard)
          WhiteBoardPanel constructor comment.
WhiteBoardPanel(java.awt.LayoutManager layout, WhiteBoard whiteBoard)
          WhiteBoardPanel constructor comment.
WhiteBoardPanel(WhiteBoard whiteBoard)
          WhiteBoardPanel constructor comment.
 
Method Summary
 void activateListeners()
          Insert the method's description here.
 void deactivateListeners()
          Insert the method's description here.
 void delete()
          Insert the method's description here.
 void delete(java.awt.Component component)
          Insert the method's description here.
 void deleteMessage(Noodle noodle)
          Insert the method's description here.
 double distanceToCord(java.util.Vector pointVector, int start, int end)
          compute the maximum distance of each point in the [start,end] range to the start-end line (the cord) TODO : we could escape the loop as soon as we have d > epsilon
 double distanceToLine(java.awt.Point p, java.awt.Point l1, java.awt.Point l2)
          Computes the distance of a point to a line Computes the distance of point p to the line given by p1 and p2
protected  Noodle findNoodle(int x, int y)
          Insert the method's description here.
 double findSlope(java.awt.Point p1, java.awt.Point p2)
          Insert the method's description here.
 java.awt.Component getGlassPane()
          Insert the method's description here.
 java.awt.Point getLastPoint()
          Insert the method's description here.
 int getOrder()
          Insert the method's description here.
 java.util.Vector getPointVector()
          Insert the method's description here.
 WhiteBoard getWhiteBoard()
          Insert the method's description here.
 void init(WhiteBoard whiteBoard)
           
 boolean isInMenuRegion(int x, int y)
          Insert the method's description here.
 boolean isPressed()
          Insert the method's description here.
 boolean isRecordingMode()
          Insert the method's description here.
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void optimize(java.util.Vector pointVector)
          Insert the method's description here.
 void optimize(java.util.Vector pointVector, double epsilon)
          optmize the vector of points by deleting unneeded points epsilon decides on the quality of the output epsilon is the maximum distance of the original points to the new pointVector
 void remove(java.awt.Component comp)
           
 void removeMessage(FreeHandMessage message)
          Insert the method's description here.
 int removePoints(java.util.Vector pointVector, int startIndex, int endIndex)
           
 int removePoints(java.util.Vector pointVector, java.awt.Point start, java.awt.Point finish)
          Insert the method's description here.
 void run()
          Insert the method's description here.
 void setGlassPane(WBGlassPane newGlassPane)
          Insert the method's description here.
 void setLastPoint(java.awt.Point newLastPoint)
          Insert the method's description here.
 void setPointVector(java.util.Vector newPointVector)
          Insert the method's description here.
 void setPressed(boolean newPressed)
          Insert the method's description here.
 void setRecordingMode(boolean newRecordingMode)
          Set the Recording mode Creation date: (3/30/2001 2:24:45 PM)
 void setStatusText(java.lang.String s)
          Insert the method's description here.
 void setWhiteBoard(WhiteBoard newWhiteBoard)
          Insert the method's description here.
 void showMessage(FreeHandMessage msg)
          Insert the method's description here.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WhiteBoardPanel

public WhiteBoardPanel(WhiteBoard whiteBoard)
WhiteBoardPanel constructor comment.


WhiteBoardPanel

public WhiteBoardPanel(java.awt.LayoutManager layout,
                       WhiteBoard whiteBoard)
WhiteBoardPanel constructor comment.

Parameters:
layout - java.awt.LayoutManager

WhiteBoardPanel

public WhiteBoardPanel(java.awt.LayoutManager layout,
                       boolean isDoubleBuffered,
                       WhiteBoard whiteBoard)
WhiteBoardPanel constructor comment.

Parameters:
layout - java.awt.LayoutManager
isDoubleBuffered - boolean

WhiteBoardPanel

public WhiteBoardPanel(boolean isDoubleBuffered,
                       WhiteBoard whiteBoard)
WhiteBoardPanel constructor comment.

Parameters:
isDoubleBuffered - boolean
Method Detail

activateListeners

public void activateListeners()
Insert the method's description here. Creation date: (3/30/2001 3:25:42 PM)


deactivateListeners

public void deactivateListeners()
Insert the method's description here. Creation date: (3/30/2001 3:26:31 PM)


delete

public void delete()
Insert the method's description here. Creation date: (4/2/2001 7:41:28 PM)


delete

public void delete(java.awt.Component component)
Insert the method's description here. Creation date: (4/2/2001 7:41:28 PM)


deleteMessage

public void deleteMessage(Noodle noodle)
Insert the method's description here. Creation date: (4/3/2001 7:04:11 PM)


findNoodle

protected Noodle findNoodle(int x,
                            int y)
Insert the method's description here. Creation date: (4/3/2001 3:50:45 PM)


findSlope

public double findSlope(java.awt.Point p1,
                        java.awt.Point p2)
                 throws InfinityException
Insert the method's description here. Creation date: (4/4/2001 4:27:26 PM)

Parameters:
p1 - java.awt.Point
p2 - java.awt.Point
Returns:
double
InfinityException

getGlassPane

public java.awt.Component getGlassPane()
Insert the method's description here. Creation date: (4/3/2001 1:36:30 PM)

Returns:
javax.swing.JPanel

getLastPoint

public java.awt.Point getLastPoint()
Insert the method's description here. Creation date: (3/30/2001 3:29:35 PM)

Returns:
java.awt.Point

getOrder

public int getOrder()
Insert the method's description here. Creation date: (3/30/2001 4:47:38 PM)

Returns:
int

getPointVector

public java.util.Vector getPointVector()
Insert the method's description here. Creation date: (3/30/2001 4:13:02 PM)

Returns:
java.util.Vector

getWhiteBoard

public WhiteBoard getWhiteBoard()
Insert the method's description here. Creation date: (4/3/2001 3:25:11 PM)

Returns:
org.kizna.anka.WhiteBoard

init

public void init(WhiteBoard whiteBoard)

isInMenuRegion

public boolean isInMenuRegion(int x,
                              int y)
Insert the method's description here. Creation date: (4/4/2001 12:54:11 PM)

Parameters:
x - int
y - int
Returns:
boolean

isPressed

public boolean isPressed()
Insert the method's description here. Creation date: (4/4/2001 6:34:43 PM)

Returns:
boolean

isRecordingMode

public boolean isRecordingMode()
Insert the method's description here. Creation date: (3/30/2001 2:24:45 PM)

Returns:
boolean

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

distanceToLine

public double distanceToLine(java.awt.Point p,
                             java.awt.Point l1,
                             java.awt.Point l2)
Computes the distance of a point to a line Computes the distance of point p to the line given by p1 and p2


distanceToCord

public double distanceToCord(java.util.Vector pointVector,
                             int start,
                             int end)
compute the maximum distance of each point in the [start,end] range to the start-end line (the cord) TODO : we could escape the loop as soon as we have d > epsilon


optimize

public void optimize(java.util.Vector pointVector,
                     double epsilon)
optmize the vector of points by deleting unneeded points epsilon decides on the quality of the output epsilon is the maximum distance of the original points to the new pointVector


optimize

public void optimize(java.util.Vector pointVector)
Insert the method's description here. Creation date: (4/4/2001 4:22:56 PM)

Parameters:
pointVector - java.util.Vector

removeMessage

public void removeMessage(FreeHandMessage message)
Insert the method's description here. Creation date: (4/3/2001 7:16:50 PM)

Parameters:
message - org.kizna.anka.message.FreeHandMessage

removePoints

public int removePoints(java.util.Vector pointVector,
                        java.awt.Point start,
                        java.awt.Point finish)
Insert the method's description here. Creation date: (4/4/2001 5:01:54 PM)


removePoints

public int removePoints(java.util.Vector pointVector,
                        int startIndex,
                        int endIndex)

run

public void run()
Insert the method's description here. Creation date: (3/30/2001 5:14:35 PM)

Specified by:
run in interface java.lang.Runnable

setGlassPane

public void setGlassPane(WBGlassPane newGlassPane)
Insert the method's description here. Creation date: (4/3/2001 1:36:30 PM)

Parameters:
newGlassPane - javax.swing.JPanel

setLastPoint

public void setLastPoint(java.awt.Point newLastPoint)
Insert the method's description here. Creation date: (3/30/2001 3:29:35 PM)

Parameters:
newLastPoint - java.awt.Point

setPointVector

public void setPointVector(java.util.Vector newPointVector)
Insert the method's description here. Creation date: (3/30/2001 4:13:02 PM)

Parameters:
newPointVector - java.util.Vector

setPressed

public void setPressed(boolean newPressed)
Insert the method's description here. Creation date: (4/4/2001 6:34:43 PM)

Parameters:
newPressed - boolean

setRecordingMode

public void setRecordingMode(boolean newRecordingMode)
Set the Recording mode Creation date: (3/30/2001 2:24:45 PM)

Parameters:
newRecordingMode - boolean

setStatusText

public void setStatusText(java.lang.String s)
Insert the method's description here. Creation date: (4/3/2001 3:33:43 PM)


setWhiteBoard

public void setWhiteBoard(WhiteBoard newWhiteBoard)
Insert the method's description here. Creation date: (4/3/2001 3:25:11 PM)

Parameters:
newWhiteBoard - org.kizna.anka.WhiteBoard

showMessage

public void showMessage(FreeHandMessage msg)
Insert the method's description here. Creation date: (3/30/2001 4:30:55 PM)

Parameters:
msg - org.kizna.anka.message.FreeHandMessage

remove

public void remove(java.awt.Component comp)
Overrides:
remove in class java.awt.Container
See Also:
Container.remove(Component)

(c) Kizna Corporation, Somik Raha 2002

Anka is an open source collaboration whiteboard released under GPL.
If you want to be notified when a new release of Anka is out, or join the developer or user group, visit Anka Mailing Lists.