Package com.explodingpixels.macwidgets
Class HudWindow
java.lang.Object
com.explodingpixels.macwidgets.HudWindow
An implementation of an OS X Transparent Panel, also known as a Heads Up Display (HUD). For a full descrption of what a Transparent Panel is, see the Transparent Panels section of Apple's Human Interface Guidelines.
HUD's are designed to offer a lightweight way to unobtrusivley offer controls to the user. The window
looks like this:
As Apple points out, this component is not appropriate for all situations and should be used judiciously.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets theJComponentto add content to.Gets theJDialogbacking thisHudWindow.voidHides the close button on this HUD's title bar.voidMakes this HUD resizeable.voidsetContentPane(JComponent contentPane) Sets theJComponentto use as the container for thisHudWindow's content.
-
Constructor Details
-
HudWindow
public HudWindow()Creates a Heads Up Display style window. -
HudWindow
Creates a Heads Up Display style window.- Parameters:
title- the title to use for this window.
-
HudWindow
Creates a Heads Up Display style window.- Parameters:
title- the title to use for this window.owner- theFramethat this HUD is parented to. Can be null.
-
-
Method Details
-
getJDialog
Gets theJDialogbacking thisHudWindow.- Returns:
- the
JDialogbacking thisHudWindow.
-
hideCloseButton
public void hideCloseButton()Hides the close button on this HUD's title bar. -
makeResizeable
public void makeResizeable()Makes this HUD resizeable. Note that there is currently a bug in the Mac JRE which causes a very bad flicker when a window is programmatically resized. For now, it's suggested that you do not use this method unless you are on a non-Mac platform. -
getContentPane
Gets theJComponentto add content to.- Returns:
- the container to add content to.
-
setContentPane
Sets theJComponentto use as the container for thisHudWindow's content.- Parameters:
contentPane- the container for thisHudWindow's content.
-