Modern Java
http://www.modernminds.com
H eadlines Demo

The Headlines demonstration presents a simple panel set that implements a sophisticated looking "headline ticker" display. To jump to a page that would contain the detailed story for a headline, all that the user must do is click on the applet when the headline of interest is displayed.

A pplet Tag

The applet tag for the Headlines applet is shown below.

<APPLET CODEBASE="../../Java"
  WIDTH="400" HEIGHT="25"
  CODE="WildViewApplet.class">
<PARAM NAME="loadMsg"
  VALUE="Standby for the latest headlines...">
<PARAM NAME="color" VALUE="000000">
<PARAM NAME="panelSet1"
  VALUE="DocExamples/Headlines/Headlines.TXT">
</APPLET>
P anel Set File

The panel set file used by the Headlines applet is shown below.

<PANEL name=Headlines module="WVPanelText"
  x=0 y=0 w=100 h=25
  background=000000 fontColor=ff0000
  fontSize=18 fontStyle=bold
  justify=center align=middle>
Headlines

<PANEL name=Staging module="WVPanelText"
  hidden=true w=300 h=25
  background=000000 fontSize=14 fontStyle=bold
  justify=left align=middle>

<PANEL name=fx module="WVPanelFx"
  x=100 y=0 w=300 h=25
  clock=50 preRender=true frames=10
  notify=control sourcePanel=Staging
  sourceX=0 sourceY=0
  sourceW=300 sourceH=25>

<PANEL name=weblink module="WVPanelURL"
  x=0 y=0 w=300 h=25
  target=WildAdBanner>

<PANEL name=control module="WVPanelTimer">
<TRIGGER panel=weblink enable=false>
<TRIGGER panel=Staging fontColor=ffff00
  text="click for story details...">
<TRIGGER panel=fx effect=up>
<WAIT id=fx>
<WAIT timeout=30>

<TRIGGER panel=Staging fontColor=77efef
  text="Intelligent Life Discovered on Earth">
<TRIGGER panel=weblink enable=true
  url=../Examples/Headlines/Headline1.html>
<TRIGGER panel=fx effect=down>
<WAIT id=fx>
<WAIT timeout=30>

<TRIGGER panel=Staging fontColor=ffffff
  text="Scientists able to Predict Stock Market">
<TRIGGER panel=weblink
  url=../Examples/Headlines/Headline2.html>
<TRIGGER panel=fx effect=left+fade>
<WAIT id=fx>
<WAIT timeout=30>

<TRIGGER panel=Staging fontColor=77efef
  text="First Townhomes on Moon Planned">
<TRIGGER panel=weblink
  url=../Examples/Headlines/Headline3.html>
<TRIGGER panel=fx effect=left+fade>
<WAIT id=fx>
<WAIT timeout=30>

<TRIGGER panel=Staging fontColor=ffffff
  text="Computer Wins Presidential Election">
<TRIGGER panel=weblink
  url=../Examples/Headlines/Headline4.html>
<TRIGGER panel=fx effect=left+fade>
<WAIT id=fx>
<WAIT timeout=30>

Notes
  • Notice that the WVPanelTimer panel (named control) has a <WAIT id=fx> tag after each trigger that is sent to the WVPanelFx panel to begin a transition animation. This is used to ensure that the new headline is displayed at least three full seconds after each transition animation completes. The way this works is that the WVPanelFx panel has specified the attribute "notify=control." Since pre-rendering is being performed for the transition animations (preRender=true), the notify attribute is used to send a trigger to the WVPanelTimer panel whenever a transition animation completes. The WVPanelTimer panel <WAIT>s until it receives this trigger, then immediately begins a three second delay.
Copyright © 1997 by Modern Minds, Inc.