Class marimba.gui.Widget
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class marimba.gui.Widget

java.lang.Object
   |
   +----marimba.gui.Widget

public class Widget
extends Object
implements WidgetConstants, PropertyObject, ImageObserver, TimerClient
A generic widget implementation. This is the base class for all widgets in the marimba.gui package.
Version:
1.138, 01/18/97
Author:
Arthur van Hoff
See Also:
WidgetConstants

Variable Index

 o background
The current background.
 o clazz
The binary representation of the class that constitutes this widget.
 o defaultBackground
The default background color.
 o defaultFont
The default font.
 o defaultForeground
The default foreground color.
 o defaultHilite
The default hilite color, used to fill certain areas to hide the background.
 o directGraphics
If a widget is opaque and so its update method can be called, when directGraphics is true the update method is passed the screen graphics context.
 o disabled
A disabled widget does not accept any user input.
 o east
The number of pixels that the distance between the eatern side and this widget has to be.
 o editor
The editor for inline editing.
 o focus
When a widget has focus, a focus rectangle is usually drawn around it telling the user that keyboard input goes to that widget now.
 o font
The current font.
 o foreground
The current foreground.
 o height
The height of this widget.
 o hilite
The current hilite color.
 o layoutMgr
The layout manager for this widget.
 o name
The name of this widget.
 o north
The number of pixels that the distance between the northern side and this widget has to be.
 o nwidgets
The number of widgets that are in this widget.
 o parent
The parent container of this class.
 o script
The current script of the widget which reflects the current state of the widget.
 o south
The number of pixels that the distance between the southern side and this widget has to be.
 o tip
The tip that is displayed under the mouse pointer when it is pointing at this widget for a while.
 o transparent
If a widget is transparent, the background behind this widget is still visible.
 o tx
The widget is translated in the x-direction using this value.
 o ty
The widget is translated in the y-direction using this value.
 o valid
If the widget is invalid, the next time the widget is repainted, the layout has to be redone.
 o visible
A widget can be made invisible.
 o wBackground
When wBackground is null, background is the inherited value.
 o west
The number of pixels that the distance between the western side and this widget has to be.
 o wFont
When wFont is null, font is the inherited value.
 o wForeground
When wForeground is null, foreground is the inherited value.
 o wHilite
When wHilite is null, hilite is the inherited value.
 o widgets
The widgets that are contained by this widget.
 o width
The width of this widget.
 o wScript
This is the script which is currently being edited.
 o wTip
REMIND
 o x
The x-coordinate of the upper-left corner of this widget.
 o y
The y-coordinate of the upper-left corner of this widget.

Constructor Index

 o Widget()
Construct a widget.

Method Index

 o action()
Execute the action associated with this widget.
 o action(Event, Object)
By default a widget calls this function when a action event occurs.
 o add(int, Widget)
Add a widget at a given position.
 o add(Widget)
Add a widget.
 o applyProperties(PropertyList)
Apply new properties to an object
 o audioLoop(String)
Play an audio clip looped.
 o audioLoop(URL)
Play the audio clip at the given url looped.
 o audioPlay(String)
Play an audio clip.
 o audioPlay(URL)
Play an audio clip using a url.
 o audioStop(String)
Stop an audio clip.
 o audioStop(URL)
Stop the audio clip with the given url.
 o bounds()
Get the bounds as a Rectangle object.
 o clearFocus()
Remove the character focus.
 o clearPopups()
Clear any popups associated with this widget.
 o createImage(ImageProducer)
Creates an image from the specified image producer.
 o createImage(int, int)
Creates an off-screen drawable Image to be used for double buffering.
 o currentFocus()
Get the widget that has the current focus.
 o destroy()
Called to destroy a widget.
 o disable()
Disable the widget.
 o disable(boolean)
Disable the widget.
 o enable()
Enable the widget.
 o findWidget(String)
Find a widget in this container.
 o firstFocus()
Assign the focus to the first widget.
 o focusInterest()
True if this widget is potentially interested in getting the focus.
 o getAudioClip(String)
Get an audio clip.
 o getAudioClipAt(URL)
Get an audio clip using a url.
 o getBackground()
Get the background color.
 o getChildProperties(PropertyList)
Get the properties for the children of this widget.
 o getCursor()
Get the current mouse cursor of the presentation.
 o getDefaultButton()
Get the default button.
 o getDescription()
Get a short description of the widget.
 o getEditor()
Get the name of the class that can be used for in-place editing.
 o getFocusColor()
Get the focus color, which is the standard color of the focus rectangle.
 o getFont()
Get the font.
 o getFontMetrics(Font)
Get font metrics for a font.
 o getForeground()
Get the foreground color.
 o getHilite()
Get the hilite color.
 o getImage(String)
Get an image.
 o getLayoutMgr()
Get the layout manager for this widget.
 o getName()
Get the name.
 o getParent()
Return the widget's parent.
 o getPlayerPanel()
Get the current player.
 o getPresentation()
Get the presentation.
 o getProperties(PropertyList)
Get the properties of this widget.
 o getSelBackground()
Get the selection background color.
 o getSelFocusColor()
Get the selection focus color, which is the color of the focus rectangle around the selection bar.
 o getSelForeground()
Get the selection foreground color.
 o getText()
Get the text of the widget.
 o getText(String)
Get the text of a named widget.
 o getTip()
Get the tip.
 o getTip(int, int)
Get the tip for a particular x,y location within the widget.
 o getValue()
Get the value of the widget.
 o getValue(String)
Get the value of a named widget.
 o getWidget(String)
Get a widget by name.
 o getWidgetClass()
Gets the widget class for this widget.
 o gotFocus(Event, Object)
By default a widget calls this function when a gotFocus event occurs.
 o gotoPage(String)
Goto a page in the current folder.
 o gotoPage(String, String)
Goto a page in a named folder
 o handleEvent(Event)
Handle an event.
 o hasFocus()
True if the current widget has the focus.
 o hide()
Hide this widget.
 o imageUpdate(Image, int, int, int, int, int)
Update the widget after more image data arrives.
 o init()
Called to initialize a widget.
 o inside(int, int)
Check if a point is inside the widget.
 o inside(int, int, int, int)
Check if the widget is inside a rectangle.
 o invalidate()
Invalidate the widget (the size has changed).
 o isDisabled()
Check if disabled.
 o isShowing()
Check if showing on screen.
 o isTransparent()
Check whether this widget is transparent.
 o isVisible()
Check if visible.
 o keyDown(Event, int)
By default a widget calls this function when a keyDown event occurs.
 o keyUp(Event, int)
By default a widget calls this function when a keyUp event occurs.
 o layout()
Layout the widget.
 o list()
Print the widget for debugging.
 o list(PrintStream, int)
Print the widget with indentation for debugging.
 o locateWidget(int, int)
Locate the topmost widget that contains the specified coordinate.
 o locateWidgets(Vector, int, int)
Locate all the widgets that intersect with the given point and append them to the vector, so that the front most ends up first.
 o locateWidgets(Vector, int, int, int, int)
Locate all the widgets inside a rectangle.
 o location()
Get the location as a Point object.
 o lostFocus(Event, Object)
By default a widget calls this function when a lostFocus event occurs.
 o mouseDown(Event, int, int)
By default a widget calls this function when a mouseDown event occurs.
 o mouseDrag(Event, int, int)
By default a widget calls this function when a mouseDrag event occurs.
 o mouseEnter(Event, int, int)
By default a widget calls this function when a mouseEnter event occurs.
 o mouseExit(Event, int, int)
By default a widget calls this function when a mouseExit event occurs.
 o mouseMove(Event, int, int)
By default a widget calls this function when a mouseMove event occurs.
 o mouseUp(Event, int, int)
By default a widget calls this function when a mouseUp event occurs.
 o move(int, int)
Move the widget.
 o nextFocus()
Assign the focus to the next widget that is located to the right or below the current focus.
 o overlap(int, int, int, int)
Check if the widget overlaps with rectangle.
 o paint(Graphics)
Paint from scratch.
 o paint(Graphics, int, int, int, int)
Paint part of the screen.
 o paintAll(Graphics, int, int, int, int)
Paint everyting in the indicated area.
 o paramString(StringBuffer)
Build a string describing the widget's parameters.
 o play(String)
THIS METHOD WILL BE REMOVED IN the beta4 release, It is still here for backward compatibility.
 o postEvent(Event)
Post an event to this widget.
 o previousFocus()
Assign the focus to the previous widget that is located to the left or above the current focus.
 o remove()
Remove this widget from its container.
 o remove(Widget)
Remove a widget from this widget.
 o remove(Widget, int)
Removes the widget, assuming that the given index is the index of the widget in the widgets array.
 o removeAll()
Remove all widgets from this widget.
 o repaint()
Repaint the entrire widget as soon as possible.
 o repaint(int, int, int, int)
This will repaint the indicated area of the screen (local coordinates).
 o repaint(long)
Repaint this widget.
 o repaint(long, int, int, int, int)
This will repaint the indicated area of the screen (local coordinates).
 o repaintParent(long, int, int, int, int)
Repaint a part of the parent window.
 o replace(int, Widget)
Replace a widget at a given position.
 o replace(Widget)
Replace this widget with another widget.
 o replace(Widget, Widget)
Replace a widget by another widget.
 o requestFocus()
Ask the playerPanel for the focus.
 o resetCursor()
Reset the current cursor to the default cursor of the presentation.
 o reshape(int, int, int, int)
Reshape the widget.
 o reshape(int, int, int, int, boolean)
Reshape the widget.
 o resize(Dimension)
Resize the widget.
 o resize(int, int)
Resize the widget.
 o rmove(int, int)
Move relative.
 o rscroll(int, int)
Scroll the contents of this widget relative.
 o scroll(int, int)
Scroll the contents of this widget.
 o setAttach(int, int, int, int)
Set the attachments of this widget to the given number of pixels.
 o setBackground(Color)
Set the background color.
 o setCursor(int)
Set the current mouse cursor in the presentation.
 o setEditor(Object)
Set the editor for this widget.
 o setFont(Font)
Set the font.
 o setForeground(Color)
Set the foreground color.
 o setHilite(Color)
Set the hilite color.
 o setLayoutMgr(WidgetLayoutMgr)
Set the layout manager for this widget.
 o setName(String)
Set the name.
 o setProperties(PropertyList)
Set the properties of this widget.
 o setText(String)
Set the text of a widget.
 o setText(String, String)
Set the text of a named widget.
 o setTip(String)
Set the tip.
 o setTransparent(boolean)
Set the transparency.
 o setValue(Object)
Set the value of the widget.
 o setValue(String, Object)
Set the value of a named widget.
 o show()
Show
 o show(boolean)
Show conditionally.
 o size()
Get the size as a Dimension object.
 o start()
Called to start a widget.
 o stop()
Called to stop a widget.
 o sync()
Sync the toolkit.
 o tick(long, Object)
The clock is ticking...
 o toBack()
Send this widget to the back.
 o toBack(Widget)
Move a widget to the back.
 o toFront()
Bring this widget to the front.
 o toFront(Widget)
Move a widget to the front.
 o toString()
Convert the widget to a string for debugging.
 o update(Graphics)
Update the widget, this will be called in response to a repaint() request.
 o validate()
Validate the widget.

Variables

 o defaultFont
  public final static Font defaultFont
The default font.
 o defaultForeground
  public final static Color defaultForeground
The default foreground color.
 o defaultBackground
  public final static Color defaultBackground
The default background color.
 o defaultHilite
  public final static Color defaultHilite
The default hilite color, used to fill certain areas to hide the background.
 o name
  public String name
The name of this widget.
 o wTip
  public String wTip
REMIND
 o tip
  public String tip
The tip that is displayed under the mouse pointer when it is pointing at this widget for a while.
See Also:
getTip, setTip
 o valid
  public boolean valid
If the widget is invalid, the next time the widget is repainted, the layout has to be redone.
See Also:
validate, invalidate
 o transparent
  protected boolean transparent
If a widget is transparent, the background behind this widget is still visible.
See Also:
isTransparent, setTransparent
 o directGraphics
  protected boolean directGraphics
If a widget is opaque and so its update method can be called, when directGraphics is true the update method is passed the screen graphics context. Otherwise the update method draws into a back buffer. This should be false unless you want to really optimize incremental redisplay yourself.
See Also:
transparent
 o visible
  public boolean visible
A widget can be made invisible.
See Also:
isVisible, isShowing, show, hide
 o disabled
  public boolean disabled
A disabled widget does not accept any user input.
See Also:
isDisabled, enable, disable
 o focus
  public boolean focus
When a widget has focus, a focus rectangle is usually drawn around it telling the user that keyboard input goes to that widget now. A widget can always get the focus.
See Also:
getFocusColor, focusInterest, currentFocus, hasFocus, requestFocus, clearFocus, firstFocus, nextFocus, previousFocus
 o tx
  public int tx
The widget is translated in the x-direction using this value.
See Also:
scroll, rscroll
 o ty
  public int ty
