Class simpleQuote

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--Portfolio
                                |
                                +--simpleQuote

public class simpleQuote
extends Portfolio

source
class diagram

This class displays a single stock's quote data. Its displays the stock current prices, its change price for the day and a time stamp when it was last updated in the quotes data feed.

This applet is displayed on each companies listed company page found in the listed company directory.

Here is IBM's.

This class useds Portfolio's default refresher thread to updates its quote data periodically.

Redefines paintBackground(...), paintWindow(...) and getStockSymbolData(...).

Version:
1.0 08/14/99
Author:
David Mannies
See Also:
Serialized Form

Inner classes inherited from class Portfolio
Portfolio.PortfolioInfo
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
(package private) static java.awt.Font FONT_DATA
          Font for data
(package private) static java.awt.Font FONT_DATA_FRACTION
          Font for fraction
(package private) static java.awt.Font FONT_TIME_DATE
          FOnt for time stamp
 
Fields inherited from class Portfolio
BACKGROUND, COLOR_DATA, COLOR_DATA_RED, COLOR_INFO, COLOR_TICKER, DEFAULT_REFRESH_INTERVAL, FIELDS_PER_TICKER, FONT_DATA, FONT_DATA_FRACTION, FONT_TICKER, FONT_TIME_DATE, FOREGROUND, MAX_INDICES, MAX_SINGLE_TICKER_FIELDS, MAX_TICKERS, portfolio, portfolioKeys, quotesData, refresher, refreshInterval, stockSymbols, TRACE
 
Fields inherited from class java.applet.Applet
serialVersionUID, stub
 
Fields inherited from class java.awt.Panel
base, nameCounter, serialVersionUID
 
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
simpleQuote()
           
 
Method Summary
(package private)  java.util.Vector getStockSymbolData(java.lang.String data, java.util.Hashtable keys)
          Get stock symbol data from applet parameters.
 void paintBackground(java.awt.Graphics g)
          Paints background of applet on given graphics context.
 void paintWindow(java.awt.Graphics g)
          Paints quote data on given graphics context.
 
Methods inherited from class Portfolio
createImages, destroy, drawText, drawText, drawText, getQuotesData, getSourceImages, getStockSymbolData, getStockSymbolParameters, getStockSymbolsIndices, init, initData, loadTickerInBrowser, paint, run, start, stop, update
 
Methods inherited from class java.applet.Applet
getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
Methods inherited from class java.awt.Panel
, addNotify, constructComponentName
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, countComponents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, nextFocus, paintComponents, paramString, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printOneComponent, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, readObject, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusOwner, setFont, setLayout, transferFocus, validate, validateTree, writeObject
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, 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, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, 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, registerNatives, wait, wait, wait
 

Field Detail

FONT_DATA

static final java.awt.Font FONT_DATA
Font for data

FONT_DATA_FRACTION

static final java.awt.Font FONT_DATA_FRACTION
Font for fraction

FONT_TIME_DATE

static final java.awt.Font FONT_TIME_DATE
FOnt for time stamp
Constructor Detail

simpleQuote

public simpleQuote()
Method Detail

paintBackground

public void paintBackground(java.awt.Graphics g)
Paints background of applet on given graphics context.
Parameters:
g - graphics context to draw on
Overrides:
paintBackground in class Portfolio

paintWindow

public void paintWindow(java.awt.Graphics g)
Paints quote data on given graphics context.
Parameters:
g - graphics context to draw on
Overrides:
paintWindow in class Portfolio

getStockSymbolData

java.util.Vector getStockSymbolData(java.lang.String data,
                                    java.util.Hashtable keys)
Get stock symbol data from applet parameters.
Parameters:
data - applet parameter
keys - list of stock tickers
Returns:
list of portfolio stock data
Overrides:
getStockSymbolData in class Portfolio