|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
edu.mit.sketch.clocksketch.gui.DrawingPanel
public class DrawingPanel
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Field Summary | |
|---|---|
static java.lang.String |
ANIMATION_FINISHED
|
static java.lang.String |
ANIMATION_STARTED
|
static java.lang.String |
UPDATE_TIME
|
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, 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.print.Printable |
|---|
NO_SUCH_PAGE, PAGE_EXISTS |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
DrawingPanel(java.util.Collection<PenDrawing> drawingsIn)
Creates a JPanel for animating the drawing, given a PenDrawing to work off of |
|
DrawingPanel(java.util.Collection<PenDrawing> drawingIn,
double initialWidth)
|
|
| Method Summary | |
|---|---|
void |
addActionListener(java.awt.event.ActionListener a)
|
void |
BoldHighlight(boolean show)
|
void |
cancelAnimation()
Stops the timer, resets the drawing and releases the animation lock |
void |
displayDrawing()
Method call to show the drawing as a static image |
void |
displayDrawing(double scalingX,
double scalingY,
java.awt.Graphics2D g2d)
Draws the drawing using the DrawingPanel's width and height |
void |
doAnimation(java.util.TreeSet<PenDrawing> drawingsToAnimate)
Starts animating the drawing. |
void |
draw(double scalingX,
double scalingY,
boolean showPoints,
boolean NoShowInitX,
java.awt.Graphics2D g2d,
java.util.TreeSet<PenDrawing> drawingsToUse)
Draws the drawing w/ supplied scaling, widths, and Graphics2D |
java.lang.String |
getAnimationTime()
|
java.awt.Graphics2D |
getDrawingGraphics()
|
double |
getImageScaleX()
|
double |
getImageScaleY()
|
java.util.Collection<PenDrawing> |
getPenDrawings()
Returns the PenDrawing the DrawingPanel is using. |
Point |
getSelectedPoint()
|
Stroke |
getSelectedStroke()
|
void |
invalidateBackground(boolean invalidation)
|
boolean |
isAnimationPaused()
Returns true if the animation is running, but paused at the moment. |
boolean |
isAnimationRunning()
|
void |
NoClassifDisp(boolean show)
RD 6/9 Tells the panel to turn off all annotaiton display |
void |
NoShowInitPointX(boolean show)
|
void |
pauseAnimation()
Stops the timer, but doesn't reset the drawing or release the animation lock, effectively pausing the animation |
int |
print(java.awt.Graphics arg0,
java.awt.print.PageFormat pageF,
int numPages)
|
void |
removeActionListener(java.awt.event.ActionListener a)
|
void |
resetSize()
Resizes the Panel if there have been any changes in the drawing size. |
void |
setDisplayDrawing(boolean drawing)
Sets the boolean which dictates whether to redraw the drawing |
void |
setDrawAncillaryInfo(boolean drawAncillaryInfo)
|
void |
setImageScale(double scale)
Changes the scale of the drawing uniformly for the X and Y axis |
void |
setImageScale(double scaleX,
double scaleY)
Changes the scale of the drawing for both the X and Y axis... |
java.lang.String |
setRelativeZoom(double zoom)
Multiples the current scale by the double argument, and returns a string with the percentile of zoom. |
void |
setSelectedPoint(Point p)
|
void |
setSelectedStroke(Stroke s)
|
void |
setShowAnimationTime(boolean show)
|
void |
setTimeScale(double scale)
Changes the speed of the animation |
boolean |
showAnimationTime()
|
void |
showExtrapolatedPoints(boolean show)
|
void |
showPoints(boolean show)
Tells the panel whether to draw an "x" at each point |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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 |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String ANIMATION_FINISHED
public static java.lang.String ANIMATION_STARTED
public static java.lang.String UPDATE_TIME
| Constructor Detail |
|---|
public DrawingPanel(java.util.Collection<PenDrawing> drawingsIn)
drawingsIn -
public DrawingPanel(java.util.Collection<PenDrawing> drawingIn,
double initialWidth)
| Method Detail |
|---|
public void setDisplayDrawing(boolean drawing)
drawing - public void displayDrawing()
public void showPoints(boolean show)
public void NoShowInitPointX(boolean show)
public void BoldHighlight(boolean show)
public void NoClassifDisp(boolean show)
show - public void showExtrapolatedPoints(boolean show)
public void doAnimation(java.util.TreeSet<PenDrawing> drawingsToAnimate)
public void pauseAnimation()
public boolean isAnimationPaused()
public void cancelAnimation()
public void setDrawAncillaryInfo(boolean drawAncillaryInfo)
public boolean isAnimationRunning()
public java.lang.String getAnimationTime()
public void invalidateBackground(boolean invalidation)
public void setImageScale(double scale)
public double getImageScaleX()
public double getImageScaleY()
public Stroke getSelectedStroke()
public Point getSelectedPoint()
public void setSelectedStroke(Stroke s)
public void setSelectedPoint(Point p)
public void setImageScale(double scaleX,
double scaleY)
public java.lang.String setRelativeZoom(double zoom)
zoom - public void resetSize()
public void setTimeScale(double scale)
public java.util.Collection<PenDrawing> getPenDrawings()
public void displayDrawing(double scalingX,
double scalingY,
java.awt.Graphics2D g2d)
scalingX - scalingY - g2d - public boolean showAnimationTime()
public void setShowAnimationTime(boolean show)
public void draw(double scalingX,
double scalingY,
boolean showPoints,
boolean NoShowInitX,
java.awt.Graphics2D g2d,
java.util.TreeSet<PenDrawing> drawingsToUse)
public void addActionListener(java.awt.event.ActionListener a)
public void removeActionListener(java.awt.event.ActionListener a)
public java.awt.Graphics2D getDrawingGraphics()
public int print(java.awt.Graphics arg0,
java.awt.print.PageFormat pageF,
int numPages)
throws java.awt.print.PrinterException
print in interface java.awt.print.Printablejava.awt.print.PrinterException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||