TOC

Bean at a Glance

Bean Overview

public class TickTape
extends java.awt.Panel
implements java.io.Externalizable, java.beans.PropertyChangeListener, com.ibm.ticktape.MPControlPanelListener

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. Users can select the image that they want to show with the control bar. In the scrollshow mode, images scroll across the display area with four directions. It is very easy for a user to switch the two views and the property values are kept when the view mode changes. In both modes, when a user click on any visible image, a TickTape event is fired.


previousCommonly used Methods, Events and Properties

Creation Methods

TickTape()
TickTape(boolean)
TickTape(String)

Key Properties

borderVisible
controlPanelVisible
direction
imageURLList
imageViewerBackground
scrollDelayTime
showingStyle
switchDelayTime
 

Note:Because TickTape is inherit from java.awt.Panel. The property constraints is kept so that user is able to set the position and size of TickTape through property sheet in IDEs.

Commonly used Methods

getDirection()
     Gets the image scrolling direction.
setDirection(String direction)
     Sets the image scrolling direction.
isBorderVisible()
     Gets the indication whether or not the border is visible.
setBorderVisible(boolean v)
     Shows/hides the border.
isControlPanelVisible()
     Gets the indication whether or not the control panel is visible.
setControlPanelVisible(boolean v)
     Shows/hides the control panel.
getImageViewerBackground()
     Gets the background color of the image viewer.
setImageViewerBackground(Color color)
     Sets the background color of the image viewer.
getScrollDelayTime()
     Gets the scrolling delay time.
setScrollDelayTime(int time)
     Sets the scrolling delay time.
getShowingStyle()
     Gets showing style of TickTape.
setShowingStyle(String style)
     Sets the showing style of TickTape.
getSwitchDelayTime()
     Gets the switching delay time.
setSwitchDelayTime(int time)
     Sets the switching delay time.
getImageURLList()
    Gets the images' URL list of this component.
setImageURLList(Vector urllist)
    Sets the images' URL list of this component.
getURLListStr()
    Gets the string presentation of the images' URL list of this component.
setURLListStr(String urlstr)
    Sets the string presentation of the images' URL list of this component.
play()
    Starts the viewer.
first()
    Displays the first image.
previous()
    Displays the previous image.
next()
    Displays  the next image.
last()
    Displays the last image.
pause(boolean pausestate)
    Pauses the  viewer.
stop()
    Stops the  viewer.

Commonly used Events

TickTapeEvent - The event is fired when users click on an image or the showing style changes.


 
up

Bean Description

Functionality Overview

The TickTape bean shows images (GIF/JPEG) in two ways: slideshow and scrollshow. In the slideshow mode, images are shown in turn, and only one image can be seen at each time. Users can select the image that they want to show with the control bar.  In the scrollshow mode, images scroll across the display area with four directions. Assemblers / Builders can add images/URLs to this bean or remove them from this bean, switch between the two views and customize sliding/scrolling properties.

The TickTape Bean allows

previousDependencies

The TickTape Bean uses many controls of the package com.ibm.uicontrols. The jar file of this package (uicontrols.jar for BDK and VisualAge for Java, uicontrolsCafe.jar for Visual Cafe ) must be in the CLASSPATH or imported into the corresponding IDE before the TickTape Bean can be used.


previousSecurity

No special Java security restrictions will apply.


previousUser Interface

The bean has a user friendly GUI. Refer to the section User Interface in the TickTape Overall bean documentation for detailed information.
 


previousIntrospection

public class TickTapeBeanInfo


previousCustomization

The TickTape has the following properties to be customized in design time:
 

borderVisible - indicates whether or not the border is visible.
controlPanelVisible - indicates whether or not the control panel is visible.
direction - indicates the scrolling direction.
imageURLList - indicates the URL list of the images.
imageViewerBackground - indicates the background color of the image viewer.
scrollDelayTime - indicates the scrolling delay time.
showingStyle - indicates the showing style.
switchDelayTime - indicates the switching delay time.
 



 
up

Summaries

Property Summary

<Name> <Datatype> [Constrained| Bound|Indexed ] <Description> <default value> <access type> 
borderVisible boolean Bound Indicates whether or not the border of this component is visible.  true Read / Write
controlPanelVisible boolean Bound Indicates whether or not the control panel of this component is visible. true Read / Write
direction String Bound Indicates the image scrolling direction ( in scrollshow). FROM_RIGHT Read / Write
imageViewerBackground Color Bound Indicates the background color of the image viewer. Color(0,178,0) Read/Write
scrollDelayTime int Bound Indicates the delay time that images scroll on the screen. 1 Read / Write
showingStyle String Bound Indicates the showing style of this bean (slideshow or scrollshow). SCROLL_SHOW Read / Write
switchDelayTime  int Bound Indicates the delay time between image switching, in milliseconds. 100 Read / Write
imageURLListStr  String Bound Images' URL list. null  Read / Write

previousMethod Summary


