|
|||||||
| 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
|
+--demo.webcab.chat.gui.ScrollArea
This bean adds the horizontal and vertical scrolling bars to the
TextScroll JavaBean. It implements all of its public
methods all over again, as a shortcut for programmers.
You may implement any of these two beans at your convenience.
TextScroll, 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 | |
ScrollArea()
The constructor for a scroll area object. |
|
| Method Summary | |
void |
add(java.lang.String item)
|
void |
addActionListener(java.awt.event.ActionListener l)
By adding an ActionListener to an instance of this bean, an actionPerformed (ActionEvent) method will be invoked every time the user double-clicks inside the working area. |
void |
addFocusListener(java.awt.event.FocusListener l)
|
void |
addItem(java.lang.String item)
Same as addString. |
void |
addKeyListener(java.awt.event.KeyListener l)
|
void |
addMouseListener(java.awt.event.MouseListener l)
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
addScrollAreaListener(ScrollAreaListener l)
This method registers a ScrollArea specific listener object. |
void |
addString(java.lang.String string)
Adds a new line to the text area. |
void |
adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
|
void |
changeImage(int image)
Changes the background image to the indexth one. |
void |
changeImage(int backgroundNumber,
int displayFlag,
int stretchMode)
Changes the background image to the indexth one, in the specified
display mode and stretch type. |
void |
delAll()
Clears the list of all of its elements. |
void |
delItem(int index)
Deletes the indexth line number. |
void |
destroy()
Destroys all the resources this bean posesses. |
java.applet.Applet |
getApplet()
If you have specified an applet in setApplet, this method will
return its pointer. |
java.awt.Color |
getBackgroundColor()
Gets the color of the background. |
java.awt.Image |
getBackgroundImage()
Gets the image as it appears on the background. |
java.awt.Image |
getBackgroundImageAt(int index)
Gets one of the images that are in the desktop images list. |
int |
getBackgroundNumber()
Gets the index number of the desktop image. |
java.awt.Color[] |
getColorTable()
Gets the background, text, highlighted text and links color in a java.awt.Color array. |
boolean |
getConfigurable()
If this method returns true then right or middle mouse button cliking on the desktop will pop a configuration dialog up. |
java.lang.String |
getConfigurationFile()
Gets the name of the configuration file. |
int |
getDisplayFlag()
Gets the flag for displaying the desktop image. |
java.awt.Color |
getHighlightColor()
Gets the color of the highlighted text. |
java.lang.String |
getItem(int index)
Gets the line at the specified index. |
int |
getItemCount()
Gets the number of lines this bean has. |
java.awt.Color |
getLinkColor()
Gets the color of the web links. |
int |
getMaxFontSize()
Returns the value of the maximum font size that the user can choose inside the configuration dialog. |
int |
getMaxNoLines()
Gets the maximum limit of the number of lines this component may display. |
int |
getMinFontSize()
Returns the value of the minimum font size that the user can choose inside the configuration dialog. |
int |
getNoBackgrounds()
Gets the number of total desktop images. |
int |
getSelectedIndex()
If the bean is in the list mode, then this method returns the index of the selected line. |
java.lang.String |
getSelectedItem()
If the bean is in the list mode, then this method returns the selected line. |
int |
getSelectFlag()
Returns SELECT_NONE if the bean acts like a text area or SELECT_ALLOW if the
bean acts like a list. |
int |
getStretchMode()
Gets the rendering method for the desktop image. |
java.awt.Color |
getTextColor()
Gets the color of the text. |
java.awt.Font |
getTextFont()
Gets the current text font. |
TextScroll |
getTextScroll()
Returns the local TextScroll object. |
int |
getValignMode()
|
boolean |
getWordWrap()
Returns true if the text is being word wrapped and false otherwise. |
void |
removeActionListener(java.awt.event.ActionListener l)
This method unregisters an ActionListener object. |
void |
removeFocusListener(java.awt.event.FocusListener l)
|
void |
removeKeyListener(java.awt.event.KeyListener l)
|
void |
removeMouseListener(java.awt.event.MouseListener l)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
removeScrollAreaListener(ScrollAreaListener l)
This method unregisters a previously registered ScrollArea listener object. |
void |
repaintBar()
|
void |
setApplet(java.applet.Applet applet)
If you wish to use this bean inside an applet, register it through this method. |
void |
setBackgroundColor(java.awt.Color color)
Sets the background color of the rendering surface. |
void |
setColorTable(java.awt.Color[] colorTable)
Sets all the colors - background, text, highlighted text and links - to the ones specified in the java.awt.Color array. |
void |
setConfigurable(boolean b)
If set to false, the configuration dialog will not be accessible when right or middle mouse
button clicking on the desktop. |
void |
setConfigurationFile(java.lang.String url)
This method invokes the method with the same name from the TextScroll class. |
void |
setDisplayFlag(int displayFlag)
Sets a flag for displaying the desktop image. |
void |
setFinalString(java.lang.String string,
java.lang.String headerString)
Documentation for this method is not public. |
void |
setHighlightColor(java.awt.Color color)
Sets the color of the highlighted text. |
void |
setItemAt(java.lang.String item,
int index)
Changes the value of the indexth line number to item. |
void |
setLinkColor(java.awt.Color color)
Sets the color of the Internet links. |
void |
setMaxFontSize(int maxFontSize)
Sets the maximum font size that the user can configure from the Configuration Dialog. |
void |
setMaxNoLines(int noLines)
Defines the maximum limit of the number of lines this component may display. |
void |
setMinFontSize(int minFontSize)
Sets the minimum font size that the user can configure from the Configuration Dialog. |
void |
setMinimumSize(java.awt.Dimension size)
Defines the minimum layout size of this component. |
void |
setSelectedIndex(int selectedIndex)
Changes the selection bar to the specified line number. |
void |
setSelectFlag(int selectFlag)
Determines whether this bean should act like a normal text area or like a list. |
void |
setStretchMode(int stretchMode)
This method sets the rendering method for the desktop image. |
void |
setString(java.lang.String string,
java.lang.String headerString)
Documentation for this method is not public. |
void |
setTextColor(java.awt.Color color)
Sets the default color of the rendered text. |
void |
setTextFont(java.awt.Font f)
Selects a new font for the text. |
void |
setValignMode(int mode)
|
void |
setWordWrap(boolean b)
Enable word wrapping, so all text be seen on the screen. |
| Methods inherited from class java.awt.Panel |
addNotify, 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, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addMouseMotionListener, 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, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, 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 ScrollArea()
throws java.io.IOException,
java.lang.ClassNotFoundException
setConfigurationFile method in order to define
the properties for this bean.setConfigurationFile(java.lang.String)| Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
addPropertyChangeListener in class java.awt.Componentpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener in class java.awt.Componentpublic void setMinimumSize(java.awt.Dimension size)
size - The dimension of the minimum sizeTextScroll.getMinimumSize()public void setWordWrap(boolean b)
wordwrap - True to enable wordwraping, false to disable it.getWordWrap()public boolean getWordWrap()
true if the text is being word wrapped and false otherwise.setWordWrap(boolean)public void setTextFont(java.awt.Font f)
font - The new text fontgetTextFont()public java.awt.Font getTextFont()
setTextFont(java.awt.Font)public int getMinFontSize()
setMinFontSize(int)public int getMaxFontSize()
setMaxFontSize(int)public void setMinFontSize(int minFontSize)
getMinFontSize()public void setMaxFontSize(int maxFontSize)
getMaxFontSize()public void setSelectFlag(int selectFlag)
value - If this is equal to SELECT_NONE, the bean acts like a text area, if it
equals to SELECT_ALLOW, the bean acts like a list.getSelectFlag(),
TextScroll.SELECT_NONE,
TextScroll.SELECT_ALLOWpublic int getSelectFlag()
SELECT_NONE if the bean acts like a text area or SELECT_ALLOW if the
bean acts like a list.setSelectFlag(int),
TextScroll.SELECT_NONE,
TextScroll.SELECT_ALLOWpublic void setConfigurable(boolean b)
false, the configuration dialog will not be accessible when right or middle mouse
button clicking on the desktop.configurable - The true/false boolean.getConfigurable()public boolean getConfigurable()
setConfigurable(boolean)public void setConfigurationFile(java.lang.String url)
TextScroll class.
Please check out the See Also link to read the complete description.TextScroll.setConfigurationFile(java.lang.String),
getConfigurationFile()public java.lang.String getConfigurationFile()
StringTextScroll.setConfigurationFile(java.lang.String)public void addString(java.lang.String string)
string - The String object to be added.
public void setFinalString(java.lang.String string,
java.lang.String headerString)
public void setString(java.lang.String string,
java.lang.String headerString)
public void setMaxNoLines(int noLines)
maxNoLines - The maximum number of lines.getMaxNoLines()public int getMaxNoLines()
setMaxNoLines(int)public TextScroll getTextScroll()
TextScroll object. This way, the developer
can call TextScroll specific methods, being able for example
to add specific listeners to the actual bean.public void setColorTable(java.awt.Color[] colorTable)
java.awt.Color array.colorTable - The array of colorsgetColorTable()public java.awt.Color[] getColorTable()
java.awt.Color array.setColorTable(java.awt.Color[]),
getBackgroundColor(),
getTextColor(),
getHighlightColor(),
getLinkColor()public java.awt.Color getBackgroundColor()
getColorTable()public java.awt.Color getTextColor()
getColorTable()public java.awt.Color getHighlightColor()
getColorTable()public java.awt.Color getLinkColor()
getColorTable()public void setBackgroundColor(java.awt.Color color)
setColorTable(java.awt.Color[])public void setTextColor(java.awt.Color color)
setColorTable(java.awt.Color[])public void setHighlightColor(java.awt.Color color)
setColorTable(java.awt.Color[])public void setLinkColor(java.awt.Color color)
setColorTable(java.awt.Color[])public void setApplet(java.applet.Applet applet)
applet - The applet where this component is going to be added.getApplet()public java.applet.Applet getApplet()
setApplet, this method will
return its pointer.setApplet(java.applet.Applet)public void changeImage(int image)
indexth one.backgroundNumber - The number of the new background image to be displayed.getNoBackgrounds(),
changeImage(int, int, int)
public void changeImage(int backgroundNumber,
int displayFlag,
int stretchMode)
indexth one, in the specified
display mode and stretch type.backgroundNumber - The number of the new background image to be displayed.displayFlag - The display flag as it is defined in setDisplayFlagstretchMode - The stretch mode as it is defined in setStretchModegetNoBackgrounds(),
setDisplayFlag(int),
setStretchMode(int),
changeImage(int)public void setDisplayFlag(int displayFlag)
TextScroll corresponding method.TextScroll.setDisplayFlag(int)public int getDisplayFlag()
TextScroll
corresponding method.TextScroll.getDisplayFlag()public void setStretchMode(int stretchMode)
TextScroll.setStretchMode(int)public int getStretchMode()
TextScroll.getStretchMode()public int getNoBackgrounds()
getBackgroundNumber()public int getBackgroundNumber()
0.getBackgroundImage()public java.awt.Image getBackgroundImage()
getBackgroundNumber(),
getBackgroundImageAt(int)public java.awt.Image getBackgroundImageAt(int index)
0.index - The index of the desktop image.indexth background image, or null if out of range.getBackgroundImage()public void addActionListener(java.awt.event.ActionListener l)
addScrollAreaListener(demo.webcab.chat.gui.ScrollAreaListener)public void removeActionListener(java.awt.event.ActionListener l)
removeScrollAreaListener(demo.webcab.chat.gui.ScrollAreaListener)public void addScrollAreaListener(ScrollAreaListener l)
ScrollAreaListener,
addActionListener(java.awt.event.ActionListener)public void removeScrollAreaListener(ScrollAreaListener l)
removeActionListener(java.awt.event.ActionListener)public void addMouseListener(java.awt.event.MouseListener l)
addMouseListener in class java.awt.Componentpublic void removeMouseListener(java.awt.event.MouseListener l)
removeMouseListener in class java.awt.Componentpublic void addFocusListener(java.awt.event.FocusListener l)
addFocusListener in class java.awt.Componentpublic void addKeyListener(java.awt.event.KeyListener l)
addKeyListener in class java.awt.Componentpublic void removeFocusListener(java.awt.event.FocusListener l)
removeFocusListener in class java.awt.Componentpublic void removeKeyListener(java.awt.event.KeyListener l)
removeKeyListener in class java.awt.Componentpublic int getSelectedIndex()
getSelectedItem(),
setSelectedIndex(int)public void setSelectedIndex(int selectedIndex)
selectedIndex - The index to change to. If -1, no line is selectedgetSelectedIndex()public java.lang.String getSelectedItem()
getSelectedIndex()public java.lang.String getItem(int index)
index line.getSelectedItem()public void delItem(int index)
indexth line number. Note: If you wish to delete all lines, better use
delAll for speed.index - The line to be deleteddelAll()public void delAll()
delItem.delItem(int)public int getItemCount()
public void add(java.lang.String item)
public void addItem(java.lang.String item)
addString.addString(java.lang.String)
public void setItemAt(java.lang.String item,
int index)
indexth line number to item.item - The new string valueindex - The line numberpublic void destroy()
public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
adjustmentValueChanged in interface java.awt.event.AdjustmentListenerpublic void setValignMode(int mode)
public int getValignMode()
public void repaintBar()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||