Class GlassTutorial
- All Implemented Interfaces:
Painter
A Glass Tutorial appears on top of the UI especially on a touch device but could be on any device and points to/circles components within the UI coupled with explanation of what they do and a tint of the screen. It is implemented as a GlassPane on top of a Form which is automatically removed when a user touches the screen or presses a button.
To position elements within the glass tutorial the elements must be associated with a component instance of the underlying UI and positioned relatively to said component.
The GlassTutorial uses the "GlassTutorial" UIID to paint itself it then paints the hint components in their proper places.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPlaces a hint within the glass in a position relative to the destinationComponent, the position is indicated with border layout attributes.voidDraws inside the given rectangle clipping area.voidInstall the glass tutorial on a form and seamlessly dismiss it when no longer necessary
-
Constructor Details
-
GlassTutorial
public GlassTutorial()
-
-
Method Details
-
addHint
Places a hint within the glass in a position relative to the destinationComponent, the position is indicated with border layout attributes. Notice you can place multiple components on a single element and they will be rendered in order e.g. a component with a border can be used to "circle" the destination by placing it in the CENTER position and another arrow with text can be places in the south position below.
Parameters
-
hintComponent: The component that would be renderered in the given position -
destinationComponent: the "hinted" component over which the hint will show -
position: @param position the position relative to the destinationComponent in BorderLayout values e.g. to place the hint above the component just place it in BorderLayout.NORTH. The center will stretch the component but the other sides will give the component its exact preferred size.
-
-
showOn
Install the glass tutorial on a form and seamlessly dismiss it when no longer necessary
Parameters
f: the form
-
paint
-