Package javax.help
Class Popup
- java.lang.Object
-
- javax.help.Presentation
-
- javax.help.Popup
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.util.EventListener
public class Popup extends Presentation implements java.awt.event.ActionListener
Popup is a Presentation class that will create a popup help window for an application. There is only one popup per application. A popup contains only a content viewer. It is intended to provide immediate help and then allow the user to continue working. Once a popup loses focus, it is destroyed.- Since:
- 2.0
- See Also:
Presentation
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
java.awt.Component
getInvoker()
Get the Component that invoked this popupjava.awt.Rectangle
getInvokerInternalBounds()
Get the internal bounds for the invoker.static Presentation
getPresentation(HelpSet hs, java.lang.String name)
create a new Popup for a given HelpSet and HelpSet.Presentation "name".boolean
isDisplayed()
Determines if the presentation is displayed.void
setDisplayed(boolean b)
Displays the presentation to the uservoid
setInvoker(java.awt.Component invoker)
Set the invoking component for this popup.void
setInvokerInternalBounds(java.awt.Rectangle bounds)
Set the the internal bounds for an invoker.-
Methods inherited from class javax.help.Presentation
getCurrentID, getCurrentURL, getFont, getHelpModel, getHelpSet, getLocale, getSize, setCurrentID, setCurrentID, setCurrentURL, setFont, setHelpSet, setHelpSetPresentation, setLocale, setSize
-
-
-
-
Method Detail
-
getPresentation
public static Presentation getPresentation(HelpSet hs, java.lang.String name)
create a new Popup for a given HelpSet and HelpSet.Presentation "name". If the "name"d HelpSet.Presentation does not exist in the HelpSet then the defaultHelpSet.Presentation if used.- Parameters:
hs
- The HelpSEt used in this presentationname
- The name of the HelpSet.Presentation to use
-
getInvoker
public java.awt.Component getInvoker()
Get the Component that invoked this popup- Returns:
- Component The invoking component
-
setInvoker
public void setInvoker(java.awt.Component invoker)
Set the invoking component for this popup. This must be called before setDisplayed(true) is called. If there is an invoker already set it will be used instead of the new invoker.- Parameters:
invoker
- The component that invoked this popup- Throws:
an
- IllegalArgumentException if the invoker or it's parents are not showing.
-
getInvokerInternalBounds
public java.awt.Rectangle getInvokerInternalBounds()
Get the internal bounds for the invoker.
-
setInvokerInternalBounds
public void setInvokerInternalBounds(java.awt.Rectangle bounds)
Set the the internal bounds for an invoker. For some invokers like JTrees and JTables it is necessary to set an internal bounds to further define the location of where to place the popup.- Parameters:
bounds
- A Rectangle of the internal bounds
-
setDisplayed
public void setDisplayed(boolean b)
Displays the presentation to the user- Specified by:
setDisplayed
in classPresentation
-
isDisplayed
public boolean isDisplayed()
Description copied from class:Presentation
Determines if the presentation is displayed.- Specified by:
isDisplayed
in classPresentation
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
-