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