|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
com.objectplanet.Ticker
This class is the abstract superclass of all tickers.
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 | |
protected int |
border
The border style. |
protected static int |
BORDER_DOWN
|
protected static int |
BORDER_EMBOSSED
|
protected static int |
BORDER_GROOVED
|
protected static int |
BORDER_NONE
|
protected static int |
BORDER_SOLID
|
protected static int |
BORDER_UP
|
protected java.awt.Color |
borderColor
|
protected java.lang.Object |
currentCursor
|
protected java.lang.Object |
CURSOR_DEFAULT
The different cursors used (default and one for a link). |
protected java.lang.Object |
CURSOR_LINK
|
protected java.awt.Color |
focusColor
The color used for a focused news body. |
protected int |
focusIndex
The index of the focused news item. |
protected int |
headerHeight
The header height. |
protected int |
horzOffset
The offset position where the news should be painted. |
protected java.util.Vector |
linkPositions
We keep the position of news bodies so we can select it with the mouse. |
protected java.awt.Point |
mousePosition
Keeps track of the mouse position. |
protected java.awt.Color |
newsColor
The color used for the news body text. |
protected java.awt.Font |
newsFont
The font used for the news item. |
protected java.awt.Color |
newsHeaderColor
The color of the news header. |
protected java.awt.Font |
newsHeaderFont
The font of the news header. |
protected java.util.Vector |
newsItems
Contains any array of three strings for each news item. |
protected java.awt.Image |
offscreen
Paint everything on an offscreen image to avoid flicker. |
protected int |
scrollSpeed
The scrolling speed. |
protected java.lang.String |
target
The name of the target window where the news item is opened. |
protected boolean |
waitNextNews
This is set to true when the scrolling should pause before showing the next news. |
protected int |
vertOffset
The offset position where the news should be painted. |
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 | |
Ticker()
Constructs the news ticker. |
Method Summary | |
protected java.lang.String |
convertLineBreaks(java.lang.String label)
Converts the characters \ and n to '\n'. |
protected static java.awt.Color |
createColor(java.lang.String color)
Creates a color based on the string. |
protected static java.awt.Font |
createFont(java.lang.String value,
java.lang.String name,
int type,
int size)
Creates a font based on the information in the specified string. |
protected java.net.URL |
createURL(java.lang.String urlString)
Creates a URL from the specified string. |
void |
init()
Initializes the news ticker, reading the news parameters. |
void |
paint(java.awt.Graphics g)
Renders the news ticker. |
void |
processEvent(java.awt.AWTEvent event)
Processes the mouse events. |
void |
setParameter(java.lang.String name,
java.lang.String value)
Sets a parameter. |
void |
start()
Starts the news ticker scroller. |
void |
stop()
Stops the news ticker scroller. |
void |
update(java.awt.Graphics g)
Overridden to avoid flickering. |
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 |
Field Detail |
protected int border
protected static final int BORDER_DOWN
protected static final int BORDER_EMBOSSED
protected static final int BORDER_GROOVED
protected static final int BORDER_NONE
protected static final int BORDER_SOLID
protected static final int BORDER_UP
protected java.awt.Color borderColor
protected java.lang.Object currentCursor
protected java.lang.Object CURSOR_DEFAULT
protected java.lang.Object CURSOR_LINK
protected java.awt.Color focusColor
protected int focusIndex
protected int headerHeight
protected int horzOffset
protected java.util.Vector linkPositions
protected java.awt.Point mousePosition
protected java.awt.Color newsColor
protected java.awt.Font newsFont
protected java.awt.Color newsHeaderColor
protected java.awt.Font newsHeaderFont
protected java.util.Vector newsItems
protected java.awt.Image offscreen
protected int scrollSpeed
protected java.lang.String target
protected boolean waitNextNews
protected int vertOffset
Constructor Detail |
public Ticker()
Method Detail |
protected java.lang.String convertLineBreaks(java.lang.String label)
label
- The label with the \ and n.protected static java.awt.Color createColor(java.lang.String color)
protected static java.awt.Font createFont(java.lang.String value, java.lang.String name, int type, int size)
value
- The font string value.name
- The name of the default font.type
- The default type (Font.PLAIN, Font.BOLD, Font.ITALIC).size
- The default size.protected java.net.URL createURL(java.lang.String urlString)
urlString
- The url string.
public void init()
public void paint(java.awt.Graphics g)
g
- The graphics object used to paint with.public void processEvent(java.awt.AWTEvent event)
public void setParameter(java.lang.String name, java.lang.String value)
name
- The name of the parameter.value
- The value of the parameter to set.public void start()
public void stop()
public void update(java.awt.Graphics g)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |