Package com.microej.wear.components

## Interface Watchface

-     public interface Watchface

  Represents a watchface.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Renderable` | `createRenderable()` | Creates a renderable that renders this watchface.
    `void` | `onPreviewAttached()` | Called when the preview is scheduled for imminent rendering.
    `void` | `onPreviewDetached()` | Called when the preview is no longer scheduled for imminent rendering.
    `void` | `renderPreview​(GraphicsContext g, int x, int y, int size)` | Renders a preview of this watchface.

- - ### Method Detail

    - #### onPreviewAttached

          void onPreviewAttached()

      Called when the preview is scheduled for imminent rendering.

      For example, this method can load the resources necessary for rendering.

    - #### onPreviewDetached

          void onPreviewDetached()

      Called when the preview is no longer scheduled for imminent rendering.

      For example, this method can dispose of the resources loaded in `onPreviewAttached()`.

    - #### renderPreview

          void renderPreview​(GraphicsContext g,
                             int x,
                             int y,
                             int size)

      Renders a preview of this watchface.
      Parameters:
        `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.
        `size` - the width and height of the region to draw in.

    - #### createRenderable

          Renderable createRenderable()

      Creates a renderable that renders this watchface.

      This method is called when the watchface is scheduled for imminent rendering. The renderable is then attached immediately by calling (see `Renderable.onAttached()`).

      Returns:
        the renderable.