@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.
Methods
public abstract Toggle adaptToRetina() default Toggle.DEFAULT | Boolean true/false defaults to true. |
public abstract Toggle fullscreen() default Toggle.DEFAULT | Starts the desktop build in full-screen mode. |
public abstract int height() default 0 | Height in pixels for the form in desktop builds, will be doubled for retina grade displays. |
public abstract Toggle interactiveScrollbars() default Toggle.DEFAULT | Enables grab-able, click-to-page desktop scrollbars. |
public abstract Toggle resizable() default Toggle.DEFAULT | Boolean true/false defaults to true. |
public abstract DesktopTitleBar titleBar() default DesktopTitleBar.DEFAULT | 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. |
public abstract int width() default 0 | Width in pixels for the form in desktop builds, will be doubled for retina grade displays. |
Method details
adaptToRetina
public abstract Toggle adaptToRetina() default Toggle.DEFAULTBoolean 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
fullscreen
public abstract Toggle fullscreen() default Toggle.DEFAULTStarts the desktop build in full-screen mode.
height
public abstract int height() default 0Height in pixels for the form in desktop builds, will be doubled for retina
grade displays. Defaults to 600.
interactiveScrollbars
public abstract Toggle interactiveScrollbars() default Toggle.DEFAULTEnables grab-able, click-to-page desktop scrollbars.
resizable
public abstract Toggle resizable() default Toggle.DEFAULTBoolean true/false defaults to true. Indicates whether the UI in the
desktop build is resizable
titleBar
public abstract DesktopTitleBar titleBar() default DesktopTitleBar.DEFAULTHow 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.
width
public abstract int width() default 0Width in pixels for the form in desktop builds, will be doubled for retina
grade displays. Defaults to 800.