The widget is translated in the y-direction using this value.
See Also:
scroll, rscroll
 o x
  public int x
The x-coordinate of the upper-left corner of this widget.
 o y
  public int y
The y-coordinate of the upper-left corner of this widget.
 o width
  public int width
The width of this widget.
See Also:
resize
 o height
  public int height
The height of this widget.
See Also:
resize
 o north
  public int north
The number of pixels that the distance between the northern side and this widget has to be.
See Also:
DETACHED, setAttach
 o east
  public int east
The number of pixels that the distance between the eatern side and this widget has to be.
See Also:
DETACHED, setAttach
 o south
  public int south
The number of pixels that the distance between the southern side and this widget has to be.
See Also:
DETACHED, setAttach
 o west
  public int west
The number of pixels that the distance between the western side and this widget has to be.
See Also:
DETACHED, setAttach
 o wFont
  public Font wFont
When wFont is null, font is the inherited value. When wFont is not null, font is the same as wFont, which is the value that overrides the inherited one.
See Also:
font
 o font
  public Font font
The current font. The font can be null after construction. In that case getFont() returns wFont.
See Also:
wFont, getFont, setFont
 o wForeground
  public Color wForeground
When wForeground is null, foreground is the inherited value. When wForeground is not null, foreground is the same as wForeground, which is the value that overrides the inherited one.
See Also:
foreground
 o foreground
  public Color foreground
The current foreground. The foreground can be null after construction. In that case getForeground() returns wForeground.
See Also:
wForeground, getForeground, setForeground
 o wBackground
  public Color wBackground
When wBackground is null, background is the inherited value. When wBackground is not null, background is the same as wBackground, which is the value that overrides the inherited one.
See Also:
background
 o background
  public Color background
The current background. The background can be null after construction. In that case getBackground() returns wBackground.
See Also:
wBackground, getBackground, setBackground
 o wHilite
  public Color wHilite
When wHilite is null, hilite is the inherited value. When wHilite is not null, hilite is the same as wHilite, which is the value that overrides the inherited one.
See Also:
hilite
 o hilite
  public Color hilite
The current hilite color. The hilite color can be null after construction. In that case getHilite() returns wHilite. When a widget wants to hide its background, it uses this color for certain areas to fill it.
See Also:
wHilite, getHilite, setHilite
 o parent
  public Widget parent
The parent container of this class.
 o nwidgets
  public int nwidgets
The number of widgets that are in this widget.
See Also:
widgets
 o widgets
  public Widget widgets[]
The widgets that are contained by this widget.
See Also:
nwidgets, getWidget
 o layoutMgr
  public WidgetLayoutMgr layoutMgr
The layout manager for this widget.
See Also:
getLayoutMgr, setLayoutMgr
 o editor
  public Object editor
The editor for inline editing.
See Also:
getEditor, setEditor
 o wScript
  public String wScript
This is the script which is currently being edited. This script may not reflect the actual state of the widget since it still needs to be compiled
See Also:
script
 o script
  public String script
The current script of the widget which reflects the current state of the widget.
See Also:
wScript, clazz
 o clazz
  public byte clazz[]
The binary representation of the class that constitutes this widget. If the widget does not have a script this variable is null.
See Also:
script

Constructors

 o Widget
  public Widget()
Construct a widget.

Methods

 o getProperties
  public void getProperties(PropertyList list)
Get the properties of this widget.
 o getChildProperties
  public void getChildProperties(PropertyList list)
Get the properties for the children of this widget.
 o setProperties
  public void setProperties(PropertyList list)
Set the properties of this widget.
 o applyProperties
  public void applyProperties(PropertyList list)
Apply new properties to an object
 o getParent
  public Widget getParent()
Return the widget's parent.
See Also:
parent
 o location
  public Point location()
Get the location as a Point object.
See Also:
x, y
 o size
  public Dimension size()
Get the size as a Dimension object.
See Also:
width, height
 o bounds
  public Rectangle bounds()
Get the bounds as a Rectangle object.
See Also:
x, y, width, height
 o getName
  public String getName()
Get the name.
See Also:
name
 o setName
  public void setName(String name)
Set the name.
See Also:
name
 o getTip
  public String getTip()
Get the tip.
See Also:
tip
 o getTip
  public String getTip(int x,
                       int y)
Get the tip for a particular x,y location within the widget.
See Also:
tip
 o setTip
  public void setTip(String tip)
