All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dtai.gwt.Gadget

java.lang.Object
   |
   +----dtai.gwt.Gadget

public class Gadget
extends Object
implements ImageObserver
The Gadget class.


Variable Index

 o defaultBackground
 o defaultColor
 o defaultFont
 o defaultSelectedBackground
 o pref_height
 o pref_width
 o transparent

Constructor Index

 o Gadget()

Method Index

 o addComponentListener(ComponentListener)
Adds the specified component listener to receive component events from this component.
 o addFocusListener(FocusListener)
Adds the specified focus listener to receive focus events from this component.
 o addKeyListener(KeyListener)
Adds the specified key listener to receive key events from this component.
 o addMouseListener(MouseListener)
Adds the specified mouse listener to receive mouse events from this component.
 o addMouseMotionListener(MouseMotionListener)
Adds the specified mouse motion listener to receive mouse motion events from this component.
 o calcForeground(Color)
calcForeground
 o checkImage(Image, ImageObserver)
Returns the status of the construction of a screen representation of the specified image.
 o checkImage(Image, int, int, ImageObserver)
Returns the status of the construction of a scaled screen representation of the specified image.
 o clear(GadgetGraphics)
clear.
 o contains(int, int)
Checks whether this component "contains" the specified (x, y) location, where x and y are defined to be relative to the coordinate system of this component.
 o contains(int, int, Gadget)
Checks whether this component "contains" the specified (x, y) location, where x and y are defined to be relative to the coordinate system of this component.
 o contains(Point)
Checks whether this component "contains" the specified point, where x and y in the point are defined to be relative to the coordinate system of this component.
 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 doDefaultAction(AWTEvent)
doDefaultAction
 o doLayout()
Lays out the component.
 o findNextFocusGadget()
Returns this Gadget if it is focusTraversable.
 o fontChanged()
fontChanged
 o forceRepaint()
Repaints the component.
 o freeze()
freeze
 o getArg()
Returns the current arg variable.
 o getBackground()
Gets the background color.
 o getBackground(GadgetGraphics)
getBackground
 o getBounds()
Returns the current bounds of this component.
 o getBounds(Rectangle)
Returns the current bounds of this component.
 o getCursor()
Gets the cursor set on this component.
 o getFinalBackground()
getFinalBackground
 o getFinalBackground(GadgetGraphics)
getFinalBackground
 o getFinalNormalBackground()
If transparent (background is null), gets its ancestor's final background.
 o getFinalNormalBackground(GadgetGraphics)
getFinalNormalBackground
 o getFinalSelectedBackground()
If selected background is null, gets its ancestor's final selected background.
 o getFinalSelectedBackground(GadgetGraphics)
getFinalSelectedBackground
 o getFocusGroup()
Sets the focusGroup.
 o getFocusOffset()
Returns the offset used to calculate the next focus gadget, usually the value of getOffset(), but might be an ancestors offset in some cases (like combo box).
 o getFont()
Gets the font of the component.
 o getFont(GadgetGraphics)
getFont
 o getFontMetrics(Font)
Gets the font metrics for this component.
 o getFontSetting()
returns the exact font setting, without inheriting from the parent
 o getForeground()
Gets the foreground color.
 o getForeground(GadgetGraphics)
getForeground
 o getGadgetAt(int, int)
Returns the component or subcomponent that contains the x,y location.
 o getGadgetAt(Point)
Returns the component or subcomponent that contains the specified point.
 o getGadgetGraphics()
Gets a GadgetGraphics context for this component.
 o getGadgetGraphics(int, int, int, int)
Gets a GadgetGraphics context for this component.
 o getGadgetGraphics(int, int, int, int, boolean)
Gets a GadgetGraphics context for this component.
 o getGadgetHelp()
Gets the current GadgetHelp object.
 o getHelpId()
Returns current HelpId variable.
 o getImage(String)
getImage
 o getImage(URL)
getImage
 o getLocation()
Returns the current location of this component.
 o getLocation(Point)
Returns the current location of this component.
 o getMinimumSize()
Returns the mininimum size of this component.
 o getMinimumSize(Dimension)
Returns the mininimum size of this component.
 o getNextFocusGadget()
Gets the nextFocusGadget.
 o getNormalBackground()
Gets the background color.
 o getNormalBackground(GadgetGraphics)
getNormalBackground
 o getNormalBackgroundSetting()
returns the exact normalBackground setting, without inheriting from the parent
 o getNormalForeground()
Gets the normal Foreground color.
 o getNormalForeground(GadgetGraphics)
getNormalForeground
 o getNormalForeground(GadgetGraphics, boolean)
getNormalForeground
 o getNormalForegroundSetting()
returns the exact normalForeground setting, without inheriting from the parent
 o getOffset()
Gets the x and y offsets to add to the drawing coordinates for this component.
 o getOverlayPanel()
Gets the panel in which to draw overlays (menus, tips).
 o getParent()
Gets the parent of the component.
 o getPreferredSize()
Returns the preferred size of this component.
 o getPreferredSize(Dimension)
Returns the preferred size of this component.
 o getSelectedBackground()
Gets the selectedBackground color.
 o getSelectedBackground(GadgetGraphics)
getSelectedBackground
 o getSelectedBackgroundSetting()
returns the exact selectedBackground setting, without inheriting from the parent
 o getSelectedForeground()
Gets the selectedForeground color.
 o getSelectedForeground(GadgetGraphics)
getSelectedForeground
 o getSelectedForeground(GadgetGraphics, boolean)
getSelectedForeground
 o getSelectedForegroundSetting()
returns the exact selectedForeground setting, without inheriting from the parent
 o getShell()
Gets the shell of the component.
 o getSize()
Returns the current size of this component.
 o getSize(Dimension)
Returns the current size of this component.
 o getStatusTip()
Returns current status variable.
 o getTempGraphics()
Gets a GadgetGraphics context for this component for doing XOR draws or for drawing very temporary objects (maybe menus, tips, etc.).
 o getTip()
Returns current tip variable.
 o getTranslatedGraphics(Rectangle)
Returns the graphics to use.
 o getTreeLock()
getTreeLock
 o hasFocus()
hasFocus
 o hasMouse()
hasMouse
 o imageUpdate(Image, int, int, int, int, int)
imageUpdate
 o invalidate()
Invalidates the component.
 o invalidate(boolean)
invalidate
 o invokeDefault(AWTEvent)
invokeDefault
 o isClippingRequired()
isClippingRequired
 o isConsumingTransparentClicks()
isConsumingTransparentClicks
 o isDescendentOf(ContainerGadget)
isDescendentOf
 o isEnabled()
Checks if this Component is enabled.
 o isFocusTraversable()
Returns whether this component can be traversed using Tab or Shift-Tab keyboard focus traversal.
 o isFrozen()
isFrozen
 o isFunctioning()
Checks if this Component is functioning on screen.
 o isIgnoringMouse()
isIgnoringMouse
 o isNowDefault()
Checks whether this Gadget is the default gadget for the shell.
 o isSelected()
Checks if this Component is selected.
 o isShowing()
Checks if this Component is showing on screen.
 o isShowing(boolean)
Checks if this Component is showing on screen.
 o isShowingSelected()
Checks if this component is selected, or if its parent is selected.
 o isTransparent()
Checks if this Component is transparent.
 o isValid()
Checks if this Component is valid.
 o isVisible()
Checks if this Component is visible.
 o nextFocus()
nextFocus
 o nextGroupFocus()
nexGroupFocus
 o notifyStateChange()
notifyStateChange
 o paint(GadgetGraphics)
Paints the component.
 o prepareImage(Image, ImageObserver)
Prepares an image for rendering on this Component.
 o prepareImage(Image, int, int, ImageObserver)
Prepares an image for rendering on this Component at the specified width and height.
 o prevFocus()
prevFocus
 o prevGroupFocus()
prevGroupFocus
 o processComponentEvent(ComponentEvent)
Processes component events occurring on this component by dispatching them to any registered ComponentListener objects.
 o processEvent(AWTEvent)
Processes events occurring on this component.
 o processFocusEvent(FocusEvent)
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.
 o processKeyEvent(KeyEvent)
Processes key events occurring on this component by dispatching them to any registered KeyListener objects.
 o processMouseEvent(MouseEvent)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.
 o processMouseMotionEvent(MouseEvent)
Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects.
 o removeComponentListener(ComponentListener)
Removes the specified listener so it no longer receives component events from this component.
 o removeFocusListener(FocusListener)
Removes the specified focus listener so it no longer receives focus events from this component.
 o removeKeyListener(KeyListener)
Removes the specified key listener so it no longer receives key events from this component.
 o removeMouseListener(MouseListener)
Removes the specified mouse listener so it no longer receives mouse events from this component.
 o removeMouseMotionListener(MouseMotionListener)
Removes the specified mouse motion listener so it no longer receives mouse motion events from this component.
 o repaint()
Repaints the component.
 o repaint(int, int, int, int)
Repaints part of the component.
 o repaint(int, int, int, int, boolean, boolean)
Repaints part of the component.
 o requestFocus()
Requests the input focus.
 o requiresHorizScrollbar()
requiresHorizScrollbar
 o requiresVertScrollbar()
requiresVertScrollbar
 o setArg(Object)
Sets arg variable to the given object.
 o setAsDefault()
setAsDefault
 o setBackground(Color)
setBackground
 o setBounds(int, int, int, int)
Reshapes the Component to the specified bounding box.
 o setBounds(int, int, int, int, boolean)
setBounds reshapes the Component to the specified bounding box.
 o setBounds(Rectangle)
Reshapes the Component to the specified bounding box.
 o setBounds(Rectangle, boolean)
setBounds reshapes the Component to the specified bounding box.
 o setClippingRequired(boolean)
setClippingRequired
 o setConsumingTransparentClicks(boolean)
If transparent, mouse clicks in uncovered areas will still be caught.
 o setCursor(GadgetCursor)
Set the cursor.
 o setEnabled(boolean)
Enables a component.
 o setFocusGroup(ContainerGadget)
Sets the focusGroup to the supplied ContainerGadget.
 o setFont(Font)
Sets the font of the component.
 o setForeground(Color)
Sets the Foreground color.
 o setGadgetHelp(GadgetHelp)
Sets gadgetHelp variable to the given object.
 o setHelpId(String)
Sets helpId variable to the given String.
 o setIgnoringMouse(boolean)
By default, LinesGadget ignores the mouse.
 o setLocation(int, int)
Moves the Component to a new location.
 o setLocation(Point)
Moves the Component to a new location.
 o setNextFocusGadget(Gadget)
Sets nextFocusGadget variable to the given object.
 o setNormalBackground(Color)
Sets the background color.
 o setNormalForeground(Color)
Sets the normalForeground color.
 o setParent(ContainerGadget)
Sets the parent of the component.
 o setParent(ContainerGadget, boolean)
Sets the parent of the component.
 o setSelected(boolean)
Sets selection of a component.
 o setSelectedBackground(Color)
setSelectedBackground
 o setSelectedForeground(Color)
Sets the selectedForeground color.
 o setShell(GadgetShell)
Sets the shell of the component.
 o setSize(Dimension)
Resizes the Component to the specified dimension.
 o setSize(Dimension, boolean)
setSize
 o setSize(int, int)
Resizes the Component to the specified width and height.
 o setSize(int, int, boolean)
setSize
 o setStatusTip(String)
Sets status variable to the given String.
 o setTip(String)
Sets tip variable to the given String.
 o setVisible(boolean)
Shows or hides the component depending on the boolean flag b.
 o setVisible(boolean, boolean)
Shows or hides the component depending on the boolean flag b.
 o thaw()
thaw
 o transferFocus()
Transfers the focus to the next component.
 o update(GadgetGraphics)
update
 o validate()
Ensures that a component has a valid layout.

Variables

 o defaultFont
 public static final Font defaultFont
 o transparent
 public static final Color transparent
 o defaultColor
 public static final Color defaultColor
 o defaultBackground
 public static final Color defaultBackground
 o defaultSelectedBackground
 public static final Color defaultSelectedBackground
 o pref_width
 protected int pref_width
 o pref_height
 protected int pref_height

Constructors

 o Gadget
 public Gadget()

Methods

 o getTreeLock
 public final Object getTreeLock()
getTreeLock

Returns:
Object
 o getParent
 public ContainerGadget getParent()
Gets the parent of the component.

Returns:
ContainerGadget
 o setParent
 protected final void setParent(ContainerGadget parent)
Sets the parent of the component.

Parameters:
parent - ContainerGadgaet
 o setParent
 protected void setParent(ContainerGadget parent,
                          boolean invalidateParent)
Sets the parent of the component.

Parameters:
parent - ContainerGadgaet
invalidateParent - - TBD
 o getShell
 public final GadgetShell getShell()
Gets the shell of the component.

Returns:
Gadgetshell
 o getOverlayPanel
 public final OverlayPanelGadget getOverlayPanel()
Gets the panel in which to draw overlays (menus, tips).

Returns:
OverlayPanelGadget
 o setShell
 protected void setShell(GadgetShell shell)
Sets the shell of the component.

Parameters:
shell - - TBD
 o getGadgetHelp
 public final GadgetHelp getGadgetHelp()
Gets the current GadgetHelp object.

Returns:
GadgetHelp
 o isNowDefault
 public boolean isNowDefault()
Checks whether this Gadget is the default gadget for the shell.

Returns:
false if the shell variable is null, else returns whether or not the shell's defaultGadget is this Gadget
 o setAsDefault
 public void setAsDefault()
setAsDefault

 o doDefaultAction
 public void doDefaultAction(AWTEvent e)
doDefaultAction

Parameters:
e - - TBD
 o invokeDefault
 public void invokeDefault(AWTEvent e)
invokeDefault

Parameters:
e - - TBD
 o setNextFocusGadget
 public void setNextFocusGadget(Gadget nextFocusGadget)
Sets nextFocusGadget variable to the given object.

Parameters:
nextFocusGadget - new value for nextFocusGadget
 o getNextFocusGadget
 public Gadget getNextFocusGadget()
Gets the nextFocusGadget.

Returns:
Gadget
 o findNextFocusGadget
 public Gadget findNextFocusGadget()
Returns this Gadget if it is focusTraversable.

Returns:
this Gadget, if it is focusTraversable, else null.
 o setFocusGroup
 public void setFocusGroup(ContainerGadget focusGroup)
Sets the focusGroup to the supplied ContainerGadget.

Parameters:
focusGroup - the new value for the focusGroup
 o getFocusGroup
 public final ContainerGadget getFocusGroup()
Sets the focusGroup.

Returns:
ContainerGadget
 o setGadgetHelp
 public void setGadgetHelp(GadgetHelp gadgetHelp)
Sets gadgetHelp variable to the given object.

Parameters:
gadgetHelp - new value for gadgetHelp
 o getHelpId
 public String getHelpId()
Returns current HelpId variable.

Returns:
String - TBD
 o setHelpId
 public final void setHelpId(String helpId)
Sets helpId variable to the given String.

Parameters:
setHelpId - new String value for helpId variable
 o getTip
 public final String getTip()
Returns current tip variable.

Returns:
String
 o setTip
 public final void setTip(String tip)
Sets tip variable to the given String.

Parameters:
tip - new String value for tip variable
 o getStatusTip
 public final String getStatusTip()
Returns current status variable.

Returns:
String
 o setStatusTip
 public final void setStatusTip(String statusTip)
Sets status variable to the given String.

Parameters:
status - new String value for status variable
 o getArg
 public final Object getArg()
Returns the current arg variable.

Returns:
Object
 o setArg
 public final void setArg(Object arg)
Sets arg variable to the given object.

Parameters:
arg - new value for arg
 o isValid
 public final boolean isValid()
Checks if this Component is valid. Components are invalidated when they are first shown on the screen.

Returns:
boolean valid status
See Also:
validate, invalidate
 o isVisible
 public final boolean isVisible()
Checks if this Component is visible. Components are initially visible (with the exception of top level components such as Frame)

Returns:
boolean visible status
 o isTransparent
 public final boolean isTransparent()
Checks if this Component is transparent.

Returns:
boolean result of checking background for null
See Also:
getBackground
 o isShowing
 public final boolean isShowing()
Checks if this Component is showing on screen. This means that the component must be visible, and it must be in a container that is visible and showing.

Returns:
boolean result of showing checks
See Also:
setVisible
 o isShowing
 public final boolean isShowing(boolean checkShell)
Checks if this Component is showing on screen. This means that the component must be visible, and it must be in a container that is visible and showing.

Returns:
boolean result of showing checks
See Also:
setVisible
 o isShowingSelected
 public boolean isShowingSelected()
Checks if this component is selected, or if its parent is selected.

Returns:
boolean result of selected checks
 o isFunctioning
 public final boolean isFunctioning()
Checks if this Component is functioning on screen. This means that the component must be enabled, and it must be in a container that is enabled and functioning.

Returns:
boolean result of functioning checks
See Also:
setVisible
 o isSelected
 public final boolean isSelected()
Checks if this Component is selected. Components are not initially selected.

Returns:
boolean selected status
See Also:
setSelected
 o setSelected
 public void setSelected(boolean b)
Sets selection of a component. Components are not initially selected.

Parameters:
b - new boolean selected status
See Also:
isSelected
 o isEnabled
 public final boolean isEnabled()
Checks if this Component is enabled. Components are initially enabled.

Returns:
boolean enabled status
See Also:
setEnabled
 o setEnabled
 public void setEnabled(boolean b)
Enables a component.

Parameters:
b - new boolean enabled status
See Also:
isEnabled
 o setVisible
 public final void setVisible(boolean b)
Shows or hides the component depending on the boolean flag b.

Parameters:
b - if true, show the component; otherwise, hide the component.
See Also:
isVisible
 o setVisible
 public void setVisible(boolean b,
                        boolean invalidateParent)
Shows or hides the component depending on the boolean flag b.

Parameters:
b - if true, show the component; otherwise, hide the component.
invalidateParent - if true, invalidate Parent, else do not.
See Also:
isVisible
 o setConsumingTransparentClicks
 public final void setConsumingTransparentClicks(boolean consumingTransparentClicks)
If transparent, mouse clicks in uncovered areas will still be caught. Otherwise, they are passed to the objects below them.

Parameters:
consumingTransparentClicks - - TBD
 o isConsumingTransparentClicks
 public final boolean isConsumingTransparentClicks()
isConsumingTransparentClicks

Returns:
boolean
 o setIgnoringMouse
 public final void setIgnoringMouse(boolean ignoringMouse)
By default, LinesGadget ignores the mouse.

Parameters:
ignoringMouse - - TBD
 o isIgnoringMouse
 public final boolean isIgnoringMouse()
isIgnoringMouse

Returns:
boolean
 o setClippingRequired
 public final void setClippingRequired(boolean clippingRequired)
setClippingRequired

Parameters:
clippingRequired - - TBD
 o isClippingRequired
 public final boolean isClippingRequired()
isClippingRequired

Returns:
boolean
 o getNormalForeground
 public final Color getNormalForeground()
Gets the normal Foreground color.

Returns:
Color
See Also:
setNormalForeground
 o getNormalForeground
 protected final Color getNormalForeground(GadgetGraphics g)
getNormalForeground

Parameters:
g - - TBD
Returns:
Color
 o calcForeground
 public Color calcForeground(Color background)
calcForeground

Parameters:
background - - TBD
Returns:
Color.
 o getNormalForeground
 protected final Color getNormalForeground(GadgetGraphics g,
                                           boolean processDefault)
getNormalForeground

Parameters:
g - - TBD
processDefault - - TBD
Returns:
Color
 o getSelectedBackground
 public final Color getSelectedBackground()
Gets the selectedBackground color.

Returns:
Color
See Also:
setSelectedBackground
 o getSelectedBackground
 protected final Color getSelectedBackground(GadgetGraphics g)
getSelectedBackground

Parameters:
g - - TBD
Returns:
Color
 o getSelectedForeground
 public final Color getSelectedForeground()
Gets the selectedForeground color.

Returns:
Color
See Also:
setSelectedForeground
 o getSelectedForeground
 protected final Color getSelectedForeground(GadgetGraphics g)
getSelectedForeground

Parameters:
g - - TBD
Returns:
Color
 o getSelectedForeground
 protected final Color getSelectedForeground(GadgetGraphics g,
                                             boolean processDefault)
getSelectedForeground

Parameters:
g - - TBD
Returns:
Color
 o getForeground
 public final Color getForeground()
Gets the foreground color.

Returns:
Color
See Also:
setForeground
 o getForeground
 protected final Color getForeground(GadgetGraphics g)
getForeground

Parameters:
g - - TBD
Returns:
Color
 o getBackground
 public final Color getBackground()
Gets the background color.

Returns:
Color
See Also:
setbackground
 o getBackground
 protected final Color getBackground(GadgetGraphics g)
getBackground

Parameters:
g - - TBD
Returns:
Color
 o setForeground
 public void setForeground(Color c)
Sets the Foreground color.

Parameters:
c - the Color
See Also:
getNormalForeground, setNormalForeground
 o setNormalForeground
 public void setNormalForeground(Color c)
Sets the normalForeground color.

Parameters:
c - the Color
See Also:
getNormalForeground
 o setSelectedForeground
 public void setSelectedForeground(Color c)
Sets the selectedForeground color.

Parameters:
c - the Color
See Also:
getSelectedForeground
 o getNormalBackground
 public final Color getNormalBackground()
Gets the background color.

Returns:
Color
See Also:
setBackground
 o getNormalBackground
 protected Color getNormalBackground(GadgetGraphics g)
getNormalBackground

Parameters:
g - - TBD
Returns:
Color
 o getFinalNormalBackground
 public final Color getFinalNormalBackground()
If transparent (background is null), gets its ancestor's final background.

Returns:
Color
See Also:
setBackground
 o getFinalNormalBackground
 protected Color getFinalNormalBackground(GadgetGraphics g)
getFinalNormalBackground

Parameters:
g - - TBD
Returns:
Color
 o getFinalSelectedBackground
 public final Color getFinalSelectedBackground()
If selected background is null, gets its ancestor's final selected background.

Returns:
selected background or parent's selected background
 o getFinalSelectedBackground
 protected final Color getFinalSelectedBackground(GadgetGraphics g)
getFinalSelectedBackground

Parameters:
g - - TBD
Returns:
Color
 o getFinalBackground
 public final Color getFinalBackground()
getFinalBackground

Returns:
Color
 o getFinalBackground
 protected Color getFinalBackground(GadgetGraphics g)
getFinalBackground

Parameters:
g - - TBD
Returns:
Color
 o setNormalBackground
 public void setNormalBackground(Color c)
Sets the background color.

Parameters:
c - - the Color
See Also:
getBackground
 o setBackground
 public final void setBackground(Color c)
setBackground

Parameters:
c - - TBD
 o setSelectedBackground
 public void setSelectedBackground(Color c)
setSelectedBackground

Parameters:
c - - TBD
 o getFont
 public final Font getFont()
Gets the font of the component.

Returns:
Font
See Also:
setFont
 o getFontSetting
 public final Font getFontSetting()
returns the exact font setting, without inheriting from the parent

Returns:
Font
 o getNormalBackgroundSetting
 public final Color getNormalBackgroundSetting()
returns the exact normalBackground setting, without inheriting from the parent

Returns:
Color
 o getSelectedBackgroundSetting
 public final Color getSelectedBackgroundSetting()
returns the exact selectedBackground setting, without inheriting from the parent

Returns:
Color
 o getNormalForegroundSetting
 public final Color getNormalForegroundSetting()
returns the exact normalForeground setting, without inheriting from the parent

Returns:
Color
 o getSelectedForegroundSetting
 public final Color getSelectedForegroundSetting()
returns the exact selectedForeground setting, without inheriting from the parent

Returns:
Color
 o getFont
 public Font getFont(GadgetGraphics g)
getFont

Parameters:
g - - TBD
Returns:
Font
 o setFont
 public void setFont(Font f)
Sets the font of the component.

Parameters:
f - - the font
See Also:
getFont
 o fontChanged
 protected void fontChanged()
fontChanged

 o getLocation
 public final Point getLocation()
Returns the current location of this component. The location will be in the parent's coordinate space.

Returns:
Point
See Also:
setLocation
 o getLocation
 public final Point getLocation(Point rv)
Returns the current location of this component. The location will be in the parent's coordinate space.

Parameters:
rv - if not null, this is used so a new Point does not have to be allocated.
Returns:
Point
See Also:
setLocation
 o setLocation
 public final void setLocation(int x,
                               int y)
Moves the Component to a new location. The x and y coordinates are in the parent's coordinate space.

Parameters:
x - - the x coordinate
y - - the y coordinate
See Also:
getLocation
 o setLocation
 public final void setLocation(Point p)
Moves the Component to a new location. The point p is given in the parent's coordinate space.

Parameters:
p - - the new location for the coordinate
See Also:
getLocation
 o getSize
 public final Dimension getSize()
Returns the current size of this component.

Returns:
Dimension
See Also:
setSize
 o getSize
 public final Dimension getSize(Dimension rv)
Returns the current size of this component.

Parameters:
rv - if not null, this is used so a new Dimension does not have to be allocated.
Returns:
Dimension
See Also:
setSize
 o setSize
 public final void setSize(int width,
                           int height)
Resizes the Component to the specified width and height.

Parameters:
width - - the width of the component
height - - the height of the component
See Also:
size
 o setSize
 public final void setSize(int width,
                           int height,
                           boolean invalidateParent)
setSize

Parameters:
width - - TBD
height - - TBD
invalidateParent - - TBD
 o setSize
 public final void setSize(Dimension d)
Resizes the Component to the specified dimension.

Parameters:
d - - the component dimension
See Also:
size
 o setSize
 public final void setSize(Dimension d,
                           boolean invalidateParent)
setSize

Parameters:
d - - TBD
invalidateParent - - TBD
 o getBounds
 public final Rectangle getBounds()
Returns the current bounds of this component.

Returns:
Rectangle
See Also:
setBounds
 o getBounds
 public final Rectangle getBounds(Rectangle rv)
Returns the current bounds of this component.

Parameters:
rv - if not null, this is used so a new Rectangle does not have to be allocated.
Returns:
Rectangle
See Also:
setBounds
 o setBounds
 public final void setBounds(int x,
                             int y,
                             int width,
                             int height)
Reshapes the Component to the specified bounding box.

Parameters:
x - - the x coordinate
y - - the y coordinate
width - - the width of the component
height - - the height of the component
See Also:
getBounds
 o setBounds
 public void setBounds(int x,
                       int y,
                       int width,
                       int height,
                       boolean invalidateParent)
setBounds reshapes the Component to the specified bounding box.

Parameters:
x - - the x coordinate
y - - the y coordinate
width - - the width of the component
height - - the height of the component
invalidateParent - - TBD
 o setBounds
 public final void setBounds(Rectangle r)
Reshapes the Component to the specified bounding box.

Parameters:
r - - the new bounding rectangle for the component
See Also:
getBounds
 o setBounds
 public final void setBounds(Rectangle r,
                             boolean invalidateParent)
setBounds reshapes the Component to the specified bounding box.

Parameters:
r - - the new bounding rectangle for the component
invalidateParent - - TBD
 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred size of this component.

Returns:
Dimension
See Also:
getMinimumSize
 o getPreferredSize
 public Dimension getPreferredSize(Dimension rv)
Returns the preferred size of this component.

Parameters:
rv - if not null, this is used so a new Dimension does not ALWAYS have to be allocated. GWT has not been fully retrofitted to take advantage of this new signature, so this MAY allocate a new dimension anyway.
Returns:
Dimension
See Also:
getMinimumSize
 o requiresVertScrollbar
 protected boolean requiresVertScrollbar()
requiresVertScrollbar

Returns:
boolean
 o requiresHorizScrollbar
 protected boolean requiresHorizScrollbar()
requiresHorizScrollbar

Returns:
boolean
 o getMinimumSize
 public Dimension getMinimumSize()
Returns the mininimum size of this component.

Returns:
Dimension
See Also:
getPreferredSize
 o getMinimumSize
 public Dimension getMinimumSize(Dimension rv)
Returns the mininimum size of this component.

Parameters:
rv - if not null, this is used so a new Dimension does not ALWAYS have to be allocated. GWT has not been fully retrofitted to take advantage of this new signature, so this will allocate a new dimension anyway. Later revisions of GWT may take advantage of this, but for now, it is just added for consistency with getPreferredSize, getSize, getLocation, and getBounds.
Returns:
Dimension
See Also:
getPreferredSize
 o doLayout
 public void doLayout()
Lays out the component. This is usually called when the component (more specifically, container) is validated.

See Also:
validate
 o isFrozen
 public boolean isFrozen()
isFrozen

Returns:
boolean
 o freeze
 public void freeze()
freeze

 o thaw
 public void thaw()
thaw

 o validate
 protected void validate()
Ensures that a component has a valid layout. This method is primarily intended to operate on Container instances.

See Also:
invalidate
 o invalidate
 public final void invalidate()
Invalidates the component. The component and all parents above it are marked as needing to be laid out. This method can be called often, so it needs to execute quickly.

See Also:
validate
 o invalidate
 public void invalidate(boolean invalidateParent)
invalidate

Parameters:
invalidateParent - - TBD
 o getOffset
 public Point getOffset()
Gets the x and y offsets to add to the drawing coordinates for this component.

Returns:
Point
See Also:
paint
 o getFocusOffset
 public Point getFocusOffset()
Returns the offset used to calculate the next focus gadget, usually the value of getOffset(), but might be an ancestors offset in some cases (like combo box).

Returns:
Point
See Also:
getOffset
 o getGadgetGraphics
 public final GadgetGraphics getGadgetGraphics()
Gets a GadgetGraphics context for this component. This method will return null if the component is currently not on the screen.

Returns:
GadgetGraphics
See Also:
paint
 o getGadgetGraphics
 public final GadgetGraphics getGadgetGraphics(int x,
                                               int y,
                                               int width,
                                               int height)
Gets a GadgetGraphics context for this component. This method will return null if the component is currently not on the screen.

Parameters:
paintingAll - if true, we may be painting the entire tree with this one GadgetGraphics object. The default is false
Returns:
GadgetGraphics
See Also:
paint
 o getGadgetGraphics
 public final GadgetGraphics getGadgetGraphics(int x,
                                               int y,
                                               int width,
                                               int height,
                                               boolean paintingAll)
Gets a GadgetGraphics context for this component. This method will return null if the component is currently not on the screen.

Parameters:
paintingAll - if true, we may be painting the entire tree with this one GadgetGraphics object. The default is false
Returns:
GadgetGraphics
See Also:
paint
 o getTranslatedGraphics
 protected GadgetGraphics getTranslatedGraphics(Rectangle clip)
Returns the graphics to use.

Returns:
GadgetGraphics
 o getTempGraphics
 public final GadgetGraphics getTempGraphics()
Gets a GadgetGraphics context for this component for doing XOR draws or for drawing very temporary objects (maybe menus, tips, etc.). May return null.

Returns:
GadgetGraphics
See Also:
paint
 o getFontMetrics
 public final FontMetrics getFontMetrics(Font font)
Gets the font metrics for this component.

Parameters:
font - - the font
Returns:
FontMetrics
See Also:
getFont
 o setCursor
 public final void setCursor(GadgetCursor cursor)
Set the cursor.

Parameters:
cursor - - a Cursor object.
See Also:
Cursor
 o getCursor
 public final GadgetCursor getCursor()
Gets the cursor set on this component.

Returns:
Cursor
 o paint
 public void paint(GadgetGraphics g)
Paints the component.

Parameters:
g - - the specified GadgetGraphics window
 o clear
 public void clear(GadgetGraphics g)
clear.

Parameters:
g - - the specified GadgetGraphics window
 o update
 public void update(GadgetGraphics g)
update

Parameters:
g - - TBD
 o repaint
 public final void repaint()
Repaints the component. This will result in a call to paint as soon as possible.

See Also:
paint
 o forceRepaint
 public void forceRepaint()
Repaints the component. This will result in a call to paint within tm milliseconds.

Parameters:
tm - - maximum time in milliseconds before paint
See Also:
paint
 o repaint
 public final void repaint(int x,
                           int y,
                           int width,
                           int height)
Repaints part of the component. This will result in a call to paint as soon as possible. Notifies the GadgetShell of a damaged area to repair.

Parameters:
x - - the x coordinate
y - - the y coordinate
width - - the width
height - - the height
See Also:
repaint
 o repaint
 public void repaint(int x,
                     int y,
                     int width,
                     int height,
                     boolean setPaintFlag,
                     boolean forced)
Repaints part of the component. This will result in a call to paint as soon as possible. Notifies the GadgetShell of a damaged area to repair.

Parameters:
x - - the x coordinate
y - - the y coordinate
width - - the width
height - - the height
setPaintFlag - - TBD
forced - - TBD
See Also:
repaint
 o imageUpdate
 public boolean imageUpdate(Image img,
                            int flags,
                            int x,
                            int y,
                            int w,
                            int h)
imageUpdate

Parameters:
img - - TBD
flags - - TBD
x - - TBD
y - - TBD
w - - TBD
h - - TBD
Returns:
boolean
 o createImage
 public final Image createImage(ImageProducer producer)
Creates an image from the specified image producer.

Parameters:
producer - - the image producer
Returns:
Image
 o createImage
 public final 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
Returns:
Image
 o prepareImage
 public final boolean prepareImage(Image image,
                                   ImageObserver observer)
Prepares an image for rendering on this Component. The image data is downloaded asynchronously in another thread and the appropriate screen representation of the image is generated.

Parameters:
image - the Image to prepare a screen representation for
observer - the ImageObserver object to be notified as the image is being prepared
Returns:
true if the image has already been fully prepared
See Also:
ImageObserver
 o prepareImage
 public final boolean prepareImage(Image image,
                                   int width,
                                   int height,
                                   ImageObserver observer)
Prepares an image for rendering on this Component at the specified width and height. The image data is downloaded asynchronously in another thread and an appropriately scaled screen representation of the image is generated.

Parameters:
image - the Image to prepare a screen representation for
width - the width of the desired screen representation
height - the height of the desired screen representation
observer - the ImageObserver object to be notified as the image is being prepared
Returns:
true if the image has already been fully prepared
See Also:
ImageObserver
 o checkImage
 public final int checkImage(Image image,
                             ImageObserver observer)
Returns the status of the construction of a screen representation of the specified image. This method does not cause the image to begin loading. Use the prepareImage method to force the loading of an image.

Parameters:
image - the Image to check the status of
observer - the ImageObserver object to be notified as the image is being prepared
Returns:
the boolean OR of the ImageObserver flags for the data that is currently available
See Also:
ImageObserver, prepareImage
 o checkImage
 public final int checkImage(Image image,
                             int width,
                             int height,
                             ImageObserver observer)
Returns the status of the construction of a scaled screen representation of the specified image. This method does not cause the image to begin loading, use the prepareImage method to force the loading of an image.

Parameters:
image - the Image to check the status of
width - the width of the scaled version to check the status of
height - the height of the scaled version to check the status of
observer - the ImageObserver object to be notified as the image is being prepared
Returns:
the boolean OR of the ImageObserver flags for the data that is currently available
See Also:
ImageObserver, prepareImage
 o getImage
 public final Image getImage(URL url)
getImage

Parameters:
url - - TBD
Returns:
Image
 o getImage
 public final Image getImage(String filename)
getImage

Parameters:
filename - - TBD
Returns:
Image
 o contains
 public final boolean contains(int x,
                               int y)
Checks whether this component "contains" the specified (x, y) location, where x and y are defined to be relative to the coordinate system of this component.

Parameters:
x - the x coordinate
y - the y coordinate
exclude - the gadget to ignore (if not null)
Returns:
boolean
See Also:
getGadgetAt
 o contains
 public boolean contains(int x,
                         int y,
                         Gadget exclude)
Checks whether this component "contains" the specified (x, y) location, where x and y are defined to be relative to the coordinate system of this component.

Parameters:
x - the x coordinate
y - y - the y coordinate
Returns:
boolean
See Also:
getGadgetAt
 o contains
 public final boolean contains(Point p)
Checks whether this component "contains" the specified point, where x and y in the point are defined to be relative to the coordinate system of this component.

Parameters:
p - the point
Returns:
true if Point is contained in this component, else false.
See Also:
getGadgetAt
 o getGadgetAt
 public Gadget getGadgetAt(int x,
                           int y)
Returns the component or subcomponent that contains the x,y location.

Parameters:
x - the x coordinate
y - the y coordinate
Returns:
this Gadget if it contains the point, else null
See Also:
contains
 o getGadgetAt
 public final Gadget getGadgetAt(Point p)
Returns the component or subcomponent that contains the specified point.

Parameters:
p - the point
Returns:
the Gadget that contains the point
See Also:
contains
 o addComponentListener
 public synchronized void addComponentListener(ComponentListener l)
Adds the specified component listener to receive component events from this component.

Parameters:
l - the component listener
 o removeComponentListener
 public synchronized void removeComponentListener(ComponentListener l)
Removes the specified listener so it no longer receives component events from this component.

Parameters:
l - the component listener
 o addFocusListener
 public synchronized void addFocusListener(FocusListener l)
Adds the specified focus listener to receive focus events from this component.

Parameters:
l - the focus listener
 o removeFocusListener
 public synchronized void removeFocusListener(FocusListener l)
Removes the specified focus listener so it no longer receives focus events from this component.

Parameters:
l - the focus listener
 o addKeyListener
 public synchronized void addKeyListener(KeyListener l)
Adds the specified key listener to receive key events from this component.

Parameters:
l - the key listener
 o removeKeyListener
 public synchronized void removeKeyListener(KeyListener l)
Removes the specified key listener so it no longer receives key events from this component.

Parameters:
l - the key listener
 o addMouseListener
 public synchronized void addMouseListener(MouseListener l)
Adds the specified mouse listener to receive mouse events from this component.

Parameters:
l - the mouse listener
 o removeMouseListener
 public synchronized void removeMouseListener(MouseListener l)
Removes the specified mouse listener so it no longer receives mouse events from this component.

Parameters:
l - the mouse listener
 o addMouseMotionListener
 public synchronized void addMouseMotionListener(MouseMotionListener l)
Adds the specified mouse motion listener to receive mouse motion events from this component.

Parameters:
l - the mouse motion listener
 o removeMouseMotionListener
 public synchronized void removeMouseMotionListener(MouseMotionListener l)
Removes the specified mouse motion listener so it no longer receives mouse motion events from this component.

Parameters:
l - the mouse motion listener
 o processEvent
 protected void processEvent(AWTEvent e)
Processes events occurring on this component. By default this method will call the appropriate processXXXEvent method for the class of event. Classes overriding this method should call super.processEvent() to ensure default event processing continues normally.

Parameters:
e - the event
See Also:
processComponentEvent, processFocusEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent
 o processComponentEvent
 protected void processComponentEvent(ComponentEvent e)
Processes component events occurring on this component by dispatching them to any registered ComponentListener objects. NOTE: This method will not be called unless component events are enabled for this component; this happens when one of the following occurs: a) A ComponentListener object is registered via addComponentListner() b) Component events are enabled via enableEvents() Classes overriding this method should call super.processComponentEvent() to ensure default event processing continues normally.

Parameters:
e - the component event
 o processFocusEvent
 protected void processFocusEvent(FocusEvent e)
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects. NOTE: This method will not be called unless focus events are enabled for this component; this happens when one of the following occurs: a) A FocusListener object is registered via addFocusListener() b) Focus events are enabled via enableEvents() Classes overriding this method should call super.processFocusEvent() to ensure default event processing continues normally.

Parameters:
e - the focus event
 o processKeyEvent
 protected void processKeyEvent(KeyEvent e)
Processes key events occurring on this component by dispatching them to any registered KeyListener objects. NOTE: This method will not be called unless key events are enabled for this component; this happens when one of the following occurs: a) A KeyListener object is registered via addKeyListener() b) Key events are enabled via enableEvents() Classes overriding this method should call super.processKeyEvent() to ensure default event processing continues normally.

Parameters:
e - the key event
 o processMouseEvent
 protected void processMouseEvent(MouseEvent e)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects. NOTE: This method will not be called unless mouse events are enabled for this component; this happens when one of the following occurs: a) A MouseListener object is registered via addMouseListener() b) Mouse events are enabled via enableEvents() Classes overriding this method should call super.processMouseEvent() to ensure default event processing continues normally.

Parameters:
e - the mouse event
 o processMouseMotionEvent
 protected void processMouseMotionEvent(MouseEvent e)
Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects. NOTE: This method will not be called unless mouse motion events are enabled for this component; this happens when one of the following occurs: a) A MouseMotionListener object is registered via addMouseMotionListener() b) Mouse Motion events are enabled via enableEvents() Classes overriding this method should call super.processMouseMotionEvent() to ensure default event processing continues normally.

Parameters:
e - the mouse motion event
 o requestFocus
 public void requestFocus()
Requests the input focus. The gotFocus() Method will be called if this method is successful. The component must be visible on the screen for this request to be granted.

 o transferFocus
 public final void transferFocus()
Transfers the focus to the next component.

 o nextFocus
 public final void nextFocus()
nextFocus

 o prevFocus
 public final void prevFocus()
prevFocus

 o nextGroupFocus
 public final boolean nextGroupFocus()
nexGroupFocus

Returns:
boolean result
 o prevGroupFocus
 public final boolean prevGroupFocus()
prevGroupFocus

Returns:
boolean result
 o hasFocus
 public boolean hasFocus()
hasFocus

Returns:
boolean result
 o hasMouse
 public final boolean hasMouse()
hasMouse

Returns:
boolean
 o isDescendentOf
 public final boolean isDescendentOf(ContainerGadget container)
isDescendentOf

Parameters:
container - - TBD
Returns:
boolean
 o isFocusTraversable
 public boolean isFocusTraversable()
Returns whether this component can be traversed using Tab or Shift-Tab keyboard focus traversal.

Returns:
boolean
 o notifyStateChange
 public void notifyStateChange()
notifyStateChange


All Packages  Class Hierarchy  This Package  Previous  Next  Index