|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--edu.virginia.cs.mng.hypercast.demo.DrawArea
DrawArea class: the class used to draw on.
| 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 | |
(package private) boolean |
bCanDrawText
|
(package private) int |
dragx
Used to record the intermediate coordinates when you are dragging the mouse. |
(package private) int |
dragy
Used to record the intermediate coordinates when you are dragging the mouse. |
(package private) boolean |
firsttime
|
(package private) java.awt.FontMetrics |
fm
|
(package private) Entry |
founde
A entry used to indicate a found entry. |
(package private) MGraphics |
g
MGraphics (derived from Graphics) handle used to draw on. |
(package private) MGraphics |
gDrag
MGraphics (derived from Graphics) handle used to draw on. |
(package private) MGraphics |
gOff
MGraphics (derived from Graphics) handle used to draw on. |
(package private) static int |
HEIGHT
|
(package private) int |
idragx
|
(package private) int |
idragy
|
(package private) java.awt.Image |
imdrag
Image handles used to buffered-draw on. |
(package private) java.awt.Image |
imoff
Image handles used to buffered-draw on. |
(package private) int |
initx
The coordinates of the first point of the current entry. |
(package private) int |
inity
The coordinates of the first point of the current entry. |
(package private) boolean |
inpoly
Whether in the drawing process of a POLY. |
(package private) int |
killx
Used to record the coordinates of the first mouse click when you try to KILL an entry. |
(package private) int |
killy
Used to record the coordinates of the first mouse click when you try to KILL an entry. |
(package private) boolean |
kludge
|
(package private) long |
lastdragged
Timestamp used when you draw a BRUSH entry. |
(package private) int |
lastsize
Used to store text size when you are drawing a TEXT entry. |
(package private) int |
lastx
The coordinates of the last point of the current entry. |
(package private) int |
lasty
The coordinates of the last point of the current entry. |
(package private) boolean |
nuked
|
(package private) int |
pagenumber
The page number this drawing area is associated with. |
(package private) WBFrame |
parent
The whiteboard associated with this drawArea. |
(package private) int |
pointx
The coordinates of the helping point of the current POLY entry. |
(package private) int |
pointy
The coordinates of the helping point of the current POLY entry. |
(package private) java.util.Vector |
polyx
Used to store the coordinates of a POLY. |
(package private) java.util.Vector |
polyy
Used to store the coordinates of a POLY. |
(package private) int |
scrollx
|
(package private) int |
scrolly
|
private java.lang.String |
sPrev
|
(package private) int |
strx
The coordinates used to calculate the drawing position when you draw a TEXT entry. |
(package private) int |
stry
The coordinates used to calculate the drawing position when you draw a TEXT entry. |
(package private) static long |
TIMEVAL
|
(package private) boolean |
virgin
|
(package private) static int |
WIDTH
|
(package private) static int |
xxxxx
|
| Fields inherited from class javax.swing.JPanel |
defaultLayout,
uiClassID |
| Fields inherited from class javax.swing.JComponent |
_bounds,
accessibleContext,
alignmentX,
alignmentY,
ANCESTOR_USING_BUFFER,
ancestorNotifier,
autoscroller,
border,
changeSupport,
clientProperties,
flags,
HAS_FOCUS,
IS_DOUBLE_BUFFERED,
IS_OPAQUE,
IS_PAINTING_TILE,
KEYBOARD_BINDINGS_KEY,
listenerList,
maximumSize,
minimumSize,
NEXT_FOCUS,
paintImmediatelyClip,
preferredSize,
readObjectCallbacks,
REQUEST_FOCUS_DISABLED,
tmpRect,
TOOL_TIP_TEXT_KEY,
ui,
uiClassID,
UNDEFINED_CONDITION,
vetoableChangeSupport,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Container |
component,
containerListener,
containerSerializedDataVersion,
dispatcher,
layoutMgr,
maxSize,
ncomponents,
serialVersionUID |
| Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
assert,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
changeSupport,
componentListener,
componentListenerK,
componentOrientation,
componentSerializedDataVersion,
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,
name,
nameExplicitlySet,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
serialVersionUID,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
| Constructor Summary | |
DrawArea(WBFrame p,
int pnum)
Constructor. |
|
| Method Summary | |
void |
clearEntry(Entry fe)
To clear a given entry from the drawing area of the whiteboard. |
void |
doLayout()
To initialize the layout of this drawing area. |
void |
draw(MGraphics g,
Entry e)
To draw the given entry on the given Graphics handle. |
void |
drawTextBox()
To draw the box that surrounds the text when the user is drawing a TEXT entry. |
java.awt.Image |
getImage()
|
java.awt.Dimension |
getMaximumSize()
To get the maximun size of this drawing area. |
java.awt.Dimension |
getMinimumSize()
To get the minimum size of this drawing area. |
java.awt.Dimension |
getPreferredSize()
To get the preferred size of this drawing area. |
void |
paintComponent(java.awt.Graphics gg)
To repaint the given Graphics object with overwrite mode. |
void |
signalfinal()
A peripheral method which help to draw the POLY and TEXT entry. |
void |
this_keyPressed(java.awt.event.KeyEvent ev)
Event handler invoked when the keyboard is pressed. |
void |
this_mouseDragged(java.awt.event.MouseEvent ev)
Event handler invoked when the mouse is dragged. |
void |
this_mouseMoved(java.awt.event.MouseEvent ev)
|
void |
this_mousePressed(java.awt.event.MouseEvent ev)
Event handler invoked when the mouse is pressed. |
void |
this_mouseReleased(java.awt.event.MouseEvent ev)
Event handler invoked when the mouse is released. |
void |
updateGraphics()
|
| Methods inherited from class javax.swing.JPanel |
|
| Methods inherited from class javax.swing.JComponent |
_paintImmediately,
addAncestorListener,
addNotify,
addPropertyChangeListener,
addVetoableChangeListener,
adjustPaintFlags,
alwaysOnTop,
bindingForKeyStroke,
computeVisibleRect,
computeVisibleRect,
contains,
createToolTip,
enableSerialization,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
fireVetoableChange,
getActionForKeyStroke,
getAlignmentX,
getAlignmentY,
getAutoscrolls,
getBorder,
getBounds,
getClientProperties,
getClientProperty,
getComponentGraphics,
getConditionForKeyStroke,
getDebugGraphicsOptions,
getFlag,
getGraphics,
getHeight,
getInsets,
getInsets,
getLocation,
getNextFocusableComponent,
getRegisteredKeyStrokes,
getRootPane,
getSize,
getToolTipLocation,
getToolTipText,
getToolTipText,
getTopLevelAncestor,
getVisibleRect,
getWidth,
getX,
getY,
grabFocus,
hasFocus,
isDoubleBuffered,
isFocusCycleRoot,
isFocusTraversable,
isLightweightComponent,
isManagingFocus,
isOpaque,
isOptimizedDrawingEnabled,
isPaintingTile,
isRequestFocusEnabled,
isValidateRoot,
keyboardBindings,
paint,
paintBorder,
paintChildren,
paintImmediately,
paintImmediately,
paintWithBuffer,
processComponentKeyEvent,
processFocusEvent,
processKeyBinding,
processKeyBindings,
processKeyBindingsForAllComponents,
processKeyEvent,
processMouseMotionEvent,
putClientProperty,
readObject,
rectangleIsObscured,
registerKeyboardAction,
registerKeyboardAction,
registerWithKeyboardManager,
removeAncestorListener,
removeNotify,
removePropertyChangeListener,
removeVetoableChangeListener,
repaint,
repaint,
requestDefaultFocus,
requestFocus,
resetKeyboardActions,
reshape,
revalidate,
scrollRectToVisible,
setAlignmentX,
setAlignmentY,
setAutoscrolls,
setBackground,
setBorder,
setDebugGraphicsOptions,
setDoubleBuffered,
setEnabled,
setFlag,
setFont,
setForeground,
setMaximumSize,
setMinimumSize,
setNextFocusableComponent,
setOpaque,
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,
eventEnabled,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents_NoClientCode,
getComponents,
getLayout,
getMouseEventTarget,
getWindow,
initIDs,
insets,
invalidate,
invalidateTree,
isAncestorOf,
layout,
lightweightPrint,
list,
list,
locate,
minimumSize,
nextFocus,
paintComponents,
postProcessKeyEvent,
postsOldMouseEvents,
preferredSize,
preProcessKeyEvent,
print,
printComponents,
printOneComponent,
processContainerEvent,
processEvent,
proxyEnableEvents,
proxyRequestFocus,
remove,
remove,
removeAll,
removeContainerListener,
setFocusOwner,
setLayout,
transferFocus,
validate,
validateTree |
| Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
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,
getLocale,
getLocation,
getLocationOnScreen,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getSize,
getToolkit,
getToolkitImpl,
getTreeLock,
getWindowForObject,
gotFocus,
handleEvent,
hide,
imageUpdate,
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,
removePropertyChangeListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
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,
registerNatives,
wait,
wait,
wait |
| Field Detail |
static final int WIDTH
static final int HEIGHT
static final long TIMEVAL
WBFrame parent
MGraphics g
MGraphics gOff
MGraphics gDrag
java.awt.FontMetrics fm
java.awt.Image imoff
java.awt.Image imdrag
int initx
int inity
int lastx
int lasty
int pointx
int pointy
int dragx
int dragy
int idragx
int idragy
int killx
int killy
int lastsize
long lastdragged
java.util.Vector polyx
java.util.Vector polyy
boolean inpoly
boolean virgin
boolean nuked
Entry founde
int strx
int stry
int scrollx
int scrolly
boolean kludge
int pagenumber
boolean bCanDrawText
boolean firsttime
private java.lang.String sPrev
static int xxxxx
| Constructor Detail |
public DrawArea(WBFrame p,
int pnum)
p - the whiteboard assoicated with me.pnum - page number| Method Detail |
public void doLayout()
public void updateGraphics()
public java.awt.Dimension getMinimumSize()
public java.awt.Dimension getMaximumSize()
public java.awt.Dimension getPreferredSize()
public void draw(MGraphics g,
Entry e)
g - the given Graphics handle.e - the given entry.public void paintComponent(java.awt.Graphics gg)
g - the given Graphics object.public void clearEntry(Entry fe)
fe - the given entry to be cleared.public void drawTextBox()
public void this_mousePressed(java.awt.event.MouseEvent ev)
public void this_mouseDragged(java.awt.event.MouseEvent ev)
public void this_mouseMoved(java.awt.event.MouseEvent ev)
public void this_mouseReleased(java.awt.event.MouseEvent ev)
public void this_keyPressed(java.awt.event.KeyEvent ev)
public void signalfinal()
public java.awt.Image getImage()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||