TickTape Bean Package
 |
Overview
|
Purpose
The TickTape Bean Package consists of one
bean - the TickTape Bean.
The TickTape Bean allows a web site to
display images (JPEG/GIF) for presenting information or using as an advertising
banner. This bean has two view modes: slideshow and scrollshow. In the
slideshow mode, images are shown in turn, and only one image can be seen
at each time. In the scrollshow mode, images scroll across the display
area with four directions. There is a control bar , with which users can
select the image that they want to display. In both modes, when users
click on any visible image, a TickTapeEvent
is fired.
Audience
This document is intended to be used by application
builders who would like to build Java applications which provide TickTape
functionality.
The application developer is expected to be familiar
with the Java language and the JavaBeans architecture. The developer should
be familiar with building applications by linking beans in an application
builder tool. Familiarity with the functionality of TickTape would be advantageous,
though not mandatory. No knowledge about the implementation of TickTape
is required in order to use this bean.
How
to Use This Guide
Guide Conventions
Typographical Conventions
Conventions |
Description |
Example |
Text in bold |
buttons and field names of dialog boxes |
OK, Cancel, Modify,
etc. |
Text in italics |
names of dialog boxes, figures, reference
to chapters and other sections, task name etc. |
Modify Dialog, Figure 1, Overview,
etc. |
|
list of points |
|
Numbered list 1, 2, 3, .... |
sequential steps |
-
After downloading TickTape.zip, ....
-
To use the component in BeanBox, copy the jar file to
BeanBox jars directory.
|
Text in Bold and Italics |
name of the file |
ticktape.zip |
Text in Courier
font |
names of classes, methods, events, part
of code included in the document, etc. |
TickTapeEvent |
Mouse Conventions
Conventions |
Description |
Example |
Select |
Click the left mouse button |
Select the File menu. |
Keyboard Conventions
Keys |
Represented |
Control |
Ctrl |
Alternate |
Alt |
Images
Image |
Used to |
 |
navigate to the previous sub-heading |
 |
navigate to the previous main heading |
 |
return to the Table of Contents |
 |
represent a Note information |
Guide Organization
Overview - introduces
the user to the TickTape. Provides information like intended audience,
guide conventions, guide organization and copyrights
Component Description
- describes the TickTape component in general. It gives information on
domain concepts, list of beans in the package and deployment scenarios
Installation Instructions
- describes the hardware and software required for installing and using
the TickTape, and also describes how to install the bean.
Usage Instructions
- provides information on bean usage, wiring scenarios and serialization.
Alternating Wiring Scenarios
- describes special wiring scenarios that may involve beans within and
outside the component package.
Individual Bean Documentation
- provides links to individual bean documentation which describe each bean
in the package w.r.t. its events, properties methods etc.
User Interface - describes
the various user interface components like menus, dialog boxes etc. of
the TickTape component.
Error Messages - lists
the various error messages that may appear when using the bean
Demo Application - describes
the demo application and provides instructions on how to run the demo application.
References - provides
links to internet sites which give substantial reference documentation.
Glossary - gives a
brief explanation of some of the technical terms used in the document.
Copyrights
And Trademarks
Copyright © 1998 IBM Corp.
All rights reserved.
IBM and VisualAge are trademarks of International
Business Machines in the United States and/or other countries.
* Java and all Java-based trademarks and logos are
trademarks or registered trademarks of Sun Microsystems, Inc., in the U.S.
and other countries.
 |
Component Description
|
Domain Concepts
The TickTape Bean is a graphical user
interface which allows users to view images and animations.
General
Description
The objective of the TickTape Bean is to provide
an easy-to-use image viewer to Internet.
The bean provides a flexible interface
for applications to use while hiding the implementation details. It can
be used either in an application or in an applet.
The TickTape Bean provides APIs and property
editors for user to access data and customize the properties.
In order for the bean to be able to work
with other beans developed by third party vendors,
the bean not only implements events as a mechanism for handling user interaction,
but also provides APIs that accept the data which it expects in events
it receives and APIs that return data that is contained in events the beans
throw. For example, when the user clicks on an image, a TickTapeEvent
is fired with the information about the image.
List
of Beans
Deployment
Scenarios
The TickTape Bean can be used to create a
stand-alone and dedicated application capable of displaying animations.
It can also be embedded into a HTML page for advertisement and online purchase.
 |
Installation
Instructions
|
Hardware Requirements
These JavaBeans are designed to be compliant with 100%
Pure Java requirements, and will therefore execute on any hardware platform
that supports the Java Environment.
35 KB(37KB for VisualCafe 2.0) of disk space is required
to install the TickTape Bean Jar file. Additional hard disk space would
be required to install the Java Development Kit, Bean Development Kit or
any Java Application Builder Tool which may be used to build / compile
applications using these beans.
Software
Requirements
The TickTape Bean is designed to work with Java Development
Kit Version 1.1 and above.
The bean may be linked to each other and tested in
the BeanBox testing tool from JavaSoft. Any Java Application Builder (E.g.
VisualAge for Java
from IBM Corp, VisualCafé
from Symantec Corp., Java
Workshop from SunSoft) with JavaBeans
support may be used to develop applications using these beans.
Installation
-
Download UIControls from IBM
AlphaWorks .
-
Install UIControls. In BeanBox, put uicontrols.jar in
the CLASSPATH. In IBM VisualAge for Java, import uicontrols.jar
into WorkBench. In Symantec VisualCafé, insert uicontrolscafe.jar
into Component Library.
-
After ticktape.zip has been downloaded
and unzipped, it automatically creates a new directory called ticktape
and extracts files into it.
-
To use the component in the BeanBox, copy (using the
relevant copy command on the operating system) the jar file for the required
component (available in the lib directory) to the BeanBox's jars
directory.
-
To use any component in any of the IDEs, import the
corresponding .jar file.
Note : Please refer to the User's Guide of
your IDE on how to import a bean into the IDE.
-
To run the demo application provided with this package,
follow the steps given below .
-
Set the CLASSPATH environment variable according to
the instructions, given under the heading Setting the CLASSPATH
below.
-
Run the rundemo.bat in the demo directory.
Platform
Dependencies
There are no platform specific issues for
the TickTape Bean. Any operating system that
supports Java can use the TickTape Bean.
 |
Usage
Instructions
|
Bean Usage
The jar file of the TickTape Bean should be added to
the jars directory of the beanbox. The wiring scenarios are described below.
Wiring
Scenario
Using TickTape Bean in an Applet or an
Application
In this scenario, application builders
would use the TickTape bean in their applet or application.
Wiring the applet/application to the TickTape
bean would depend (to some extent) on the kind of functionality the application
builder will provide through the menubar / toolbar. When using TickTape
to build an applet, be sure to put the image resources in the correct place
and using the right protocol in URLs. (If you use the protocol "file",
TickTape will try to find the resources in the client machine, not in the
server).
Serialization
The TickTape Bean is serializable. TickTape
implements the Externalizable interface and the default mechanism
for serialization can be applied without any change.
 |
