Inheritance diagram for edu.cmu.hcii.calo.WinAppBar:
A frame wishing to become a sidebar must call setAsBar() after becoming visible (it is best to wait briefly before calling setAsBar() so that Windows can catch up) and pass one of the edge constants to determine where the sidebar will be anchored. When the application is about to exit, the frame should call unSetBar() to relinquish its status as a sidebar. When the width of the window changes programmatically, the window should call setSidebarSize() with its new width and height to keep Windows informed about the change.
Public Member Functions | |
native void | setAsBar (String title, int position) |
Sets this window as a sidebar and places it on the specified edge of the screen. | |
native void | setSidebarSize (int width, int height) |
Informs the WinAppBar library that the size of the sidebar has changed. | |
native void | unSetBar () |
Causes this window to relinquish its status as a Windows sidebar. | |
Static Public Attributes | |
static final int | LEFT = 1 |
Pass to setAsBar to indicate that the sidebar should appear on the left edge of the screen. | |
static final int | TOP = 2 |
Pass to setAsBar to indicate that the sidebar should appear on the top edge of the screen. | |
static final int | RIGHT = 3 |
Pass to setAsBar to indicate that the sidebar should appear on the right edge of the screen. | |
static final int | BOTTOM = 4 |
Pass to setAsBar to indicate that the sidebar should appear on the bottom edge of the screen. | |
Static Package Functions | |
[static initializer] | |
Attempts to load the WinAppBar library, printing a non-fatal error message if it cannot do so. | |
Static Private Attributes | |
static final long | serialVersionUID = 1L |
Prevent serialization collisions. |
edu.cmu.hcii.calo.WinAppBar.[static initializer] | ( | ) | [static, package] |
Attempts to load the WinAppBar library, printing a non-fatal error message if it cannot do so.
native void edu.cmu.hcii.calo.WinAppBar.setAsBar | ( | String | title, | |
int | position | |||
) |
Sets this window as a sidebar and places it on the specified edge of the screen.
title
argument match the title of the window, but it must be unique across ALL open windows in every application. It may be worthwhile to temporarily set the window title to a UUID or other guaranteed-unique identifier (the application name and date stamp would suffice in a pinch), then call setAppBar, then set it back when you're done. title | the current title of this window | |
position | the desired position of the sidebar |
native void edu.cmu.hcii.calo.WinAppBar.setSidebarSize | ( | int | width, | |
int | height | |||
) |
Informs the WinAppBar library that the size of the sidebar has changed.
Call this whenever you set the window size programmatically from within Java.
width | the new width of the sidebar | |
height | the new height of the sidebar |
native void edu.cmu.hcii.calo.WinAppBar.unSetBar | ( | ) |
Causes this window to relinquish its status as a Windows sidebar.
You must call unSetBar() before your application exits, or the space claimed by the sidebar will not be available to any other windows (even maximized ones) until you restart the computer or call setAsBar() or unSetBar() in a future run of the application.
final int edu.cmu.hcii.calo.WinAppBar.LEFT = 1 [static] |
Pass to setAsBar to indicate that the sidebar should appear on the left edge of the screen.
final int edu.cmu.hcii.calo.WinAppBar.TOP = 2 [static] |
Pass to setAsBar to indicate that the sidebar should appear on the top edge of the screen.
final int edu.cmu.hcii.calo.WinAppBar.RIGHT = 3 [static] |
Pass to setAsBar to indicate that the sidebar should appear on the right edge of the screen.
final int edu.cmu.hcii.calo.WinAppBar.BOTTOM = 4 [static] |
Pass to setAsBar to indicate that the sidebar should appear on the bottom edge of the screen.
final long edu.cmu.hcii.calo.WinAppBar.serialVersionUID = 1L [static, private] |