- java.lang.Object
-
- io.github.mmm.ui.spi.AbstractUiScreen
-
- All Implemented Interfaces:
AttributeReadSize,UiScreen
- Direct Known Subclasses:
FxScreen,TestScreen,TvmScreen
public abstract class AbstractUiScreen extends Object implements UiScreen
Abstract base implementation ofUiScreen.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description AbstractUiScreen()The constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddoUpdate()doublegetDpi()doublegetHeightInPixel()doublegetSize()UiScreenTypegetType()doublegetWidthInPixel()StringtoString()voidupdate()Forces the display to update.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeReadSize
getHeight, getWidth
-
-
-
-
Field Detail
-
width
protected double width
- See Also:
getWidthInPixel()
-
height
protected double height
- See Also:
getHeightInPixel()
-
dpi
protected double dpi
- See Also:
getDpi()
-
size
protected double size
- See Also:
getSize()
-
type
protected UiScreenType type
- See Also:
getType()
-
-
Method Detail
-
getWidthInPixel
public double getWidthInPixel()
- Specified by:
getWidthInPixelin interfaceAttributeReadSize- Returns:
- the width of this object in pixels.
NOTE: The result will typically be anintvalue. However, to be compatible withUiSize.getAmount()and with some underlying native toolkits we usedouble. You may cast the result toint.
-
getHeightInPixel
public double getHeightInPixel()
- Specified by:
getHeightInPixelin interfaceAttributeReadSize- Returns:
- the height of this object in pixels.
NOTE: The result will typically be anintvalue. However, to be compatible withUiSize.getAmount()and with some underlying native toolkits we usedouble. You may cast the result toint.
-
getDpi
public double getDpi()
-
getSize
public double getSize()
-
getType
public UiScreenType getType()
- Specified by:
getTypein interfaceUiScreen- Returns:
- the
UiScreenTypethat categorizes the display size.
-
update
public void update()
Description copied from interface:UiScreenForces the display to update. Typically the screen-resolution does not change while your application is running. Therefore values ofUiScreenmay be pre-calculated and cached. However, you can call this method before reading resolution or screen type to force that you are getting most recent values.
-
doUpdate
protected abstract void doUpdate()
-
-