public interface ComplicationDataSource
Modifier and Type | Method and Description |
---|---|
float |
getProgress()
Returns the progress.
|
String |
getText()
Returns the text.
|
boolean |
hasIcon()
Returns whether this source provides an icon.
|
boolean |
hasProgress()
Returns whether this source provides a progress.
|
boolean |
hasText()
Returns whether this source provides a text.
|
void |
renderIcon(GraphicsContext g,
int x,
int y,
int width,
int height)
Renders the icon.
|
float getProgress()
0.0f
and 1.0f
).IllegalStateException
- if this source does not provide a progress.String getText()
IllegalStateException
- if this source does not provide a text.boolean hasIcon()
boolean hasProgress()
boolean hasText()
void renderIcon(GraphicsContext g, int x, int y, int width, int height)
g
- the graphics context to draw with.x
- the x coordinate of the region to draw in.y
- the y coordinate of the region to draw in.width
- the width of the region to draw in.height
- the height of the region to draw in.IllegalStateException
- if this source does not provide an icon.