public class FwkHelpBroker extends FwkApplication implements FwkHelpBrokerInterface, java.awt.event.KeyListener
The table of the used properties:
| Property Keyword | Datatype | Default | Description |
|---|---|---|---|
| FwkHelpBroker.URL.HelpSet | String | com/highqsoft/help/ language /Help.hs | The name of the helpset URL. |
| Icon.FwkHelpBroker | String | com/highqsoft/fwk/images/FwkHelpBroker.gif | The icon of the help broker. |
,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected static FwkDescriptionInterface |
descriptor |
protected java.awt.event.ActionListener |
displayHelpFromFocus |
protected java.awt.event.ActionListener |
displayHelpFromSource |
protected java.awt.Font |
font
the font.
|
protected FwkHelp |
fwkHelp
The help.
|
protected static javax.help.HelpSet |
helpset
The help set.
|
static java.lang.String |
version |
applicationThread, args, controller, eternal, executeStateListeners, pageFormat, panel, port, readingDOM, serviceControlManager, statusLabel, statusPanelinfoBusMemberSupportchangeManager, properties, suspendChangeManagersourceauthor, buildnr, className, company, copyright, creationDate, dateFormatString, description, eMail, FWK_ICON, FWK_ICON_ARRAY, FWK_ICON_BG, FWK_ICON_BG_ARRAY, FWK_ICON_BG_LARGE, FWK_ICON_BG_LARGE_ARRAY, FWK_ICON_LARGE, FWK_ICON_LARGE_ARRAY, icon, ICON, iconCount, iconKey, internetAddress, name, titleNameINFOBUS_SOURCEAUTHOR, BUILDNR, COMPANY, COPYRIGHT, DATE_FORMAT, DEFAULT_ICON, DESCRIPTION, INTERNET, LARGE_ICON, LARGE_KEY_EXT, LARGE_OPAQUE_ICON, LARGE_OPAQUE_KEY_EXT, OPAQUE_ICON, OPAQUE_KEY_EXT, RCS_DATE_FORMAT, SUPPORT_EMAIL, TITLE_NAME| Constructor and Description |
|---|
FwkHelpBroker()
Constructor.
|
FwkHelpBroker(javax.help.HelpSet hs)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCommand(FwkCommandInterface command)
Add the command to the command array.
|
boolean |
commandsAvailable()
This method returns a boolean that indicates whether
the command array is initialized.
|
void |
createComponent()
Create the component.
|
void |
enableHelp(java.awt.Component comp,
java.lang.String id,
javax.help.HelpSet hs)
Enables help for a Component.
|
void |
enableHelp(java.awt.MenuItem comp,
java.lang.String id,
javax.help.HelpSet hs)
Enables help for a MenuItem.
|
void |
enableHelpKey(java.awt.Component comp,
java.lang.String id,
javax.help.HelpSet hs)
Enables the Help key on a Component.
|
void |
enableHelpOnButton(java.awt.Component comp,
java.lang.String id,
javax.help.HelpSet hs)
Enables help for a Component.
|
void |
enableHelpOnButton(java.awt.MenuItem comp,
java.lang.String id,
javax.help.HelpSet hs)
Enables help for a MenuItem.
|
static javax.help.HelpSet |
findHelpSet() |
FwkCommandInterface |
getCommand(java.lang.String commandName)
Return the command that matches the given command name.
|
FwkCommandInterface[] |
getCommands()
Retrieve the command array of the component.
|
javax.help.Map.ID |
getCurrentID()
Determines which ID is displayed (if any).
|
java.net.URL |
getCurrentURL()
Determines which URL is displayed.
|
java.lang.String |
getCurrentView()
Determines the current navigator.
|
static FwkDescriptionInterface |
getDescriptor() |
protected java.awt.event.ActionListener |
getDisplayHelpFromFocus()
Returns the default DisplayHelpFromFocus listener.
|
protected java.awt.event.ActionListener |
getDisplayHelpFromSource()
Returns the default DisplayHelpFromSource listener.
|
java.awt.Font |
getFont()
Gets the font for this HelpBroker.
|
javax.help.HelpSet |
getHelpSet()
Returns the default HelpSet
|
java.util.Locale |
getLocale()
Gets the locale of this component.
|
java.awt.Point |
getLocation() |
FwkPanelInterface |
getPanel()
Get the panel of this application.
|
java.awt.Dimension |
getSize()
Get the size of the panel.
|
java.lang.String |
getVersion()
Return the version string of the FWK component.
|
void |
initPresentation()
Initializes the presentation.
|
boolean |
isDisplayed()
Determines if the presentation is displayed.
|
boolean |
isViewDisplayed()
Determines if the current view is visible.
|
void |
keyPressed(java.awt.event.KeyEvent e)
Invoked when a key is pressed.
|
void |
keyReleased(java.awt.event.KeyEvent e)
Invoked when a key is released.
|
void |
keyTyped(java.awt.event.KeyEvent e)
Invoked when a key is typed.
|
static void |
main(java.lang.String[] args)
The test program.
|
void |
removeCommand(FwkCommandInterface command)
Remove a sub-command.
|
void |
run()
Run the application.
|
void |
setCommands(FwkCommandInterface[] commands)
Set the sub-commands of the command.
|
void |
setCurrentID(javax.help.Map.ID id)
Displays this ID--HelpVisitListeners are notified.
|
void |
setCurrentID(java.lang.String id)
Shows this ID as content relative to the (top) HelpSet for the HelpBroker
instance--HelpVisitListeners are notified.
|
void |
setCurrentURL(java.net.URL url)
Displays this URL.
|
void |
setCurrentView(java.lang.String name)
Set the currentView to the navigator with the same
name as the name parameter.
|
void |
setDisplayed(boolean b)
Displays the presentation to the user.
|
void |
setFont(java.awt.Font f)
Sets the font for this this HelpBroker.
|
void |
setHelpSet(javax.help.HelpSet hs)
Changes the HelpSet for this broker.
|
void |
setLocale(java.util.Locale l)
Sets the locale of this HelpBroker.
|
void |
setLocation(java.awt.Point p) |
void |
setSize(java.awt.Dimension size)
Set the size of the panel.
|
void |
setViewDisplayed(boolean displayed)
Hides/Shows view.
|
addExecuteStateListener, destroyController, exit, fireExecuteStateEvent, getController, getFwkPort, getNumberOfPages, getPageFormat, getPrintable, getPrintJobName, getPriority, getStatusPanel, hasFwkPort, init, isEternal, isInterrupted, isRegistered, print, readConstructor, readFromDOM, readingDOM, readingDOM, register, register, register, removeExecuteStateListener, setArguments, setController, setEternal, setPageFormat, setPanel, setPriority, setServiceControlManager, start, stop, unregister, writeConstructor, writeToDOM, writeToXMLaddInfoBusPropertyListener, addInfoBusVetoableListener, finalize, getInfoBus, getInfoBusName, getMemberName, isConnected, joinInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBus, setInfoBusName, setMemberName, setNameaddDataItemChangeListener, fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getName, getProperty, getPropertyGroup, getSource, isChangeManagerSuspended, release, removeDataItemChangeListener, setProperty, setPropertyGroup, suspendChangeManageraddCommand, addToGroup, addToGroup, addVetoableChangeListener, addVetoableChangeListener, clearCommands, compareTo, deleteGroup, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getAuthor, getBuild, getCommands, getCompany, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getFwkMimeTypes, getGroup, getIcon, getIcon, getIconKey, getIconKey, getPersistentObjectNames, getSupportEMail, getTitle, getTitleName, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, groupExists, removeFromGroup, removeVetoableChangeListener, removeVetoableChangeListener, setAuthor, setBuild, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setDateFormatString, setDescription, setDescriptor, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setSource, setSupportEMail, setTitleNameaddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, suspendPropertyChangeEventsgetClassName, getPresentationString, getPresentationString, getTransferData, getTransferDataFlavors, isDataFlavorSupported, lostOwnership, setClassName, setCreationDate, toStringgetNiceVersionclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddExecuteStateListener, exit, fireExecuteStateEvent, getFwkPort, getStatusPanel, hasFwkPort, init, isEternal, isRegistered, register, register, register, removeExecuteStateListener, setArguments, setEternal, setPanel, setServiceControlManager, unregistergetInfoBusName, getMemberName, isConnected, setInfoBusName, setMemberNameaddInfoBusPropertyListener, addInfoBusVetoableListener, getInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBusgetCompany, readConstructor, readFromDOM, readingDOM, readingDOM, writeConstructor, writeToDOM, writeToXMLgetController, setControllergetPrintJobName, setPageFormatfireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getProperty, getPropertyGroup, setProperty, setPropertyGroup, suspendChangeManagergetCommands, getPersistentObjectNamesdestroyControlleraddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, setSource, suspendPropertyChangeEventsaddVetoableChangeListener, addVetoableChangeListener, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, removeVetoableChangeListener, removeVetoableChangeListenergetAuthor, getBuild, getClassName, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getIcon, getIcon, getIconKey, getIconKey, getName, getPresentationString, getPresentationString, getSupportEMail, getTitle, getTitleName, setAuthor, setBuild, setClassName, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setCreationDate, setDateFormatString, setDescription, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setName, setSupportEMail, setTitleNamegetTransferData, getTransferDataFlavors, isDataFlavorSupportedaddCommand, addToGroup, addToGroup, clearCommands, deleteGroup, getGroup, groupExists, removeFromGroupgetPresentationString, getPresentationStringreleasegetNumberOfPages, getPageFormat, getPrintablegetPriority, isInterrupted, setPriority, start, stoppublic static final java.lang.String version
protected static final FwkDescriptionInterface descriptor
protected static javax.help.HelpSet helpset
protected FwkHelp fwkHelp
protected java.awt.Font font
protected java.awt.event.ActionListener displayHelpFromFocus
protected java.awt.event.ActionListener displayHelpFromSource
public FwkHelpBroker()
com/highqsoft/help/[language]/Help.hs.public FwkHelpBroker(javax.help.HelpSet hs)
hs - The helpset.public java.lang.String getVersion()
FwkInterfacegetVersion in interface FwkInterfacegetVersion in class FwkApplicationpublic static FwkDescriptionInterface getDescriptor()
public static javax.help.HelpSet findHelpSet()
public void run()
run in interface java.lang.Runnablerun in class FwkApplicationpublic void createComponent()
hs - The help set belongs to that component.public FwkPanelInterface getPanel()
getPanel in interface FwkApplicationInterfacegetPanel in class FwkApplicationpublic java.awt.Dimension getSize()
getSize in interface javax.help.HelpBrokerpublic void setSize(java.awt.Dimension size)
setSize in interface javax.help.HelpBrokerThe - dimension of the panel.public void addCommand(FwkCommandInterface command)
addCommand in interface FwkInstructionInterfaceaddCommand in class FwkPersistencecommand - The command to be added.public FwkCommandInterface getCommand(java.lang.String commandName)
getCommand in interface FwkInstructionInterfacegetCommand in class FwkPersistencecommandName - The name of the requested command.public boolean commandsAvailable()
commandsAvailable in interface FwkInstructionInterfacecommandsAvailable in class FwkPersistencepublic FwkCommandInterface[] getCommands()
getCommands in interface FwkInstructionInterfacegetCommands in class FwkPersistencepublic void removeCommand(FwkCommandInterface command)
removeCommand in interface FwkInstructionInterfaceremoveCommand in class FwkPersistencecommand - The sub-command to be removed.public void setCommands(FwkCommandInterface[] commands)
setCommands in interface FwkInstructionInterfacesetCommands in class FwkPersistencecommands - The array containing the sub-commands.FwkInstructionInterface.addCommand(FwkCommandInterface command)public javax.help.HelpSet getHelpSet()
getHelpSet in interface javax.help.HelpBrokerpublic void setHelpSet(javax.help.HelpSet hs)
setHelpSet in interface javax.help.HelpBrokerhs - The HelpSet to set for this broker.
A null hs is valid parameter.public java.util.Locale getLocale()
getLocale in interface javax.help.HelpBrokersetLocale(java.util.Locale)public void setLocale(java.util.Locale l)
setLocale in interface javax.help.HelpBrokerl - The locale to become this component's locale. A null locale
is the same as the defaultLocale.getLocale()public java.awt.Font getFont()
getFont in interface javax.help.HelpBrokerpublic void setFont(java.awt.Font f)
setFont in interface javax.help.HelpBrokerf - The font.public void setCurrentView(java.lang.String name)
setCurrentView in interface javax.help.HelpBrokername - The name of the navigator to set as the
current view. If nav is null or not a valid Navigator
in this HelpBroker then an
IllegalArgumentException is thrown.java.lang.IllegalArgumentException - if nav is null or not a valid Navigator.public java.lang.String getCurrentView()
getCurrentView in interface javax.help.HelpBrokerpublic void initPresentation()
initPresentation in interface javax.help.HelpBrokerpublic void setDisplayed(boolean b)
setDisplayed in interface javax.help.HelpBrokerpublic boolean isDisplayed()
isDisplayed in interface javax.help.HelpBrokerpublic void setViewDisplayed(boolean displayed)
setViewDisplayed in interface javax.help.HelpBrokerpublic boolean isViewDisplayed()
isViewDisplayed in interface javax.help.HelpBrokerpublic void setCurrentID(java.lang.String id)
throws javax.help.BadIDException
setCurrentID in interface javax.help.HelpBrokerid - A string that identifies the topic to show for the loaded (top) HelpSetjavax.help.BadIDException - The ID is not valid for the HelpSetpublic void setCurrentID(javax.help.Map.ID id)
throws javax.help.InvalidHelpSetContextException
setCurrentID in interface javax.help.HelpBrokerid - a Map.ID indicating the URL to displayjavax.help.InvalidHelpSetContextException - if the current helpset does not contain
id.helpsetpublic javax.help.Map.ID getCurrentID()
getCurrentID in interface javax.help.HelpBrokerpublic void setCurrentURL(java.net.URL url)
setCurrentURL in interface javax.help.HelpBrokerurl - The url to display. A null URL is a valid url.public java.net.URL getCurrentURL()
getCurrentURL in interface javax.help.HelpBrokerpublic void enableHelpKey(java.awt.Component comp,
java.lang.String id,
javax.help.HelpSet hs)
enableHelpKey in interface javax.help.HelpBrokercomp - the Component to enable the keyboard actions on.id - the default HelpID to be displayedhs - the default HelpSet to be displayed. If hs is null the default HelpSet
will be assumed.getHelpKeyActionListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void enableHelp(java.awt.Component comp,
java.lang.String id,
javax.help.HelpSet hs)
enableHelp in interface javax.help.HelpBrokercomp - the Component to set the id and hs on.id - the String value of an Map.ID.hs - the HelpSet the id is in. If hs is null the default HelpSet
will be assumed.CSH.setHelpID,
CSH.setHelpSetpublic void enableHelp(java.awt.MenuItem comp,
java.lang.String id,
javax.help.HelpSet hs)
enableHelp in interface javax.help.HelpBrokercomp - the MenuItem to set the id and hs on.id - the String value of an Map.ID.hs - the HelpSet the id is in. If hs is null the default HelpSet
will be assumed.CSH.setHelpID,
CSH.setHelpSetpublic void enableHelpOnButton(java.awt.Component comp,
java.lang.String id,
javax.help.HelpSet hs)
enableHelpOnButton in interface javax.help.HelpBrokercomp - the Component to set the id and hs on. If the Component is not
a javax.swing.AbstractButton or a
java.awt.Button an IllegalArgumentException is thrown.id - the String value of an Map.ID.hs - the HelpSet the id is in. If hs is null the default HelpSet
will be assumed.java.lang.IllegalArgumentException - if comp is null.CSH.setHelpID,
CSH.setHelpSet,
AbstractButton,
Buttonpublic void enableHelpOnButton(java.awt.MenuItem comp,
java.lang.String id,
javax.help.HelpSet hs)
enableHelpOnButton in interface javax.help.HelpBrokercomp - the MenuItem to set the id and hs on. If comp is null
an IllegalAgrumentException is thrown.id - the String value of an Map.ID.hs - the HelpSet the id is in. If hs is null the default HelpSet
will be assumed.java.lang.IllegalArgumentException - if comp is null.CSH.setHelpID,
CSH.setHelpSet,
MenuItemprotected java.awt.event.ActionListener getDisplayHelpFromFocus()
enableHelpKeyprotected java.awt.event.ActionListener getDisplayHelpFromSource()
enableHelppublic java.awt.Point getLocation()
throws java.lang.UnsupportedOperationException
getLocation in interface javax.help.HelpBrokerjava.lang.UnsupportedOperationExceptionpublic void setLocation(java.awt.Point p)
throws java.lang.UnsupportedOperationException
setLocation in interface javax.help.HelpBrokerjava.lang.UnsupportedOperationExceptionpublic static void main(java.lang.String[] args)