public class ScreenPresence extends Object implements Serializable
Constructor and Description |
---|
ScreenPresence(Component component) |
ScreenPresence(Point position,
Dimension size) |
Modifier and Type | Method and Description |
---|---|
void |
fit(Component component)
Fit a component to the location and size of this
screen presence.
|
Point |
getLocation() |
Dimension |
getSize() |
Point |
locationToCenter(Dimension size)
Return the location relative to this screen area that would
centre something of the given size within this screen area..
|
ScreenPresence |
smaller(double factor)
Create ScreenPresence a factor the size of this.
|
String |
toString() |
static ScreenPresence |
wholeScreen() |
public ScreenPresence(Component component)
public void fit(Component component)
component
- public Point getLocation()
public Dimension getSize()
public Point locationToCenter(Dimension size)
size
- public ScreenPresence smaller(double factor)
factor
- The factor to size the new ScreenPresence by.public static ScreenPresence wholeScreen()