Annotation Type DesktopBuild


@Retention(CLASS) @Target(TYPE) public @interface DesktopBuild

Desktop build hints, checked by the compiler.

Place this on your application's main class -- the class named by codename1.mainName. An attribute you do not set is not written at all, so the build server's own default applies. The default clause below each attribute names a constant that says nothing -- see HintUnset -- and this package deliberately does not record what the server would do instead, because that is the server's to change.

The platform is stated once on the annotation, not on every attribute. An attribute repeats it only to disagree with it.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Boolean true/false defaults to true.
    Starts the desktop build in full-screen mode.
    int
    Height in pixels for the form in desktop builds, will be doubled for retina grade displays.
    Enables grab-able, click-to-page desktop scrollbars.
    Boolean true/false defaults to true.
    How the desktop window is framed: native for the OS title bar and menu bar, custom for an undecorated window with a Codename One drawn title bar, or toolbar for the legacy in-app Toolbar.
    int
    Width in pixels for the form in desktop builds, will be doubled for retina grade displays.
  • Element Details

    • adaptToRetina

      Toggle adaptToRetina
      Boolean true/false defaults to true. When set to true some values will ve implicitly doubled to deal with retina displays and icons etc. Will use higher DPI's
      Default:
      DEFAULT
    • fullscreen

      Toggle fullscreen
      Starts the desktop build in full-screen mode.
      Default:
      DEFAULT
    • height

      int height
      Height in pixels for the form in desktop builds, will be doubled for retina grade displays. Defaults to 600.
      Default:
      0
    • interactiveScrollbars

      Toggle interactiveScrollbars
      Enables grab-able, click-to-page desktop scrollbars.
      Default:
      DEFAULT
    • resizable

      Toggle resizable
      Boolean true/false defaults to true. Indicates whether the UI in the desktop build is resizable
      Default:
      DEFAULT
    • titleBar

      DesktopTitleBar titleBar
      How the desktop window is framed: native for the OS title bar and menu bar, custom for an undecorated window with a Codename One drawn title bar, or toolbar for the legacy in-app Toolbar. An unrecognized value falls back to native with a warning.
      Default:
      DEFAULT
    • width

      int width
      Width in pixels for the form in desktop builds, will be doubled for retina grade displays. Defaults to 800.
      Default:
      0