- Direct Known Subclasses:
public class Displayextends JPanelA Display is a canvas where a
Viewcan draw an
Exhibit. A display can manage an
Animation; it has methods for installing, stopping, controlling the speed, and pausing an animation. It can also manage MouseTasks, which respond to user mouse clicks on the Display. A View can define a
MouseTaskthat is active as long as the View is installed in the Display. It is also possible to install a "one-shot mouse task" that is active only for one user mouse action.
A display can have an associated container, which can be obtained by calling
getHolder(). The ordinary way to add a display is to add this "holder" to a parent container, rather than adding the display itself. The holder holds a status bar in addition to the display, and other components can be added as well using
addBorderComponent(Component, Object). The status bar can be hidden. In addition, if the display is in a holder, it is possible to "split" the holder, with the display in one half and another component in the other half. Note that exhibits that use the capabilities associated with the holder might not function fully if the display is not contained in a holder. Ordinarily, you should not do anything with the holder directly except add it to a parent component. Note that whenever an exhibit is removed from the display, the holder is reset to its default state, showing only the display and (if it has not been hidden) the status bar.
- See Also:
- Serialized Form