All Packages Class Hierarchy This Package Previous Next Index
Class dtai.gwt.GadgetFrame
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Frame
|
+----dtai.gwt.GadgetFrame
- public class GadgetFrame
- extends Frame
- implements GadgetManager
A Frame is a top-level window with a title.
The default layout for a frame is BorderLayout.
Frames are capable of generating the following types of window events:
WindowOpened, WindowClosing, WindowClosed, WindowIconified,
WindowDeiconified, WindowActivated, WindowDeactivated.
-
GadgetFrame()
- Constructs a new Frame that is initially invisible.
-
GadgetFrame(String)
- Constructs a new, initially invisible Frame with the specified
title.
-
add(Component)
- Overridden to make it an error to add components to it.
-
add(Component, int)
- Overridden to make it an error to add components to it.
-
add(Gadget)
- Adds the specified gadget to this container.
-
add(Gadget, int)
- Adds the specified gadget to this container at the given position.
-
add(String, Component)
- Overridden to make it an error to add components to it.
-
add(String, Gadget)
- Adds the specified gadget to this container.
-
addWindowListener(WindowListener)
- Adds the specified listener to be notified when component
events occur on this component.
-
getGadget(int)
- Gets the nth gadget in this container.
-
getGadgetAt(int, int)
- Locates the gadget that contains the x,y position.
-
getGadgetAt(Point)
- Locates the gadget that contains the specified point.
-
getGadgetCount()
- Returns the number of gadgets in this panel.
-
getGadgets()
- Gets all the gadgets in this container.
-
getMainPanel()
- Returns the panel in which all other gadgets (non-overlays) are to be drawn.
-
getOverlayPanel()
- Returns the panel in which overlays (menus, tips) are to be drawn.
-
handleEvent(Event)
- handleEvent
-
hide()
- hide
-
pack()
- pack
-
processEvent(AWTEvent)
- processEvent
-
processWindowEvent(WindowEvent)
-
-
remove(Gadget)
- Removes the specified gadget from this container.
-
removeWindowListener(WindowListener)
- Removes the specified listener so it no longer receives
window events on this window.
-
setGadgetHelp(GadgetHelp)
- Sets the gadget help for this container.
-
setLayout(GadgetLayoutManager)
- Sets the layout manager for this container.
-
setLayout(LayoutManager)
- Overridden to make it an error to add a Component layout manager to it.
-
show()
- show
GadgetFrame
public GadgetFrame()
- Constructs a new Frame that is initially invisible.
- See Also:
- setSize, setVisible
GadgetFrame
public GadgetFrame(String title)
- Constructs a new, initially invisible Frame with the specified
title.
- Parameters:
- title - the title for the frame
- See Also:
- setSize, setVisible
add
public Component add(Component comp)
- Overridden to make it an error to add components to it.
- Parameters:
- comp - - the component to be added
- Returns:
- Component
- Overrides:
- add in class Container
add
public synchronized Component add(Component comp,
int pos)
- Overridden to make it an error to add components to it.
- Parameters:
- comp - the component to be added
- pos - the position at which to insert the component. -1
means insert at the end.
- Returns:
- Component
- Overrides:
- add in class Container
- See Also:
- remove
add
public synchronized Component add(String name,
Component comp)
- Overridden to make it an error to add components to it.
- Parameters:
- name - the component name
- comp - the component to be added
- Returns:
- Component
- Overrides:
- add in class Container
- See Also:
- remove, LayoutManager
setLayout
public void setLayout(LayoutManager mgr)
- Overridden to make it an error to add a Component layout manager to it.
- Parameters:
- mgr - the specified layout manager
- Overrides:
- setLayout in class Container
- See Also:
- layout, getLayout
getOverlayPanel
public OverlayPanelGadget getOverlayPanel()
- Returns the panel in which overlays (menus, tips) are to be drawn.
- Returns:
- OverlayPanelGadget
- See Also:
- getGadget
getMainPanel
public PanelGadget getMainPanel()
- Returns the panel in which all other gadgets (non-overlays) are to be drawn.
- Returns:
- PanelGadget
- See Also:
- getGadget
getGadgetCount
public int getGadgetCount()
- Returns the number of gadgets in this panel.
- Returns:
- int
- See Also:
- getGadget
getGadget
public synchronized Gadget getGadget(int n)
- Gets the nth gadget in this container.
- Parameters:
- n - the number of the gadget to get
- Returns:
- Gadget
- Throws: ArrayIndexOutOfBoundsException
- If the nth value does not
exist.
getGadgets
public synchronized Gadget[] getGadgets()
- Gets all the gadgets in this container.
- Returns:
- Gadget
add
public Gadget add(Gadget gadget)
- Adds the specified gadget to this container.
- Parameters:
- comp - the gadget to be added
- Returns:
- Gadget
add
public synchronized Gadget add(Gadget gadget,
int pos)
- Adds the specified gadget to this container at the given position.
- Parameters:
- comp - the gadget to be added
- pos - the position at which to insert the gadget. -1
means insert at the end.
- Returns:
- Gadget
- See Also:
- remove
add
public synchronized Gadget add(String name,
Gadget gadget)
- Adds the specified gadget to this container. The gadget
is also added to the layout manager of this container using the
name specified
.
- Parameters:
- name - the gadget name
- gadget - the gadget to be added
- Returns:
- Gadget
- See Also:
- remove, GadgetLayoutManager
remove
public synchronized void remove(Gadget gadget)
- Removes the specified gadget from this container.
- Parameters:
- gadget - the gadget to be removed
- See Also:
- add
setGadgetHelp
public void setGadgetHelp(GadgetHelp gadgetHelp)
- Sets the gadget help for this container.
- Parameters:
- gadgetHelp - the gadget help
setLayout
public void setLayout(GadgetLayoutManager mgr)
- Sets the layout manager for this container.
- Parameters:
- mgr - the specified layout manager
- See Also:
- layout, getLayout
getGadgetAt
public synchronized Gadget getGadgetAt(int x,
int y)
- Locates the gadget that contains the x,y position.
- Parameters:
- x - the x coordinate
- y - the y coordinate
- Returns:
- null if the gadget is not within the x and y
coordinates; returns the gadget otherwise.
- See Also:
- inside
getGadgetAt
public Gadget getGadgetAt(Point p)
- Locates the gadget that contains the specified point.
Overrides:
getGadgetAt in class Gadget
- Parameters:
- p - - the point
- Returns:
- null if the gadget does not contain the point; returns the gadget otherwise.
- See Also:
- contains
hide
public void hide()
- hide
- Overrides:
- hide in class Component
show
public void show()
- show
- Overrides:
- show in class Window
addWindowListener
public synchronized void addWindowListener(WindowListener l)
- Adds the specified listener to be notified when component
events occur on this component.
- Parameters:
- l - the listener to receive the events
removeWindowListener
public synchronized void removeWindowListener(WindowListener l)
- Removes the specified listener so it no longer receives
window events on this window.
- Parameters:
- l - the listener to remove
handleEvent
public boolean handleEvent(Event evt)
- handleEvent
- Parameters:
- evt - the Event to handle
- Returns:
- boolean result of event handling
- Overrides:
- handleEvent in class Component
processEvent
protected void processEvent(AWTEvent e)
- processEvent
- Parameters:
- e - a WindowEvent- we handle WINDOW_CLOSING
WINDOW_CLOSED
WINDOW_OPENED
WINDOW_ICONIFIED
WINDOW_DEICONIFIED
- Returns:
- boolean result
processWindowEvent
protected void processWindowEvent(WindowEvent e)
pack
public void pack()
- pack
- Overrides:
- pack in class Window
All Packages Class Hierarchy This Package Previous Next Index