public class JHelp extends javax.swing.JComponent implements HelpSetListener, javax.accessibility.Accessible
| Modifier and Type | Class and Description |
|---|---|
protected class |
JHelp.AccessibleJHelp
The class used to obtain the accessible role for this object.
|
javax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected JHelpContentViewer |
contentViewer |
protected TextHelpModel |
helpModel |
protected HelpHistoryModel |
historyModel |
protected HelpSet.Presentation |
hsPres |
protected boolean |
navDisplayed |
protected java.util.Vector |
navigators |
protected boolean |
toolbarDisplayed |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
JHelp()
Create a JHelp component without a TextHelpModel.
|
JHelp(HelpSet hs)
Create a JHelp with a JHelpContentViewer and all Navigators
requested in the HelpSet.
|
JHelp(TextHelpModel model)
Create a JHelp using the TextHelpModel.
|
JHelp(TextHelpModel model,
HelpHistoryModel history,
HelpSet.Presentation hsPres)
Create a JHelp using the TextHelpModel and HelpHistoryModel
|
| Modifier and Type | Method and Description |
|---|---|
void |
addHelpNavigator(JHelpNavigator navigator)
A JHelp can have a number of navigators.
|
javax.accessibility.AccessibleContext |
getAccessibleContext()
Get the AccessibleContext associated with this JComponent.
|
JHelpContentViewer |
getContentViewer()
Retrieves what is the current content viewer
Read-Only property?
|
JHelpNavigator |
getCurrentNavigator() |
java.util.Enumeration |
getHelpNavigators() |
HelpSet.Presentation |
getHelpSetPresentation() |
java.net.URL |
getHelpSetURL() |
HelpHistoryModel |
getHistoryModel()
Returns The HelpHistoryModel
|
TextHelpModel |
getModel() |
TreeItem[] |
getSelectedItems()
Returns a list of selected items from the current navigator
|
HelpUI |
getUI()
Returns the HelpUI that is providing the current look and feel.
|
java.lang.String |
getUIClassID() |
void |
helpSetAdded(HelpSetEvent e)
Adds a new HelpSet to "our" HelpSet.
|
void |
helpSetRemoved(HelpSetEvent e)
Removes a HelpSet from "our" HelpSet.
|
boolean |
isNavigatorDisplayed()
Determines if the Navigators are hidden/displayed in the HelpUI.
|
boolean |
isToolbarDisplayed()
Determines if the Navigators are hidden/displayed in the HelpUI.
|
void |
removeHelpNavigator(JHelpNavigator navigator)
Removes a navigator.
|
void |
setCurrentID(Map.ID id)
Visits a given ID.
|
void |
setCurrentID(Map.ID id,
java.lang.String historyName,
JHelpNavigator navigator)
Visits a given ID.
|
void |
setCurrentID(java.lang.String id)
Convenience version of the above.
|
void |
setCurrentNavigator(JHelpNavigator navigator)
Sets the current navigator in the HelpUI.
|
void |
setCurrentURL(java.net.URL url)
Visits a given URL.
|
void |
setCurrentURL(java.net.URL url,
java.lang.String historyName,
JHelpNavigator navigator)
Visits a given URL.
|
void |
setHelpSetPresentation(HelpSet.Presentation hsPres)
Set the HelpSet.Presentation.
|
void |
setHelpSetSpec(java.lang.String spec)
Set the URL to the HelpSet.
|
void |
setModel(TextHelpModel newModel)
Sets the HelpModel that provides the data.
|
void |
setNavigatorDisplayed(boolean displayed)
Hidess/Displays the Navigators in the HelpUI.
|
void |
setToolbarDisplayed(boolean displayed)
Hidess/Displays the Toolbar in the HelpUI.
|
void |
setUI(HelpUI ui)
Sets the HelpUI that will provide the current look and feel.
|
protected void |
setupNavigators() |
void |
updateUI()
Replaces the UI with the latest version from the default
UIFactory.
|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected TextHelpModel helpModel
protected HelpHistoryModel historyModel
protected java.util.Vector navigators
protected boolean navDisplayed
protected boolean toolbarDisplayed
protected HelpSet.Presentation hsPres
protected JHelpContentViewer contentViewer
public JHelp(HelpSet hs)
hs - The HelpSet. If hs is null the JHelp is created with a
TextHelpModel with no HelpSet.public JHelp()
public JHelp(TextHelpModel model)
model - A model to use for the content and all the navigators. If model
is null it is the same as creating without a TextHelpModelpublic JHelp(TextHelpModel model, HelpHistoryModel history, HelpSet.Presentation hsPres)
model - A model to use for the content and all the navigators. If model
is null it is the same as creating without a TextHelpModelhistory - A history model. If <history is null it is the same
as creating without HelpHistoryModelprotected void setupNavigators()
public void setModel(TextHelpModel newModel)
newModel - The new Model. If newModel is null the internal model is set
to null.public TextHelpModel getModel()
public HelpHistoryModel getHistoryModel()
public void setHelpSetPresentation(HelpSet.Presentation hsPres)
HelpSet.Presentationpublic HelpSet.Presentation getHelpSetPresentation()
HelpSet.Presentationpublic void setHelpSetSpec(java.lang.String spec)
spec - Where to locate the HelpSet. A null spec is validpublic java.net.URL getHelpSetURL()
public void setUI(HelpUI ui)
ui - The HelpUI to set for this component. A null value for ui
is valid.public HelpUI getUI()
public void updateUI()
updateUI in class javax.swing.JComponentpublic java.lang.String getUIClassID()
getUIClassID in class javax.swing.JComponentpublic void helpSetAdded(HelpSetEvent e)
helpSetAdded in interface HelpSetListenere - HelpSetEventHelpSetEvent,
HelpSetListenerpublic void helpSetRemoved(HelpSetEvent e)
helpSetRemoved in interface HelpSetListenere - The eventpublic void setCurrentID(Map.ID id) throws InvalidHelpSetContextException
id - The ID to visit. Null id is valid for TextHelpModel.setCurrentID.InvalidHelpSetContextException - if id.hs is not contained in getHelpSet()public void setCurrentID(Map.ID id, java.lang.String historyName, JHelpNavigator navigator) throws InvalidHelpSetContextException
id - The ID to visit. Null id is valid for TextHelpModel.setCurrentID.historyName - The name for history entrynavigator - The JHelpNavigatorInvalidHelpSetContextException - if id.hs is not contained in getHelpSet()public void setCurrentID(java.lang.String id)
throws BadIDException
id - The String to visit. Null id is valid for TextHelpModel.setCurrentID.BadIDException - if the string is not in the map for the HelpSet.public void setCurrentURL(java.net.URL url)
url - The URL to visitpublic void setCurrentURL(java.net.URL url,
java.lang.String historyName,
JHelpNavigator navigator)
url - The URL to visitpublic TreeItem[] getSelectedItems()
public void addHelpNavigator(JHelpNavigator navigator)
navigator - The Navigator to explicitly add to the JHelp.public void removeHelpNavigator(JHelpNavigator navigator)
navigator - The Navigator to explicitly add to the JHelp.public java.util.Enumeration getHelpNavigators()
public void setCurrentNavigator(JHelpNavigator navigator)
navigator - The navigatorthrows - InvalidNavigatorException if not a one of HELPUI
navigators.public JHelpNavigator getCurrentNavigator()
public void setNavigatorDisplayed(boolean displayed)
public boolean isNavigatorDisplayed()
public void setToolbarDisplayed(boolean displayed)
public boolean isToolbarDisplayed()
public JHelpContentViewer getContentViewer()
public javax.accessibility.AccessibleContext getAccessibleContext()
getAccessibleContext in interface javax.accessibility.AccessiblegetAccessibleContext in class javax.swing.JComponent