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


Partners & Affiliates











advertisement

VScroller


VScroller
A full customizable Vertical Scroller 2.0

There are several steps to make the applet running.

We need to configure 3 kind of parameters :

  1. Global parameters
  2. Indexed parameters
  3. Configuration file

Indexed parameters  are numbered   from 1 to 30. For defining a  specific parameter, you just need to add the parameter number at the end of the parameter name :

e.g. : the second Color defined of the applet would be so defined:

<PARAM NAME="COLOR2" VALUE="000000,0000CC">

If parameters include multiple values they will be separated by a COMMA

Global Parameters
DELAY Expressed in milliseconds, it defines the delay the screen will be refreshed
BGIMAGE Background Image
FGIMAGE Foreground Image
PAUSEHEIGHT Y position where the scroll pauses. 
STEP The step parameter is expressed in pixels. It defines the smoothness of the animation. You should set this to 1 or 2, for the most visual effect. For speed up the animation you can increase this step parameter

The height of the Applet must be divideable by the STEP parameter, otherwise it won't make the configured pauses.  This is that way to ensure the smooth of the animation. 

STOPSCROLL if set to 1, the Applet stops the scroll when the mouse is in the applet window. if set to 1, user can also scroll through the window with the mouse. Press mouse button and move it to scroll up and down.
BGCOLOR Defines the background color in Hexadecimal
DEFPADX This is the default value of Horizontal padding. See the file configuration section for more info.
DEFPADY This is the default value of the vertical padding. See the file configuration section for more info.
DEFSP This is the default spacing you will add after a paragraph.
FILE This is the url to the configuration file to be read.
FADE This is a 3 values parameter, enabling you making some fade filter on the top and bottom of the page. The fade is made from the initial color pixel to the default background color.

Personally, I do not recommend the use of this feature if you want it make to run on Netscape.

Anyway, you should use this feature on small windows, and with delays up to 150, decreasing the number of frames by second to max. 7.

The first value defines if we have to enables the fade feature, the second value is the height faded at the top of the applet and the 3d value is the height faded at the bottom of the applet.

e.g. : VALUE="1,10,10"

Indexed Parameters
The indexed parameters will be used later in the configuration file. We will define here the fonts, colors and pictures used through the entire applet.


COLOR This parameter defines the text color used. There are 2 parameters, a normal color and an highlighted color. If you do not want to make any highlighting just put twice the same value.
FONT A font name to be used. All font specific indexes are linked. So you cannot specify into a paragraph an index for the font, the font size, and other.
FONTSIZE The font size
FONTSTYLE Style of font : can be : 'BOLD', 'ITALIC' or 'BOLDITALIC'
IMAGE 2 Values representing an normal state image and an highlighted image
SHADOW The shadow parameter accepts 4 other fields. It's used with the text drawn.  2 colors represents the normal state and the highlighted stated. the two last fields represents the x and y displacement of the text.

The configuration text file
The configuration text file is a set of parameters which are embedded between a BEGIN and a END statement. None of the parameters are mandatory, however it will be interesting to put at least one line of text or one image. For making spaces between sets you can use a specific parameter for it.

e.g.:

BEGIN
    DELAY=3000
    IMAGE=1
END


TEXT This parameter will defines the text to be displayed. You can put so many text you want. To force a line break there are two ways to go. One is to insert a pipe character into the text, the second way is to put a new Text parameter.

This is the only parameter which can be defined multiple times.

TIP This parameter defines the text to be displayed in the status bar when a paragraph is highlighted.
URL This is the URL to launch on a mouse click.
TARGET Window where to load a selected URL
HALIGN You can horizontally align the text in three ways. By default alignment is set to left, 2 other parameters are accepted : CENTER or RIGHT
VALIGN You can vertically align the text in three ways. By default alignment is set to TOP, 2 other parameters are accepted : CENTER or BOTTOM
PADX This define a horizontal  margin, it can be a right margin or a left margin expressed in pixels. A positive value is a left margin and a negative value is a right margin.
PADY This define a vertical margin, it can be a top  margin or a bottom margin expressed in pixels. A positive value is a top margin and a negative value is a bottom margin.
FONT This defines the font to use. The font you will use must be related to the index of the indexed parameters
COLOR This is the same as for the Font parameter. You define a color to use by the index used in your indexed parameters.
SHADOW Index to Shadow indexed parameters
DELAY You can pause the applet when this message reaches the top of the screen. The pause is expressed in milliseconds.
SPACING This defines the space you want to add after the completely rendered paragraph. It takes in count of the text and images height.

For some unknown reasons, java doesn't calculates exactly the height of a font. It is not recommanded to use a 0 pixel spacing.

If your applet seems to copy the last pixels of a paragraph over and over, you just have to increase this value.

A last note, when your mouse is in this extra zone, no highlighting or URL launching is enabled.

IMAGE Here we go for the pictures  parameters. The pictures to use are related to the indexed parameters you defined. This enables you to use multiple times the same image without loading it, again and again.
IINDEX This parameters enables you to put an image in the background or on the foreground. There are two fields one for the normal state of the paragraph and one for the highlighted state.

This enables you to show the text only when the paragraph is hilghlighted or only if the paragraph is in a normal state.

XIPOS This is the horizontal position the picture will be drawn in its canvas
YIPOS This is the vertical position the picture will be drawn in its canvas

Back to VScroller

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.

 Microsoft RIA Development Center
 IBM Rational Resource 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%.

Free VMware Server 2.0 Now Release Candidate
Linux Player Xandros Grabs Storied Rival Linspire
Hey Enterprise: Here Comes the 3G iPhone
MySpace Opens Profile Portability API
Microsoft Jumps Into Virtualization Fray
Eclipse Ganymede Makes It Easier for Devs
Open Source Nokia a Threat to Microsoft, Google?
Salesforce, Google Head for 2nd on Apps
HP Open Sources Unix File System for Linux
Red Hat Opens Its Network to Space

Build a Generic Histogram Generator for SQL Server
Beyond XML and JSON: YAML for Java Developers
Mastering the Windows Mobile Emulators
Avaya AE Services Provide Rapid Telephony Integration with Facebook
Featured Algorithm: Intel Threading Building Blocks: parallel_reduce
Getting Started with Windows Live Admin Center
Eight Key Practices for ASP.NET Deployment
Java ME User Interfaces: Do It with LWUIT!
Talking VPro: Transcript
Bringing Semantic Technology to the Enterprise

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

Solutions
Whitepapers and eBooks
IBM eBook: Planning a Service Oriented Architecture
IBM eBook: Choosing the Right Architecture--What It Means for You and Your Business
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Avaya Article: Using Intelligent Presence to Create Smarter Business Applications
Intel Go Parallel Article: Getting Started with TBB on Windows
Microsoft Article: 7.0, Microsoft's Lucky Version?
Avaya Article: How to Feed Data into the Avaya Event Processor
IBM Article: Developing a Software Policy for Your Organization
Microsoft Article: Managing Virtual Machines with Microsoft System Center
Intel Go Parallel Article: Intel Threading Tools and OpenMP
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Silverlight 2 App and Walkthrough: Leverage Silverlight 2 with SQL Server and XML
IBM Article: Enterprise Search--Do You Know What's Out There?
HP Demo: StorageWorks EVA4400
Microsoft Article: The Progress and Promise of Deep Zoom
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES