com.objectplanet
Class HNewsTicker

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byjava.applet.Applet
                  extended bycom.objectplanet.Ticker
                      extended bycom.objectplanet.HNewsTicker
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class HNewsTicker
extends Ticker

This news ticker applet scrolls news headers from right to left and opens a web page when the user clicks on a news header.

<applet code=com.objectplanet.HNewsTicker
  archive=com.objectplanet.HNewsTicker.jar
  width=100% height=20>
<param name=news_0 value="Other ObjectPlanet Products: ">
<param name=news_1 value="Network Probe - display network traffic">
<param name=newsLink_1 value=" http://objectplanet.com/Probe">
<param name=news_2 value="Surveyor - create online surveys">
<param name=newsLink_2 value="http://objectplanet.com/Surveyor">
<param name=news_3 value="EasyCharts - java charts">
<param name=newsLink_3 value="http://objectplanet.com/EasyCharts ">
<param name=news_4 value="Table Applet - java table applet">
<param name=newsLink_4 value=" http://objectplanet.com/Table">
<param name=news_5 value="TabbedPanel - tabbed panel for JDK 1.1">
<param name=newsLink_5 value="http://objectplanet.com/TabbedPanel">
<param name=news_6 value="BarChartApplet - only 18 KB footprint">
<param name=newsLink_6 value=" http://objectplanet.com/BarChartApplet">
<param name=news_7 value="LineChartApplet - only 18 KB footprint">
<param name=newsLink_7 value="http://objectplanet.com/LineChartApplet">
<param name=news_8 value="PieChartApplet - only 14 KB footprint">
<param name=newsLink_8 value=" http://objectplanet.com/PieChartApplet">
<param name=news_9 value="ProgressBar - java progress bar">
<param name=newsLink_9 value="http://objectplanet.com/ProgressBar">
<param name=speed value=80>
<param name=space value=100>
<param name=font value="Arial,bold,11">
<param name=target value="window">
<param name=background value="#d4e7e7">
<param name=fontColor value="gray">
<param name=focusColor value="black">
</applet>

news_N
The news headers. Each news header is numbered from 0 and up.
<param name=news_0 value="first news item">
<param name=news_1 value="second news item">
<param name=news_2 value="third news item">

newsLink_N
The links for the news headers. The link is opened when the user clicks on one of the corresponding news items.
<param name=newsLink_0 value="http://objectplanet.com">
<param name=newsLink_1 value="../products.html">
<param name=newsLink_2 value="/NewsTicker">

target
The name of the target window where the web page should be opened.
<param name=target value="window_name">

background
The background color of the applet.
<param name=background value="orange">
<param name=background value="#669996">

newsFont
The font used for the news items. The first field is the font name, the second is plain, bold, or bolditalic. The last field is the point size of the font.
<param name=newsFont value="Arial,bold,12">

newsColor
The color of the font used.
<param name=newsColor value="black">
<param name=newsColor value="#669996">

focusColor
The color used for news headers when the mouse is over it.
<param name=focusColor value="red">
<param name=focusColor value="#669996">

scrollSpeed
The scroll speed, ranging from 0 to 100, where 0 is the slowest, and 100 is the fastest.
<param name=scrollSpeed value="40">
<param name=scrollSpeed value="90">

space
The space between the news headers.
<param name=space value="150">

Author:
Bjorn J. Kvande
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class com.objectplanet.Ticker
border, BORDER_DOWN, BORDER_EMBOSSED, BORDER_GROOVED, BORDER_NONE, BORDER_SOLID, BORDER_UP, borderColor, currentCursor, CURSOR_DEFAULT, CURSOR_LINK, focusColor, focusIndex, headerHeight, horzOffset, linkPositions, mousePosition, newsColor, newsFont, newsHeaderColor, newsHeaderFont, newsItems, offscreen, scrollSpeed, target, waitNextNews, vertOffset
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
HNewsTicker()
          Constructs the applet.
 
Method Summary
protected  void checkCursor(int xpos, int ypos)
          Checks if the cursor is above a link.
 void init()
          Initializes the applet.
 void setParameter(java.lang.String name, java.lang.String value)
          Sets a parameters value.
 
Methods inherited from class com.objectplanet.Ticker
convertLineBreaks, createColor, createFont, createURL, paint, processEvent, start, stop, update
 
Methods inherited from class java.applet.Applet
destroy, getAccessibleContext, 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
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, 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, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HNewsTicker

public HNewsTicker()
Constructs the applet.

Method Detail

checkCursor

protected void checkCursor(int xpos,
                           int ypos)
Checks if the cursor is above a link.

Parameters:
xpos - The x position of the cursor.
ypos - The y position of the cursor.

init

public void init()
Initializes the applet.

Overrides:
init in class Ticker

setParameter

public void setParameter(java.lang.String name,
                         java.lang.String value)
Sets a parameters value.

Overrides:
setParameter in class Ticker
Parameters:
name - The name of the parameter.
value - The value of the parameter.