Alternate
Wiring Scenarios
|
In this scenario, application builders would
use the TickTape bean in their applications (in
VisualAge for Java 1.0).
Wiring the TickTape requires the following
event:
-
The TickTapeEvent
which invokes TickTapeListener's
performTickTapeEvent
method.
1. Application Design Time:
Scenario 1.1 Creates a TickTape and a Label
in the application builder.
-
Assumptions:
-
An application frame already exists in IDE.
-
Programmer adds a TickTape into the frame.
-
Programmer adds a Label into the frame.
-
Outcomes:
-
The TickTape and the Label appear.
Figure 1.1 Create the Interface
Scenario 1.2 Adds images into the TickTape.
-
Assumptions:
-
TickTape exists.
-
Programmer selects "Image URL List" property
in the property sheet.
Figure 1.2.1 Open the Property Sheet
-
Programmer adds two images into the Image
URL List.
Figure 1.2.2 Add Images to the URLList
-
Outcomes:
-
Two images are ready in the TickTape to be
shown.
Scenario 1.3 Wires TickTape's TickTapeEvent
with the Label (using Event to Script connection).
-
Assumptions:
-
A method named showSelImageIndex(TickTapeEvent)
has been defined in the application.
public void showSelImageIndex (com.ibm.ticktape.TickTapeEvent
event ) {
getLabel1().setText("Selected image
index " + event.getSelectedImageIndex());
}
-
Programmer selects TickTape, click right mouse
button, selects "Connect" in the context menu, then selects performTickTapeEvent(com.ibm.ticktape.TickTapeEvent).
-
Programmer drags the line into the blank area
of the Composition Editor, clicks left button, then selects "Event to Script...".
From the selection dialog, select the method showSelImageIndex.
Figure 1.3.1 Make the Connection
-
Open the property dialog of this connection
by double clicking the line, select the check box "Pass event data".
Figure 1.3.2 Pass the Event Data as Argument
-
Outcomes:
-
The Event to Script connection is established.
2. Application Run Time:
The user runs the application.
Scenario 1:
-
Assumptions:
-
User clicks on the "play" button in the control
panel.
-
User clicks on an image.
-
Outcomes:
-
The index of the image is shown.
Figure 2.1 Runtime Display
 |
Individual
Bean Documentation
|
TickTape
 |
User Interface
|
This section describes the user interface
of the TickTape Bean. It explains the various screens, dialog boxes, and
buttons.
Screens
Main Screen
The TickTape bean consists of a Main Screen
as shown in Figure 1.
Figure 1 - Main Screen
Slide Show
TickTape has two showing styles: slideshow
and scrollshow. The slideshow screen is shown
in Figure 2.
Figure 2 - Slide Show.
Scroll Show
ScrollShow screen is shown in Figure
3.
Figure 3 - Scroll Show
Dialog Boxes
The TickTape Bean provides a URLListEditor
dialog box in the property sheet. Users can add, remove, edit and configure
image URLs index in the list.
The URLListEditor is shown in Figure
4.
Figure 4 - URLListEditor
Pressing the Add... button will
open a standard FileDialog. Press the Remove button to remove the
currently selected URL in the list. Press the Modify button to open
the Modify Dialog.
The Modify Dialog is shown in Figure
5.
Figure 5 - Modify Dialog
Buttons and Boxes
The TickTape bean's GUI interface consists
of control buttons and simple buttons.
-
There are seven image control buttons in the
control panel, as shown in Figure 6.
Figure 6 - Control Buttons
They are (from left
to right): first, previous,next, last, play, pause and stop button.
-
The Add..., Remove and Modify
buttons in the URLListEditor can be used to add, remove and
modify images' URLs in the URL list.
-
The two image buttons (Figure 7) upward
or downward the image index in the list.
Figure 7 - Up, Down Buttons
-
The OK and Cancel buttons in
the Modify Dialog can be used to confirm or cancel the modification.
 |
Error Messages
|
Error
Message |
Error
Description |
Possible
Solution |
Invalid filename |
1. This file cannot be found
2. This URL format is not correct. |
Input the correct file name
or URL name. |
Invalid showing style |
There is not the specified showing style. |
Input the correct showing style name. |
 |
Demo Application
|
The demo directory contains the necessary
files for running the demo. The main demo file is rundemo.class. This demo
application demonstrates how the TickTape Bean Package can be used.
To run the demo application provided with this package,
follow the steps given below :
-
In MS-DOS command prompt, change directory
to ticktape\demo
-
Make sure that the java executable is
in the PATH and also the CLASSPATH variable points to the classes.zip
in the JDK's lib directory and uicontrols.jar.
-
Type rundemo in the command prompt. All
the screens that come up in the demo application are explained in the section
User Interface. (The batch file will set necessary CLASSPATH for you)
Note: Please refer to Installation
to get the information about UIControls.
Setting the CLASSPATH
WINDOWS CLASSPATH
After installing the software, update the CLASSPATH
environment variable as the following :
Assume uicontrols.jar is put in the directory
c:\uicontrols.
-
For WINDOWS NT :
Start the Control Panel, select System,
then edit the CLASSPATH environment variable.
Set the CLASSPATH to point to
ticktape\lib\ticktape.jar;c:\uicontrols\uicontrols.jar
-
For WINDOWS 95 :
To change the CLASSPATH, open the AUTOEXEC.BAT
file and make the change to the CLASSPATH statement. (Be sure to make a
backup of the AUTOEXEC.BAT before making any changes).
Set the CLASSPATH to point to
ticktape\lib\ticktape.jar;c:\uicontrols\uicontrols.jar
For example, if TickTape is installed under
C:\ , set CLASSPATH as (add the following line to the end of the AUTOEXEC.BAT
file.)
%CLASSPATH%;c:\ticktape\lib\ticktape.jar;c:\uicontrols\uicontrols.jar
-
Reboot the machine for the changes to take effect.
AIX CLASSPATH
After installing the software, update the CLASSPATH
environment variable as the following :
-
Open the .profile file and set the CLASSPATH
environment variable. (Be sure to take a backup of the .profile
before making any changes.)
Set the CLASSPATH to point to
ticktape\lib\ticktape.jar:uicontrols\uicontrols.jar
For example if TickTape is installed under the home
directory then set CLASSPATH as - (add the following line to the end of
the .profile file.)
export CLASSPATH = ticktape\lib\ticktape.jar:uicontrols\uicontrols.jar:
$CLASSPATH
-
Type . .profile on the command line for
the changes to take effect.
OS/2 CLASSPATH
After installing the software, update the CLASSPATH
environment variable as the following :
-
Open the CONFIG.SYS file and change the
CLASSPATH statement. (Be sure to make a backup of the CONFIG.SYS
before making any changes.)
Set the CLASSPATH to point to
ticktape\lib\ticktape.jar;uicontrols\uicontrols.jar
For example if TickTape is installed under C:\ then
set CLASSPATH as (append the following to the CLASSPATH environment variable
of the CONFIG.SYS file.)
%CLASSPATH%;c:\ticktape\lib\ticktape.jar;uicontrols\uicontrols.jar
-
Reboot the machine for the changes to take effect.
Running the demo application
The complete source code is rundemo.java.
This demo application demonstrates how the TickTape
bean works. It allows two showing styles: slideshow and scrollshow. These
styles are shown in this demo. In the left is the slideshow, where
TickTape shows a series of images in turn; In the right is the scrollshow,
where TickTape scrolls the images in four directions: from left to right,
from right to left, from bottom to top and from top to bottom. By clicking
the Switch button, the two TickTapes exchange their showing styles.
If user click on any image of TickTape, the images is displayed in the
middle of the demo screen. Users can interact with the demo by clicking
the control buttons on the control bar to play, pause, stop the image viewer.
The Main Screen :
Figure 8 - TickTape Demo Screen
 |
References
|
Java
Programming Language
Java
Beans Specifications
 |
Glossary
|
A
| B | C | J |T
A |
API
|
Application Programming Interface |
Application (or Applet)
|
A software product that uses (includes)
the TickTape component |
B |
Bean
|
A bean is a JavaBeans component. It is
an independent, reusable software module. Beans may be visible objects,
like AWT components, or invisible objects, like queues and stacks. A builder/integration
tool manipulates Beans to create applets and applications. |
C |
Component
|
A piece of software isolated into a discrete,
easily reusable structure. |
J |
Java
|
An object-oriented programming language
developed by Sun Microsystems. Java programs are compiled into class files
that can run on any computer platform that has a Java Virtual Machine. |
JavaBeans
|
A portable, platform-independent component
model, based on Java. The model allows creation of small, reusable, software
components. A visual builder program combines components from different
sources to create applications quickly and easily. |
T |
TickTape
|
An image view which can present informations
or be used as an advertising banner. |
This document is last updated in V 1.0 on 06/02/1998.