|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.SComponent
org.wings.SPopup
public class SPopup
Popups are used to display a SComponent to the user, typically
on top of all the other SComponents in a particular containment
hierarchy.
The general contract is that if you need to change the size of the
SComponent, or location of the SPopup, you should
obtain a new Popup.
SPopup does not descend from SComponent, rather
implementations of SPopup are responsible for creating
and maintaining their own SComponents to render the
requested SComponent to the user.
| Field Summary | |
|---|---|
static String |
BOTTOM_LEFT
|
static String |
BOTTOM_RIGHT
|
static String |
TOP_LEFT
|
static String |
TOP_RIGHT
|
| Fields inherited from class org.wings.SComponent |
|---|
DONE_RENDERING, dynamicStyles, enabled, propertyChangeSupport, SELECTOR_ALL, START_RENDERING, visible, WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_FRAME |
| Constructor Summary | |
|---|---|
SPopup(SComponent owner,
SComponent contents,
int x,
int y)
Creates a SPopup. |
|
| Method Summary | |
|---|---|
protected void |
finalize()
|
SComponent |
getComponent()
Returns the Component returned from
createComponent that will hold the Popup. |
String |
getContentsCorner()
|
SComponent |
getContext()
|
String |
getContextCorner()
|
int |
getHeight()
|
SComponent |
getOwner()
|
int |
getWidth()
|
int |
getX()
|
int |
getY()
|
boolean |
isAnchored()
|
void |
setContext(SComponent context,
String contentsCorner,
String contextCorner)
Anchors the popup to the the given component context. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String TOP_RIGHT
public static final String TOP_LEFT
public static final String BOTTOM_RIGHT
public static final String BOTTOM_LEFT
| Constructor Detail |
|---|
public SPopup(SComponent owner,
SComponent contents,
int x,
int y)
SPopup.
x and y specify the preferred initial location
to place the SPopup at. Based on screen size, or other
paramaters, the SPopup may not display at x and
y.
N.B.: check that the contents SComponent has a valid preferred size!
(getPreferredSize())
owner - owner of component SPopup, if null the root frame will
be usedcontents - Contents of the Popupx - Initial x screen coordinatey - Initial y screen coordinate
IllegalArgumentException - if contents is null| Method Detail |
|---|
public void setContext(SComponent context,
String contentsCorner,
String contextCorner)
context.
context - component to be anchored tocontentsCorner - anchor point: e.g. SAnchoredPopup.TOP_LEFTcontextCorner - anchor point: e.g. SAnchoredPopup.BOTTOM_LEFT
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic SComponent getComponent()
Component returned from
createComponent that will hold the Popup.
public String getContentsCorner()
public String getContextCorner()
public int getHeight()
public int getWidth()
public int getX()
public int getY()
public SComponent getOwner()
public boolean isAnchored()
public SComponent getContext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||