public class ScreenPresence extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
ScreenPresence.AtPoint |
static class |
ScreenPresence.OfSize |
| Modifier and Type | Method and Description |
|---|---|
static ScreenPresence.AtPoint |
atLocation(int x,
int y) |
static ScreenPresence |
defaultSize()
Provide a screen presence the default size for the current screen.
|
static ScreenPresence |
defaultSize(Dimension screenSize)
Create a screen presence the default size within the give dimensions.
|
boolean |
equals(Object o) |
Point |
getLocation()
Get the location of this screen presence.
|
Dimension |
getSize()
Get the size of this screen presence.
|
int |
hashCode() |
boolean |
isOnAnyScreen()
Is this screen presence currently on any screen currently attached.
|
Point |
locationToCenter(Dimension size)
Return the location relative to this screen area that would
centre something of the given size within this screen area.
|
static ScreenPresence |
of(Component component)
Create a screen presence the size of the given component.
|
static ScreenPresence.OfSize |
ofSize(int width,
int height) |
void |
resize(Component component)
Fit a component to the location and size of this
screen presence.
|
ScreenPresence |
resize(double factor)
Create ScreenPresence a factor the size of this.
|
String |
toString() |
public static ScreenPresence.AtPoint atLocation(int x, int y)
public static ScreenPresence.OfSize ofSize(int width, int height)
public void resize(Component component)
component - The componennt.public Point getLocation()
public Dimension getSize()
public Point locationToCenter(Dimension size)
size - The size of the thing to position.public ScreenPresence resize(double factor)
factor - The factor to size the new ScreenPresence by.public boolean isOnAnyScreen()
public static ScreenPresence of(Component component)
component - The component to create a screen presence from.public static ScreenPresence defaultSize(Dimension screenSize)
screenSize - The dimensions in which to fit the default screen presence.public static ScreenPresence defaultSize()
Copyright © 2023. All rights reserved.