Set the tip.
See Also:
tip
 o getFont
  public Font getFont()
Get the font.
See Also:
font
 o setFont
  public void setFont(Font f)
Set the font.
See Also:
font
 o getForeground
  public Color getForeground()
Get the foreground color.
See Also:
foreground
 o setForeground
  public void setForeground(Color c)
Set the foreground color.
See Also:
foreground
 o getBackground
  public Color getBackground()
Get the background color.
See Also:
background
 o setBackground
  public void setBackground(Color c)
Set the background color.
See Also:
background
 o getHilite
  public Color getHilite()
Get the hilite color.
See Also:
hilite
 o setHilite
  public void setHilite(Color c)
Set the hilite color.
See Also:
hilite
 o isTransparent
  public boolean isTransparent()
Check whether this widget is transparent.
See Also:
transparent
 o setTransparent
  protected void setTransparent(boolean transparent)
Set the transparency. Only a widget itself is allowed to do this, since it has to make sure that it actually does paint everything when transparency is set to false.
See Also:
transparent
 o getLayoutMgr
  public WidgetLayoutMgr getLayoutMgr()
Get the layout manager for this widget.
See Also:
layoutMgr
 o setLayoutMgr
  public void setLayoutMgr(WidgetLayoutMgr layoutMgr)
Set the layout manager for this widget.
See Also:
layoutMgr
 o getPlayerPanel
  public PlayerPanel getPlayerPanel()
Get the current player.
 o getPresentation
  public Presentation getPresentation()
Get the presentation.
 o getEditor
  public String getEditor()
Get the name of the class that can be used for in-place editing. Return null if this widget can't be edited in-place.
See Also:
editor
 o setEditor
  public void setEditor(Object editor)
Set the editor for this widget.
See Also:
editor
 o getCursor
  public int getCursor()
Get the current mouse cursor of the presentation.
See Also:
cursor
 o setCursor
  public void setCursor(int cursor)
Set the current mouse cursor in the presentation.
See Also:
cursor
 o resetCursor
  public void resetCursor()
Reset the current cursor to the default cursor of the presentation.
See Also:
defaultCursor
 o getFontMetrics
  public FontMetrics getFontMetrics(Font font)
Get font metrics for a font.
 o getImage
  public Image getImage(String src)
Get an image.
 o isDisabled
  public boolean isDisabled()
Check if disabled.
See Also:
disabled
 o enable
  public void enable()
Enable the widget.
See Also:
disabled
 o disable
  public void disable()
Disable the widget.
See Also:
disabled
 o disable
  public void disable(boolean disabled)
Disable the widget.
See Also:
disabled
 o isVisible
  public boolean isVisible()
Check if visible.
See Also:
visible
 o isShowing
  public boolean isShowing()
Check if showing on screen.
See Also:
visible
 o show
  public void show()
Show
See Also:
visible
 o show
  public void show(boolean flag)
Show conditionally.
Parameters:
flag - if true then shows, if false then hides this widget
See Also:
hide, show
 o hide
  public void hide()
Hide this widget.
See Also:
visible
 o getValue
  public Object getValue()
Get the value of the widget. This will return a value object that is "appropriate" for this particular widget type. This will return null in cases where the object does not have a value.
 o getValue
  public Object getValue(String name)
Get the value of a named widget.
See Also:
getWidget
 o setValue
  public void setValue(Object value)
Set the value of the widget. This only works if the value object is of the appropriate type, or if the value object can be converted to the appropriate type.
 o setValue
  public void setValue(String name,
                       Object value)
Set the value of a named widget.
See Also:
getWidget
 o getText
  public String getText()
Get the text of the widget. This will return the label for objects that have a label. It may return null for objects that don't have a text value or label.
 o getText
  public String getText(String name)
Get the text of a named widget.
See Also:
getWidget
 o setText
  public void setText(String text)
Set the text of a widget. This will change the label for objects that have a label.
 o setText
  public void setText(String name,
                      String text)
Set the text of a named widget.
See Also:
getWidget
 o gotoPage
  public void gotoPage(String page)
Goto a page in the current folder.
See Also:
gotoPage
 o gotoPage
  public void gotoPage(String name,
                       String page)
Goto a page in a named folder
See Also:
gotoPage, getWidget
 o inside
  public boolean inside(int px,
                        int py)
Check if a point is inside the widget. The point is specified in the parent's coordinate system.
 o inside
  public boolean inside(int px,
                        int py,
                        int pw,
                        int ph)
Check if the widget is inside a rectangle. The rectangle is specified in the parent's coordinate system.
Parameters:
pw - width
ph - height
 o overlap
  public boolean overlap(int px,
                         int py,
                         int pw,
                         int ph)
Check if the widget overlaps with rectangle. The rectangle is specified in the parent's coordinate system.
Parameters:
pw - width
ph - height
 o locateWidget
  public Widget locateWidget(int x,
                             int y)
Locate the topmost widget that contains the specified coordinate. The coordinates are specified in the parent's coordinate system. Only visible widgets are considered.
 o locateWidgets
  public void locateWidgets(Vector v,
                            int x,
                            int y)
Locate all the widgets that intersect with the given point and append them to the vector, so that the front most ends up first. The coordinates are specified in the parent's coordinate system. Both visible and invisible widgets are considered.
 o locateWidgets
  public void locateWidgets(Vector v,
                            int x,
                            int y,
                            int width,
                            int height)
Locate all the widgets inside a rectangle. The widget are added to the vector so that the front most ends up first. The coordinates are specified in the parent's coordinate system. Both visible and invisible widgets are considered.
 o paintAll
  protected void paintAll(Graphics g,
                          int x,
                          int y,
                          int width,
                          int height)
Paint everyting in the indicated area. The area that needs painting is specified in the parent's coordinates. Calls paint(). Overriding this method in subclasses can break everything, so be sure what you're doing when you do that!
See Also:
paint
 o paint
  public void paint(Graphics g,
                    int x,
                    int y,
                    int width,
                    int height)
Paint part of the screen.
 o paint
  public void paint(Graphics g)
Paint from scratch. Remember only to paint what is inside the clipping area.
 o update
  public void update(Graphics g)
Update the widget, this will be called in response to a repaint() request. You can assume that the screen is still intact.
 o repaint
  public void repaint()
Repaint the entrire widget as soon as possible.
 o repaint
  public void repaint(long tm)
Repaint this widget. If the widget is not obscured and if the wiget is not transparent this will result in a call to update().
 o repaint
  public void repaint(int x,
                      int y,
                      int width,
                      int height)
This will repaint the indicated area of the screen (local coordinates). Note that this will always result in a call to paint().
 o repaintParent
  public void repaintParent(long tm,
                            int x,
                            int y,
                            int width,
                            int height)
Repaint a part of the parent window. This is used when reshaping widgets, or when repainting transparent widgets. The coordinates are in the parent's coordinate system.
 o repaint
  public void repaint(long tm,
                      int x,
                      int y,
                      int width,
                      int height)
This will repaint the indicated area of the screen (local coordinates). Note that this will always result in a call to paint().
 o imageUpdate
  public boolean imageUpdate(Image img,
                             int flags,
                             int x,
                             int y,
                             int width,
                             int height)
Update the widget after more image data arrives.
 o createImage
  public Image createImage(ImageProducer producer)
Creates an image from the specified image producer.
Parameters:
producer - the image producer
 o createImage
  public Image createImage(int width,
                           int height)
Creates an off-screen drawable Image to be used for double buffering.
Parameters:
width - the specified width
height - the specified height
 o tick
  public long tick(long tm,
                   Object arg)
The clock is ticking...
See Also:
TimerClient
 o layout
  public void layout()
Layout the widget.
 o validate
  public void validate()
Validate the widget.
See Also:
valid
 o invalidate
  public void invalidate()
Invalidate the widget (the size has changed).
See Also:
valid
 o reshape
  public void reshape(int x,
                      int y,
                      int width,
                      int height)
Reshape the widget. The coordinates are specified in the parent's coordinate system.
 o reshape
  public void reshape(int x,
                      int y,
                      int width,
                      int height,
                      boolean repaint)
Reshape the widget. The coordinates are specified in the parent's coordinate system.
 o move
  public void move(int x,
                   int y)
Move the widget. The coordinates are specified in the parent's coordinate system.
See Also:
reshape
 o rmove
  public void rmove(int dx,
                    int dy)
Move relative.
See Also:
reshape
 o resize
  public void resize(Dimension d)
Resize the widget.
 o resize
  public void resize(int width,
                     int height)
Resize the widget.
 o setAttach
  public void setAttach(int north,
                        int east,
                        int south,
                        int west)
Set the attachments of this widget to the given number of pixels. Use the constant DETACHED from widgetConstants to detach the widget from that side.
 o scroll
  public void scroll(int tx,
                     int ty)
Scroll the contents of this widget. This will change the translation of the widget.
See Also:
tx, ty
 o rscroll
  public void rscroll(int dx,
                      int dy)
Scroll the contents of this widget relative. This will change the translation of the widget.
See Also:
tx, ty
 o add
  public void add(Widget w)
Add a widget.
See Also:
widgets, nwidgets
 o add
  public void add(int pos,
                  Widget w)
Add a widget at a given position.
See Also:
widgets, nwidgets
 o replace
  public void replace(Widget newWidget)
Replace this widget with another widget. This is usually used when scripting widgets.
 o replace
  public void replace(Widget oldWidget,
                      Widget newWidget)
Replace a widget by another widget.
 o replace
  public void replace(int pos,
                      Widget w)
Replace a widget at a given position.
 o remove
  public void remove()
Remove this widget from its container.
See Also:
widgets, nwidgets
 o remove
  public void remove(Widget w)
Remove a widget from this widget.
See Also:
widgets, nwidgets
 o remove
  protected void remove(Widget w,
                        int i)
Removes the widget, assuming that the given index is the index of the widget in the widgets array. It does not invalidate and/or repaint this widget.
 o removeAll
  public synchronized void removeAll()
Remove all widgets from this widget.
 o toFront
  public void toFront()
Bring this widget to the front.
 o toFront
  public void toFront(Widget w)
Move a widget to the front.
 o toBack
  public void toBack()
Send this widget to the back.
 o toBack
  public void toBack(Widget w)
Move a widget to the back.
 o init
  public void init()
Called to initialize a widget.
 o start
  public void start()
Called to start a widget.
 o stop
  public void stop()
Called to stop a widget.
 o destroy
  public void destroy()
Called to destroy a widget.
 o findWidget
  public Widget findWidget(String nm)
Find a widget in this container. This method will only look in the current container. It does not accept hierachical names.
See Also:
getWidget
 o getWidget
  public Widget getWidget(String name)
Get a widget by name. This methods accepts hierarchical names. If the root name is not found in this container the parent of the container is tried.
See Also:
findWidget
 o getAudioClip
  public AudioClip getAudioClip(String src)
Get an audio clip.
 o getAudioClipAt
  public AudioClip getAudioClipAt(URL url)
Get an audio clip using a url.
 o play
  public void play(String src)
THIS METHOD WILL BE REMOVED IN the beta4 release, It is still here for backward compatibility. New method: audioPlay.
See Also:
audioPlay
 o audioPlay
  public void audioPlay(String src)
Play an audio clip.
 o audioPlay
  public void audioPlay(URL url)
Play an audio clip using a url.
 o audioLoop
  public void audioLoop(String src)
Play an audio clip looped.
 o audioLoop
  public void audioLoop(URL url)
Play the audio clip at the given url looped.
 o audioStop
  public void audioStop(String src)
Stop an audio clip.
 o audioStop
  public void audioStop(URL url)
Stop the audio clip with the given url.
 o getSelForeground
  public Color getSelForeground()
Get the selection foreground color.
See Also:
getSelBackground
 o getSelBackground
  public Color getSelBackground()
Get the selection background color.
See Also:
getSelForeground
 o getSelFocusColor
  public Color getSelFocusColor()
Get the selection focus color, which is the color of the focus rectangle around the selection bar.
See Also:
getFocusColor
 o getFocusColor
  public Color getFocusColor()
Get the focus color, which is the standard color of the focus rectangle.
See Also:
getSelFocusColor
 o getDefaultButton
  public Widget getDefaultButton()
Get the default button. Returns null if no default button is found or if no playerpanel exists. Returns the first default button found, if more default buttons exist.
 o focusInterest
  public boolean focusInterest()
True if this widget is potentially interested in getting the focus. When this function returns false, this does not mean it cannot get the focus. It just means that you cannot give it the focus using the keyboard, you have to do that programmatically.
See Also:
focus, requestFocus
 o currentFocus
  public Widget currentFocus()
Get the widget that has the current focus.
See Also:
focus
 o hasFocus
  public boolean hasFocus()
True if the current widget has the focus.
See Also:
focus
 o requestFocus
  public void requestFocus()
Ask the playerPanel for the focus. When the playerPanel has given the focus to this widget, it sends a GOT_FOCUS event. A widget can always get the focus using this function, even when it is not interested in the focus.
See Also:
focus, focusInterest
 o clearFocus
  public void clearFocus()
Remove the character focus.
See Also:
focus
 o firstFocus
  public void firstFocus()
Assign the focus to the first widget.
See Also:
focus
 o nextFocus
  public void nextFocus()
Assign the focus to the next widget that is located to the right or below the current focus.
See Also:
focus
 o previousFocus
  public void previousFocus()
Assign the focus to the previous widget that is located to the left or above the current focus.
See Also:
focus
 o clearPopups
  public void clearPopups()
Clear any popups associated with this widget.
 o postEvent
  public boolean postEvent(Event evt)
Post an event to this widget. If the widget does not handle the event, it is passed to the parent.
See Also:
handleEvent
 o handleEvent
  public boolean handleEvent(Event evt)
Handle an event.
See Also:
postEvent
 o mouseDown
  public boolean mouseDown(Event evt,
                           int x,
                           int y)
By default a widget calls this function when a mouseDown event occurs. We strongly advise against the use of this function and advise the use of doing the actions within handleEvent to reduce the number of method calls.
 o mouseDrag
  public boolean mouseDrag(Event evt,
                           int x,
                           int y)
By default a widget calls this function when a mouseDrag event occurs. We strongly advise against the use of this function and advise the use of doing the actions within handleEvent to reduce the number of method calls.
 o mouseUp
  public boolean mouseUp(Event evt,
                         int x,
                         int y)
By default a widget calls this function when a mouseUp event occurs. We strongly advise against the use of this function and advise the use of doing the actions within handleEvent to reduce the number of method calls.
 o mouseMove
  public boolean mouseMove(Event evt,
                           int x,
                           int y)
By default a widget calls this function when a mouseMove event occurs. We strongly advise against the use of this function and advise the use of doing the actions within handleEvent to reduce the number of method calls.
 o mouseEnter
  public boolean mouseEnter(Event evt,
                            int x,
                            int y)
By default a widget calls this function when a mouseEnter event occurs. We strongly advise against the use of this function and advise the use of doing the actions within handleEvent to reduce the number of method calls.
 o mouseExit
  public boolean mouseExit(Event evt,
                           int x,
                           int y)
By default a widget calls this function when a mouseExit event occurs. We strongly advise against the use of this function and advise the use of doing the actions within handleEvent to reduce the number of method calls.
 o keyDown
  public boolean keyDown(Event evt,
                         int key)
By default a widget calls this function when a keyDown event occurs. We strongly advise against the use of this function and advise the use of doing the actions within handleEvent to reduce the number of method calls.
 o keyUp
  public boolean keyUp(Event evt,
                       int key)
By default a widget calls this function when a keyUp event occurs. We strongly advise against the use of this function and advise the use of doing the actions within handleEvent to reduce the number of method calls.
 o action
  public boolean action(Event evt,
                        Object what)
By default a widget calls this function when a action event occurs. We strongly advise against the use of this function and advise the use of doing the actions within handleEvent to reduce the number of method calls.
 o gotFocus
  public boolean gotFocus(Event evt,
                          Object what)
By default a widget calls this function when a gotFocus event occurs. We strongly advise against the use of this function and advise the use of doing the actions within handleEvent to reduce the number of method calls.
 o lostFocus
  public boolean lostFocus(Event evt,
                           Object what)
By default a widget calls this function when a lostFocus event occurs. We strongly advise against the use of this function and advise the use of doing the actions within handleEvent to reduce the number of method calls.
 o action
  public void action()
Execute the action associated with this widget.
 o sync
  public void sync()
Sync the toolkit.
 o paramString
  public void paramString(StringBuffer buf)
Build a string describing the widget's parameters. This string is used in toString.
See Also:
toString
 o getWidgetClass
  public Class getWidgetClass()
Gets the widget class for this widget. This is useful if you are interested in the actual widget class, rather than the class of the script.
 o getDescription
  public String getDescription()
Get a short description of the widget.
 o toString
  public String toString()
Convert the widget to a string for debugging.
Overrides:
toString in class Object
See Also:
paramString
 o list
  public void list()
Print the widget for debugging.
 o list
  public void list(PrintStream out,
                   int n)
Print the widget with indentation for debugging. This function uses toString to print the widget.
See Also:
toString

All Packages  Class Hierarchy  This Package  Previous  Next  Index