Vnews Parameters
Vnews is an applet that displays links in several categories. The links, and category titles scroll smoothly from the bottom to the top of the applet. The appearance of the applet is controlled by applet parameters but the actual content comes from a separate url. This url may represent a text file on your web server, or a more dynamic source like a news feed.
param backColor controls the background color of the applet in hex, i.e. #FFFFFF for white.
param newsColor controls the foreground color of the link text items in hex, i.e. #FFFFFF.
param newsHLColor controls the color of the link text items when the mouse over top of the text. The highlight color.
param borderWidth controls the pixel width of a border around the applet. 0 or higher.
param borderColor controls the color of the optional border.
param headerBackColor* controls the background color of the heading groups, you need one parameter for every category. So if you had categories like "News, More News, and Extra Stuff" Then you would need three headerBackColor partameters like:
<param name="headerBackColor0" value="#444444">
<param name="headerBackColor1" value="#444444">
<param name="headerBackColor2" value="#444444">
param headerColor* works the same way as headerBackColor, except Header color controls the color of the text.
param headerHLColor* works the same way as headerBackColor, except Header color controls the color of the text when the mouse is over the heading.
param newsFontSize The size of the font used for the text links (headlines), in pt format.
param headerFontSize The size of the font used for the heading text, in pt format.
param newsFont The name of the font used for the text links. This is a single font name like "sanserif" or "serif". Java 1.1 has really limited font choices so be careful what you put in here. The font may not be available on the user's computer or accessible by his vm.
param headerFont The name of the font used for the heading text. See the warning mentioned in the "newsFont" parameter.
param dataURL This is the url to the content that you want vnews to display, the heading names, text, the links and the target frames.
NOTE: YOU CAN'T put just any url in here. Java applets have a built in security limitation. They are not allowed to contact any server but the server they were downloaded from. So, this means that if your web server is www.cats.com you can't use a dataURL of "http://www.dogs.com/newsdata".
I suggest using a simple local url like:
<param name="dataURL" value="data.txt">
<param name="dataURL" value="/servlets/DataServlet">
<param name="dataURL" value="/cgi-bin/data.pl">
If you need to pull data from a remote machine, consider using a local proxy for the data, or caching the data locally in a text file. The only other option is to digitally sign the applet, but this is costly and causes a security alert popup when the user first views the applet.
The data file contains two types of records, the heading record and the link record. The heading record contains a group number followed by the heading name. The link record contains the group number, the link text (i.e. headline), the link url, and the target frame. The link url and target frame are both optional, no link url leads to no action on user click, no target defaults to _blank, a new browser window.
A pipe symbol "|" is used to delimit the fields and each record is terminated by a new line. Order is important, the heading record must come first and then be followed by all of its link records.
An example of the data format:
1|Company News
1|September 10, 1990 - XYZ Inc. Forms deal with QWERTY Ltd. for rights to use the letter "Q".
1|October 1, 1990 - XYZ Inc. aquires LLLBB Corp. for 15 billion.|http://www.yahoo.com|_blank
1|December 16, 1990 - XYZ Inc. releases third quarter results, profits up by 182%|http://www.yahoo.com|_blank
2|Around the Net
2|Web Startup, Yahoo.com, helps people link to content|http://www.yahoo.com
2|Browser wars heat up! Analysts debate the debate and descuss till blue|http://www.google.com|_blank
2|Can the web be used for profit? 100 business leaders discuss their vision of the "information highway"|http://www.yahoo.com
2|What is the meaning of the life, the universe and everything? Find answers at this site, www.deja.com.|http://www.deja.com
Back to Vnews
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.
|