advertisement
javaboutique
Search Tips
Articles  |   Tutorials  |   Reviews  |   Tools  |   by Category  |   by Date  |   by Name  |   Submit  |   Source  |   Forums  |  
javaboutique
Browse DevX


Partners & Affiliates











advertisement

ScrollWriter Configuration


Sample HTML Source:

<applet code=ScrollWriterPromo.class width=230 height=150>
<!param name=sourceFile value="data.txt">
<param name=totalLines value="14">
<param name=defaultFontColor value="0,0,200">
<param name=defaultFontSize value="13">
<param name=defaultFontStyle value="PLAIN">
<param name=defaultFontName value="Dialog">
<param name=topMargin value="10">
<param name=horizontalMargin value="5">
<param name=cursorType value="UNDERLINE">
<param name=cursorColor value="255,0,0">
<param name=scrollOffset value="8">
<param name=defaultCharSleep value="60">
<param name=defaultLinePause value="100">
<param name=backgroundColor value="255,255,255">
<param name=urlMouseOverColor value="255,255,0">
<param name=defaultLineAlignment value="LEFT">
<param name=onMouseOverPause value="true">
<param name=scrollSpeed value="30">
<param name=target value="_blank">
<param name=smoothScroll value="true">
<param name=lineSpacing value=1>

<param name=line1 value="Features: ">
<param name=fgColor1 value="255,0,0">
<param name=alignment1 value="CENTER">
<param name=fontName1 value="Courier">
<param name=message1 value="ScrollWriter features">
<param name=fontSize1 value="16">
<param name=fontStyle1 value="BOLD+ITALIC">
<param name=charSleep1 value="90">
<param name=pause1 value="100">

<param name=line2 value="">
<param name=line3 value="Customizable speeds and delays">
<param name=line4 value="Adjustable font, color, style, size">
<param name=fontName4 value="TimesNewRoman">
<param name=fontSize4 value="14">
<param name=fgColor4 value="0,0,255">
<param name=line5 value="Target parameter for URL links">
<param name=line6 value="Customizable text alignment">
<param name=alignment6 value="RIGHT">
<param name=line7 value="Top and horizontal margin settings">
<param name=line8 value="Professional quality smooth scrolling">
<param name=fgColor8 value="0,0,0">
<param name=line9 value="Optional pause on mouse-over">
<param name=line10 value="Customize the status bar message">
<param name=message10 value="Place your own message here!">
<param name=line11 value="Mouse-over highlighted URL links">
<param name=url11 value="http://www.internet.com">
<param name=line12 value="Input content from text file">
<param name=line13 value="">
<param name=line14 value="Presented by consulting.com, Inc.">
<param name=alignment14 value="CENTER">
<param name=fgColor14 value="255,0,0">
<param name=pause14 value="3000">
<param name=fontSize14 value="12">

</applet>

Configuration: Applet Parameters


numberOfLines  The number of lines of text to be displayed in the applet.
scrollOffset  The number of lines that will be typed before the applet starts scrolling text.
defaultFontColor  The default text color for all lines. This is specified by the three digit RGB (red, green, blue) value for the color. The three numbers must be separated by commas. For example, the following line sets the font color to red.

<param name=defaultFontColor value="255,0,0">

defaultFontSize  The default font size for all text.
defaultFontStyle  This is the default font style used in the applet. Use one of the following:
  • PLAIN
  • BOLD
  • ITALIC
  • ITALIC+BOLD
defaultFontName  The default font used for all text displayed in the applet. Use one of the following:
  • TimesNewRoman
  • Courier
  • Dialog
  • Helvetica
 
topMargin  The amount of vertical space between the top of the applet and the first line of text.
verticalMargin  The amount of horizntal space between the side of the applet and the text.
cursorType  Describes which character, if any, that will be displayed just before each new character is typed. Possible values are:
  • UNDERLINE
  • BLOCK
  • NONE
cursorColor  The color of the cursor. This is specified by the three digit RGB (red, green, blue) value for the color. The three numbers must be separated by commas. For example, the following line sets the cursor color to red.

<param name=cursorColor value="255,0,0">

defaultCharSleep  The speed at which the text is typed.
defaultLinePause  The default amount of time the each page is displayed after each line has been typed.
backgroundColor  The background color of the applet. This is specified by the three digit RGB (red, green, blue) value for the color. The three numbers must be separated by commas. For example, the following line sets the background color to red.

<param name=backgroundColor value="255,0,0">

urlMouseOverColor  The color of all links when the mouse is placed over them.
defaultLineAlignment  The default horizontal alignment of the text. Possible values are:
  • left
  • right
  • middle
onMouseOverPause  Set this value to 'true' if you would like the typing to pause when the mouse is placed over the applet.
scrollSpeed  The speed at which the text scrolls upward. The lower the number, the faster the scroll.
smoothScroll  Set this value to 'true' if you would like the scroll to be smooth. Set this value to 'false' for an immediate scroll.
target  The target frame for all links.
linespacing  The amount of vertical space between each line.
lineX  Each line parameter contains one sentence to be displayed in the applet. The first sentence is specified by the parameter line1, the second by line2, etc.
fgColorX  The font color for the text on line number X. This is specified by the three digit RGB (red, green, blue) value for the color. The three numbers must be separated by commas. For example, the following line sets the text color of line 1 to red.

<param name=fgColor1 value="255,0,0">

fontNameX  Sets the font used for the text on line number X. For example, use the parameter font1 to change the font for line 1. Use one of the following values:
  • TimesNewRoman
  • Courier
  • Dialog
  • Helvetica
 
alignmentX  The default horizontal alignment of the text on line nnumber X. Possible values are:
  • left
  • right
  • middle
urlX  The url to display when line number X is clicked.
messageX  Message to be displayed in the status bar when the mouse is placed over line number X.
fontSizeX  Sets the font size for the text on line number X. For example, use the parameter size1 to change the font size for line 1.  
fontStyleX  This is the font style for the text on line number X. Use one of the following:
  • PLAIN
  • BOLD
  • ITALIC
  • ITALIC+BOLD
pauseX  The amount of time line number X is displayed after the entire line has been typed. For example, to display the text on line 1 for 4 seconds, set the parameter Pause1 to "4000".
charSleepX  The speed at which the text is typed for line X.
sourcefile  The sourcefile parameter may be used in place of the line parameter to specify the text displayed in the applet. To use the sourcefile parameter, set its value to the filename that you want to display. This file must be a text file.

When using the sourcefile parameter you should delete the line1, line2, ...linex, parameters since all of the text will come from the text file. Similarly, if you leave the sourcefile parameter empty, then you should include the string1, string2, ...stringx parameters.

For example, if you want to display text from a text file, the code should look like this:

<param name=sourcefile value="data.txt">

and you can delete all the lines like

<param name=line1 value="Sentence number one.">
<param name=line2 value="Sentence number two.">

In this case, a text file named data.txt must exist in the same directory as the applet's class file. It must also contain two lines, the first containing "Sentence number on." and the second "Sentence number two."

To see this parameter in action, delete the string parameters from this example and set the sourcefile parameter to Data.txt

Author: consulting.com, Inc.

Homepage: http://www.consultcom.com/Java/Applets/ScrollWriter.html

Upload Date: February 24, 2000

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.

 IBM Software Construction Toolbox
 Microsoft RIA Development Center
 Destination .NET
XML error: not well-formed (invalid token) at line 33
advertisement
Receive Articles via our XML/RSS feed
Receive Articles via our XML/RSS feed

JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for Windows 95, 98, ME, NT, 2000 and XP. It's designed to automatically optimize your Windows settings, boosting your Internet connection up to 200%.

Citrix CTO Eyes the Future of Virtualization
The Pitfalls of Open Source Litigation
LiMo Open to Working With Google on Mobile
Google Gadgets Under Attack at Black Hat
IBM, Linux and the Microsoft-Free PC
Opengear's Open Source Odyssey
Sun Moves JavaFX Closer to Primetime
Will LSB 4 Standardize Linux?
Making a Case for an Android-Symbian Merger
Ubuntu Launchpad Opens Up Development

Base Concepts of Internationalization in PHP
An Introduction to F# for Functional Programming
The Basics of REALbasic, Cross-platform RAD Tool in the Mold of VB
Silverlight Streaming: Free Video Hosting for All
What's New in ASP.NET 3.5?
Putting SharePoint to Work for You
Putting Intel® Threading Building Blocks to Work
Achieve the Best of Two Worlds with Behavior-Driven Development
Understanding Windows Mobile Security
RODCs Transform Branch Office Security

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers