Component
to the user, typically
on top of all the other Component
s in a particular containment
hierarchy. Popup
s have a very small life cycle. Once you
have obtained a Popup
, and hidden it (invoked the
hide
method), you should no longer
invoke any methods on it. This allows the PopupFactory
to cache
Popup
s for later use.
The general contract is that if you need to change the size of the
Component
, or location of the Popup
, you should
obtain a new Popup
.
Popup
does not descend from Component
, rather
implementations of Popup
are responsible for creating
and maintaining their own Component
s to render the
requested Component
to the user.
You typically do not explicitly create an instance of Popup
,
instead obtain one from a PopupFactory
.
PopupFactory
Modifier and Type | Class and Description |
---|---|
pack-priv static class | Popup.
Used if no valid Window ancestor of the supplied owner is found. |
pack-priv static class | Popup.
Component used to house window. |
Modifier and Type | Field and Description |
---|---|
private Component | component
The Component representing the Popup. |
Access | Constructor and Description |
---|---|
protected | |
protected |
Modifier and Type | Method and Description |
---|---|
pack-priv Component | |
pack-priv void | |
pack-priv Component | |
private Window | getParentWindow(Component owner)
Returns the |
public void | |
pack-priv void | |
pack-priv void | |
public void |
component | back to summary |
---|---|
private Component component The Component representing the Popup. |
Popup | back to summary |
---|---|
protected Popup(Component owner, Component contents, int x, int y) Creates a
|
Popup | back to summary |
---|---|
protected Popup() Creates a |
createComponent | back to summary |
---|---|
pack-priv Component createComponent(Component owner) Creates the Component to use as the parent of the |
dispose | back to summary |
---|---|
pack-priv void dispose() Frees any resources the |
getComponent | back to summary |
---|---|
pack-priv Component getComponent() Returns the |
getParentWindow | back to summary |
---|---|
private Window getParentWindow(Component owner) Returns the |
hide | back to summary |
---|---|
public void hide() Hides and disposes of the
|
pack | back to summary |
---|---|
pack-priv void pack() Causes the |
reset | back to summary |
---|---|
pack-priv void reset(Component owner, Component contents, int ownerX, int ownerY) Resets the |
show | back to summary |
---|---|
public void show() Makes the
|
PopupFactory uses this as a way to know when the Popup shouldn't be cached based on the Window.
Access | Constructor and Description |
---|---|
pack-priv |
DefaultFrame | back to summary |
---|---|
pack-priv DefaultFrame() |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public void | |
public void | update(Graphics
the g)Graphics context in which to paintOverrides javax. paint(g) .
|
HeavyWeightWindow | back to summary |
---|---|
pack-priv HeavyWeightWindow(Window parent) |
show | back to summary |
---|---|
public void show() Overrides java. Doc from java. Makes the Window visible. If the Window and/or its owner are not yet displayable, both are made displayable. The Window will be validated prior to being made visible. If the Window is already visible, this will bring the Window to the front.
|
update | back to summary |
---|---|
public void update(Graphics g) Overrides javax. Doc from javax. Calls
|