|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--com.webcab.chat.gui.RotatingBanner
This bean displays a banner which rotates image after image and sends the
user to specified URL addresses. RotatingBanner gets the
images and the links to point to from banner servers which wait on
specific ports a banner image request. Initially, the component should be
given a default server and port and an additional list of other servers.
The bean will take one image from the default server and another one from
the other servers, in ascending order. The list of servers is read from
a banner-list url file.
For displaying images, the ImageCache class has been used.
ImageCache, Serialized Form| Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
RotatingBanner()
Initializes the timer which calls a new banner every getTimerDelay seconds. |
|
| Method Summary | |
void |
addNotify()
|
void |
addToBannerList(java.lang.String fileName)
Defines the additional servers wherefrom to load the banners and adds them to the existing list. |
java.applet.Applet |
getApplet()
If an applet has been specified in the setApplet method,
then it returns its pointer. |
java.lang.String |
getBannerFile()
Returns the name of the banner file. |
int |
getDefaultPort()
Gets the port where the connection is made to the default banner server. |
java.lang.String |
getDefaultServer()
Gets the name of the default server. |
int |
getDisplayFlag()
|
java.awt.Dimension |
getMinimumSize()
|
void |
getNewBanner()
Asks for a new banner to be displayed, according to the 50 percent algorithm. |
java.awt.Dimension |
getPreferredSize()
|
java.lang.String |
getRequestKey()
Gets the request key to send to each of the banner servers. |
int |
getTimerDelay()
Gets the delay between two consecurive banners. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
removeNotify()
|
void |
setApplet(java.applet.Applet applet)
Specifies an applet to open any links where the images might point to. |
void |
setBackground(java.awt.Color c)
Defines the background color that surrounds the image. |
void |
setBannerFile(java.lang.String bannerFileName)
This method provides a file where all the images are defined. |
void |
setBannerList(java.lang.String fileName)
Defines the additional servers wherefrom to load the banners. |
void |
setDefaultPort(int defaultPort)
The port where to connect to the default banner server. |
void |
setDefaultServer(java.lang.String defaultServer)
Defines the default server. |
void |
setDimensions(java.awt.Dimension dim)
Defines the minimum size this banner can have in a normal layout. |
void |
setDisplayFlag(int flag)
Sets whether the image should be stretched or centered. |
void |
setRequestKey(java.lang.String key)
The string to send to each of the banner servers in order to retrieve an image and a web link. |
void |
setTimerDelay(int delay)
Sets the delay between two consecutive banners. |
| Methods inherited from class java.awt.Panel |
getAccessibleContext |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFont, setLayout, update, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RotatingBanner()
getTimerDelay seconds.getTimerDelay()| Method Detail |
public void setApplet(java.applet.Applet applet)
getApplet()public java.applet.Applet getApplet()
setApplet method,
then it returns its pointer.setApplet(java.applet.Applet)public void setBackground(java.awt.Color c)
setBackground in class java.awt.Componentc - The background colorpublic void setDimensions(java.awt.Dimension dim)
getMinimumSize()public java.awt.Dimension getMinimumSize()
getMinimumSize in class java.awt.Containerpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Containerpublic void setTimerDelay(int delay)
delay - Time in seconds.getTimerDelay()public int getTimerDelay()
public void setRequestKey(java.lang.String key)
key - The key stringgetRequestKey()public java.lang.String getRequestKey()
public void setDefaultServer(java.lang.String defaultServer)
defaultServer - A string representing the host name.getDefaultServer()public java.lang.String getDefaultServer()
public void setDefaultPort(int defaultPort)
defaultPort - The integer representing the port number.getDefaultPort()public int getDefaultPort()
setDefaultPort(int)public void addNotify()
addNotify in class java.awt.Panelpublic void removeNotify()
removeNotify in class java.awt.Containerpublic void setBannerFile(java.lang.String bannerFileName)
bannerFileName - The name of the text file that contains all images and links.public java.lang.String getBannerFile()
setBannerFile(java.lang.String)public void setDisplayFlag(int flag)
public int getDisplayFlag()
setDisplayFlag(int)public void setBannerList(java.lang.String fileName)
fileName - The URL of the banner-list file.addToBannerList(java.lang.String)public void addToBannerList(java.lang.String fileName)
fileName - The URL of the banner-list file.setBannerList(java.lang.String)public void getNewBanner()
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListener
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||