Class Project2

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--Project2
All Implemented Interfaces:
Accessible, ActionListener, EventListener, ImageObserver, MenuContainer, MouseListener, Serializable

public class Project2
extends Applet
implements ActionListener, MouseListener

See Also:
Serialized Form

Inner classes inherited from class java.applet.Applet
Applet.AccessibleApplet
 
Inner classes inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.AWTTreeLock
 
Fields inherited from class java.applet.Applet
accessibleContext
 
Fields inherited from class java.awt.Container
component, containerListener, layoutMgr, listeningBoundsChildren, listeningChildren, 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, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Project2()
          Constructor method - initiallizes the applet creates and defines the boundaries of the GUI objects and adds itself as an ActionListener to the Textfields
 
Method Summary
 void actionPerformed(ActionEvent e)
          the Handler for the textfield-generated events updates the time displayed on each of the clocks
 void mouseClicked(MouseEvent e)
          empty but required method for mouseEvent handling
 void mouseEntered(MouseEvent e)
          changes the view position of the easternclock when the mouse moves over it * @param e -the mouse event occuring
 void mouseExited(MouseEvent e)
          changes the view posititon of the eastern clock when the mouse leaves its area * @param e -the mouse event occuring
 void mousePressed(MouseEvent e)
          empty but required method for mouseEvent hanlding
 void mouseReleased(MouseEvent e)
          empty but required method for mouseEvent hanlding
 void paint(Graphics g)
          the paint method draws the graphics that surround the clock calls paintBackground, passing it the applet's graphics object * and the x and y of the applet window (always 0, 0)
 void paintBackground(Graphics g, int x, int y)
          paintBackground - paints the background of the appplet inside any graphics bounds given the Graphics object and the relative coordinates for the upperleft corner in the applet enables clock components to simulate transparency
 
Methods inherited from class java.applet.Applet
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
, addNotify, constructComponentName
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paintComponents, paintHeavyweightComponents, paramString, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusOwner, setFont, setLayout, transferFocus, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resetGC, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Project2

public Project2()
Constructor method - initiallizes the applet creates and defines the boundaries of the GUI objects and adds itself as an ActionListener to the Textfields
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
the Handler for the textfield-generated events updates the time displayed on each of the clocks
Specified by:
actionPerformed in interface ActionListener
Parameters:
e - the ActionEvent performed

mouseClicked

public void mouseClicked(MouseEvent e)
empty but required method for mouseEvent handling
Specified by:
mouseClicked in interface MouseListener
Parameters:
e - -the mouse event occuring

mouseEntered

public void mouseEntered(MouseEvent e)
changes the view position of the easternclock when the mouse moves over it * @param e -the mouse event occuring
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
changes the view posititon of the eastern clock when the mouse leaves its area * @param e -the mouse event occuring
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
empty but required method for mouseEvent hanlding
Specified by:
mousePressed in interface MouseListener
Parameters:
e - -the mouse event occuring

mouseReleased

public void mouseReleased(MouseEvent e)
empty but required method for mouseEvent hanlding
Specified by:
mouseReleased in interface MouseListener
Parameters:
e - -the mouse event occuring

paint

public void paint(Graphics g)
the paint method draws the graphics that surround the clock calls paintBackground, passing it the applet's graphics object * and the x and y of the applet window (always 0, 0)
Overrides:
paint in class Container
Parameters:
g - the Graphics object

paintBackground

public void paintBackground(Graphics g,
                            int x,
                            int y)
paintBackground - paints the background of the appplet inside any graphics bounds given the Graphics object and the relative coordinates for the upperleft corner in the applet enables clock components to simulate transparency
Parameters:
g - the Graphics object to paint with
x - the x coordinate
y - the y coordinate of the point within the Graphics bounds which is to be treated as the upper left most pixel


Generated by BlueJ