Class DrawingBoard

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--DrawingBoard

public class DrawingBoard
extends javax.swing.JPanel
implements java.awt.event.MouseMotionListener

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
 
Field Summary
static int badFileFormat
           
static int errorStatus
           
static int fileNotFound
           
static int noError
          possible errorStatuses
static int waitingOnParse
           
static int waitingOnParseURL
           
static int waitingOnUser
           
 
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
 
Constructor Summary
DrawingBoard(ScrollingImage parent)
           
 
Method Summary
 void getDescription(int x, int y)
          response to a mouse click, requesting information about a job or events.
 UserJobList getJobs()
          return the full list of jobs
 java.lang.String getToolTipText(java.awt.event.MouseEvent e)
          sets tooltip text dynamically
 void mouseDragged(java.awt.event.MouseEvent e)
          mouseMotionListener methods
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void optimizedScrollBarAdjustment(int direction)
           
 void paintComponent(java.awt.Graphics g)
          this is the method that draws the pane whenever it needs to after it has been minimized or whatever it first checks whether it has been resized, in which case it needs to redraw itself, then .
 void recenter(int x, int y)
          this method recenters the current drawing around a new center as determined by a user mouse click
 void redraw(java.awt.Graphics g)
           
 void reparse()
           
protected  void saveEventBoxImage(LogEvent event, java.awt.Point position, java.awt.Graphics g)
           
 void scrollbarAdjustment(int target)
          this method is called by scrollingimage in response to scrollbar movements, get the scrollbar value, adjust the starts and ends and do a partial redraw
 void setFullRedraw(boolean how)
          sets whether to do a full redraw
 void showDebugData()
           
 void trimUserJobList()
           
 void zoom(int Z)
           
 void zoom(int Z, boolean firstDraw)
           
 void zoom(int Z, int x, int y)
           
 void zoom(int Z, int x, int y, boolean firstDraw)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, 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, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, 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, wait, wait, wait
 

Field Detail

noError

public static final int noError
possible errorStatuses

waitingOnParse

public static final int waitingOnParse

waitingOnParseURL

public static final int waitingOnParseURL

badFileFormat

public static final int badFileFormat

fileNotFound

public static final int fileNotFound

waitingOnUser

public static final int waitingOnUser

errorStatus

public static int errorStatus
Constructor Detail

DrawingBoard

public DrawingBoard(ScrollingImage parent)
Method Detail

getToolTipText

public java.lang.String getToolTipText(java.awt.event.MouseEvent e)
sets tooltip text dynamically
Overrides:
getToolTipText in class javax.swing.JComponent

setFullRedraw

public void setFullRedraw(boolean how)
sets whether to do a full redraw

getJobs

public UserJobList getJobs()
return the full list of jobs

mouseDragged

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

mouseMoved

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

paintComponent

public void paintComponent(java.awt.Graphics g)
this is the method that draws the pane whenever it needs to after it has been minimized or whatever it first checks whether it has been resized, in which case it needs to redraw itself, then . . . it just copies the buffer over after checking for error status hey, I'm double-buffered now (I felt so naked before) well, now swing should handle double buffering for us
Overrides:
paintComponent in class javax.swing.JComponent

getDescription

public void getDescription(int x,
                           int y)
response to a mouse click, requesting information about a job or events. Determine which job is being clicked, get description for all events at those coordinates.

zoom

public void zoom(int Z,
                 boolean firstDraw)

zoom

public void zoom(int Z)

zoom

public void zoom(int Z,
                 int x,
                 int y)

zoom

public void zoom(int Z,
                 int x,
                 int y,
                 boolean firstDraw)

recenter

public void recenter(int x,
                     int y)
this method recenters the current drawing around a new center as determined by a user mouse click

showDebugData

public void showDebugData()

scrollbarAdjustment

public void scrollbarAdjustment(int target)
this method is called by scrollingimage in response to scrollbar movements, get the scrollbar value, adjust the starts and ends and do a partial redraw

optimizedScrollBarAdjustment

public void optimizedScrollBarAdjustment(int direction)

reparse

public void reparse()

trimUserJobList

public void trimUserJobList()

redraw

public void redraw(java.awt.Graphics g)

saveEventBoxImage

protected void saveEventBoxImage(LogEvent event,
                                 java.awt.Point position,
                                 java.awt.Graphics g)