previousEvent Summary

As Source :  


 
up

Alphabetic Reference to Properties

 

 
up

Alphabetic Reference to Methods

 
public void addPropertyChangeListener(PropertyChangeListener listener)

Adds a listener for all PropertyChange events.
       Parameters:
                listener-  the listener to be added.
 

public void addTickTapeListener(TickTapeListener listener)

Adds a listener for all TickTape events.
        Parameters:
                listener -  the listener to be added.
 

public void first()

Displays the first image in the list.
 

public String getDirection()

Gets the scrolling direction.
        Returns:
             the image scrolling direction.

 
public Vector getImageURLList()

Gets the images' URLs.
     Returns:
          a vector contains all images' URL.
 

public String getImageURLListStr()

Gets the string that presents the images' URLs.
     Returns:
          a string presents the vector contains all images' URL.
 

public Color getImageViewerBackground()

Gets the background color of the image viewer.
        Returns:
              the background color of the image viewer.

 
 public int getScrollDelayTime()

Gets the scrolling delay time.
       Returns:
            the image scrolling delay time, in milliseconds.

 
 public String getShowingStyle()

Gets the showing style of the TickTape.
      Returns:
      the showing style of this bean.
 

 public int getSwitchDelayTime()

Gets the switching delay time.
     Returns:
          the image switching delay time.

 
public boolean isBorderVisible()

Gets the indication whether or not the border is visible.
    Returns:
          true if border is visible; otherwise false.
 

public boolean isControlPanelVisible()

Gets the indication whether or not the control panel is visible.
    Returns:
         true if the control panel is visible; otherwise false.
 

public void last()

Displays the last image.
 

public void next()

Displays the next image.
 

public void pause(boolean pausestate)

Pauses the media viewer.
       Parameters:
              pausestate - if true, suspends the  viewer; if false, resumes the  viewer.
 

public void play()

Starts the media viewer.
 

public void previous()

Displays the previous image.
 

public void removePropertyChangeListener(PropertyChangeListener listener)

Removes a listener for all PropertyChange events.
        Parameters:
                   listener- the listener to be removed.
 

public void removeTickTapeListener(TickTapeListener listener)

Removes a listener for all TickTape events.
         Parameters:
           listener- the listener to be removed.
 

public void setBorderVisible(boolean v)

Shows or hides the border of this  component depending on the boolean flag v.
     Parameters:
              v- if true, shows the borer; otherwise, hides the border.
 

public void setControlPanelVisible(boolean v)

Shows or hides the control panel of this component depending on the boolean flag v.
   Parameters:
           v- if true, shows the control panel; otherwise, hides the control panel.
 

public void setDirection(String direction)

Sets the image scrolling direction in scrollshow.
        Parameters:
              direction - image scrolling direction.
 
public void setImageURLList(Vector urllist)

Sets the image URL list.
    Parameters:
               urllist - a Vector contains all the images' URLs.
 

public void setImageURLListStr(String urlstr)

Sets the string that presents the image URL list.
    Parameters:
               urlstr - a string presents  the Vector which contains all the images' URLs.
 

public void setImageViewerBackground(Color color)

Sets the background color of the image viewer.
        Parameters:
              color - the background color of the image viewer.
 

public void setScrollDelayTime(int ss)

Sets the scrolling delay time in scrollshow.
     Parameters:
                 ss - the scrolling delay time  preset by this component. The bigger, the slower.
 

public void setShowingStyle(String style)

Sets the showing style of this component.
    Parameters:
                style - the showing style of TickTape.
 

 public void setSwitchDelayTime(int ss)

Sets the image switching delay time of TickTape.
    Parameters:
                ss - the image switching delay time, in milliseconds.
 

public void stop()

Stops the image viewer.
 

public TickTape()

Creates the viewer with default settings. Its showing style is slideshow, and control panel and border is visible.
 

public TickTape(boolean v)

Creates  a viewer. Its showing style is slideshow with/without a control panel.
    Parameters:
               v - if true, shows the control panel; otherwise, hides the control panel.
 

public TickTape(String type)

Creates  a viewer with the specified showing style.
    Parameters:
               type - the showing style.

      



 
up

Alphabetic Reference to Events

The TickTape Bean fires the following events:
  1. TickTapeEvent.
  2. PropertyChangeEvent for conveying any changes in the bound property status.

As Source

  1. public class TickTapeEvent

  2. extends java.util.EventObject
    This event is fired when the user clicks on an image or the showing style is changed.
As Listener 
  1. public interface TickTapeListener

  2. extends java.util.EventListener

    Event listener interface for TickTapeEvent. The method contained in this interface is:


up

Support Classes

 
  1. MPControlPanel
  2. DirectionEditor
  3. ScrollShow
  4. ShowingStyleEditor
  5. SlideShow
  6. URLListEditor


 
up

See Also

Java Programming Language

Java Beans Specifications


This document is last updated in V1.0 on 04/30/1998.