public class ScreenPresence
extends java.lang.Object
implements java.io.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(java.awt.Dimension screenSize)
Create a screen presence the default size within the give dimensions.
|
boolean |
equals(java.lang.Object o) |
java.awt.Point |
getLocation()
Get the location of this screen presence.
|
java.awt.Dimension |
getSize()
Get the size of this screen presence.
|
int |
hashCode() |
boolean |
isOnAnyScreen()
Is this screen presence currently on any screen currently attached.
|
java.awt.Point |
locationToCenter(java.awt.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(java.awt.Component component)
Create a screen presence the size of the given component.
|
static ScreenPresence.OfSize |
ofSize(int width,
int height) |
void |
resize(java.awt.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.
|
java.lang.String |
toString() |
public static ScreenPresence.AtPoint atLocation(int x, int y)
public static ScreenPresence.OfSize ofSize(int width, int height)
public void resize(java.awt.Component component)
component
- The componennt.public java.awt.Point getLocation()
public java.awt.Dimension getSize()
public java.awt.Point locationToCenter(java.awt.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(java.awt.Component component)
component
- The component to create a screen presence from.public static ScreenPresence defaultSize(java.awt.Dimension screenSize)
screenSize
- The dimensions in which to fit the default screen presence.public static ScreenPresence defaultSize()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object