public class GSimpleDevice extends Object
Modifier and Type | Field and Description |
---|---|
static GSimpleDevice |
BROWSER
The browser device has size 0.
|
static GSimpleDevice |
IPAD_LANDSCAPE
The iPad device in landscape mode.
|
static GSimpleDevice |
IPAD_PORTRAIT
The iPad device in portrait mode.
|
static GSimpleDevice |
IPHONE5_LANDSCAPE
The iPhone 5 device (or iPhone SE) in landscape mode.
|
static GSimpleDevice |
IPHONE5_PORTRAIT
The iPhone 5 device (or iPhone SE) in portrait mode.
|
static GSimpleDevice |
PANEL_PART
The panel part has the size of the panel part container.
|
Constructor and Description |
---|
GSimpleDevice(String string)
Creates from a string representation "width={integer},height={integer},canChangeOrientation={boolean},name".
|
GSimpleDevice(String name,
int pixelX,
int pixelY)
Constructs the device.
|
GSimpleDevice(String name,
int pixelX,
int pixelY,
boolean canChangeOrientation)
Constructs the device.
|
GSimpleDevice(Transaction trans)
Constructs the device from a transaction.
|
Modifier and Type | Method and Description |
---|---|
void |
append(Transaction trans)
Appends the device to a transaction.
|
boolean |
canChangeOrientation()
Checks if orientation can be changed.
|
GSimpleDevice |
changeOrientation()
Creates a new simple device with changed orientation type (portrait/landscape).
|
String |
dataToString()
The data string representation.
|
boolean |
equals(Object o)
Compares two devices.
|
boolean |
equalsNoOrientation(GSimpleDevice d)
Compares two devices without caring about orientation.
|
int |
getHeight()
Gets the height.
|
String |
getName()
Gets the name of the device.
|
int |
getWidth()
Gets the width.
|
int |
hashCode()
The hash code.
|
boolean |
isBrowser()
Checks if the device is the browser device.
|
boolean |
isLandscape()
Gets the orientation.
|
boolean |
isPanelPart()
Checks if the device is for a panel part.
|
boolean |
isPortrait()
Gets the orientation.
|
String |
toString()
Returns a string representation of this class instance and its values.
|
public static final GSimpleDevice BROWSER
public static final GSimpleDevice PANEL_PART
public static final GSimpleDevice IPHONE5_LANDSCAPE
public static final GSimpleDevice IPHONE5_PORTRAIT
public static final GSimpleDevice IPAD_LANDSCAPE
public static final GSimpleDevice IPAD_PORTRAIT
public GSimpleDevice(String name, int pixelX, int pixelY)
name
- The device name.pixelX
- The pixel size in X.pixelY
- The pixel size in Y.NullPointerException
- If the name is null.IllegalArgumentException
- For illegal definitions.public GSimpleDevice(String name, int pixelX, int pixelY, boolean canChangeOrientation)
name
- The device name.pixelX
- The pixel size in X.pixelY
- The pixel size in Y.NullPointerException
- If the name is null.IllegalArgumentException
- For illegal definitions.public GSimpleDevice(String string)
string
- The string.IllegalArgumentException
- For illegal definitions.NumberFormatException
- For value errors.NoSuchElementException
- For format errors.public GSimpleDevice(Transaction trans)
public boolean isBrowser()
public boolean isPanelPart()
public void append(Transaction trans)
public String getName()
public boolean isPortrait()
public boolean isLandscape()
public int getWidth()
public int getHeight()
public boolean equals(Object o)
public boolean equalsNoOrientation(GSimpleDevice d)
d
- The device to compare with.public String dataToString()
public String toString()
public boolean canChangeOrientation()
public GSimpleDevice changeOrientation()
iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.