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 FormModifier 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, statusPanel
infoBusMemberSupport
changeManager, properties, suspendChangeManager
source
author, 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, titleName
INFOBUS_SOURCE
AUTHOR, 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, writeToXML
addInfoBusPropertyListener, addInfoBusVetoableListener, finalize, getInfoBus, getInfoBusName, getMemberName, isConnected, joinInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBus, setInfoBusName, setMemberName, setName
addDataItemChangeListener, fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getName, getProperty, getPropertyGroup, getSource, isChangeManagerSuspended, release, removeDataItemChangeListener, setProperty, setPropertyGroup, suspendChangeManager
addCommand, 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, setTitleName
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, suspendPropertyChangeEvents
getClassName, getPresentationString, getPresentationString, getTransferData, getTransferDataFlavors, isDataFlavorSupported, lostOwnership, setClassName, setCreationDate, toString
getNiceVersion
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addExecuteStateListener, exit, fireExecuteStateEvent, getFwkPort, getStatusPanel, hasFwkPort, init, isEternal, isRegistered, register, register, register, removeExecuteStateListener, setArguments, setEternal, setPanel, setServiceControlManager, unregister
getInfoBusName, getMemberName, isConnected, setInfoBusName, setMemberName
addInfoBusPropertyListener, addInfoBusVetoableListener, getInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBus
getCompany, readConstructor, readFromDOM, readingDOM, readingDOM, writeConstructor, writeToDOM, writeToXML
getController, setController
getPrintJobName, setPageFormat
fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getProperty, getPropertyGroup, setProperty, setPropertyGroup, suspendChangeManager
getCommands, getPersistentObjectNames
destroyController
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, setSource, suspendPropertyChangeEvents
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, removeVetoableChangeListener, removeVetoableChangeListener
getAuthor, 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, setTitleName
getTransferData, getTransferDataFlavors, isDataFlavorSupported
addCommand, addToGroup, addToGroup, clearCommands, deleteGroup, getGroup, groupExists, removeFromGroup
getPresentationString, getPresentationString
release
getNumberOfPages, getPageFormat, getPrintable
getPriority, isInterrupted, setPriority, start, stop
public 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()
FwkInterface
getVersion
in interface FwkInterface
getVersion
in class FwkApplication
public static FwkDescriptionInterface getDescriptor()
public static javax.help.HelpSet findHelpSet()
public void run()
run
in interface java.lang.Runnable
run
in class FwkApplication
public void createComponent()
hs
- The help set belongs to that component.public FwkPanelInterface getPanel()
getPanel
in interface FwkApplicationInterface
getPanel
in class FwkApplication
public java.awt.Dimension getSize()
getSize
in interface javax.help.HelpBroker
public void setSize(java.awt.Dimension size)
setSize
in interface javax.help.HelpBroker
The
- dimension of the panel.public void addCommand(FwkCommandInterface command)
addCommand
in interface FwkInstructionInterface
addCommand
in class FwkPersistence
command
- The command to be added.public FwkCommandInterface getCommand(java.lang.String commandName)
getCommand
in interface FwkInstructionInterface
getCommand
in class FwkPersistence
commandName
- The name of the requested command.public boolean commandsAvailable()
commandsAvailable
in interface FwkInstructionInterface
commandsAvailable
in class FwkPersistence
public FwkCommandInterface[] getCommands()
getCommands
in interface FwkInstructionInterface
getCommands
in class FwkPersistence
public void removeCommand(FwkCommandInterface command)
removeCommand
in interface FwkInstructionInterface
removeCommand
in class FwkPersistence
command
- The sub-command to be removed.public void setCommands(FwkCommandInterface[] commands)
setCommands
in interface FwkInstructionInterface
setCommands
in class FwkPersistence
commands
- The array containing the sub-commands.FwkInstructionInterface.addCommand(FwkCommandInterface command)
public javax.help.HelpSet getHelpSet()
getHelpSet
in interface javax.help.HelpBroker
public void setHelpSet(javax.help.HelpSet hs)
setHelpSet
in interface javax.help.HelpBroker
hs
- The HelpSet to set for this broker.
A null hs is valid parameter.public java.util.Locale getLocale()
getLocale
in interface javax.help.HelpBroker
setLocale(java.util.Locale)
public void setLocale(java.util.Locale l)
setLocale
in interface javax.help.HelpBroker
l
- 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.HelpBroker
public void setFont(java.awt.Font f)
setFont
in interface javax.help.HelpBroker
f
- The font.public void setCurrentView(java.lang.String name)
setCurrentView
in interface javax.help.HelpBroker
name
- 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.HelpBroker
public void initPresentation()
initPresentation
in interface javax.help.HelpBroker
public void setDisplayed(boolean b)
setDisplayed
in interface javax.help.HelpBroker
public boolean isDisplayed()
isDisplayed
in interface javax.help.HelpBroker
public void setViewDisplayed(boolean displayed)
setViewDisplayed
in interface javax.help.HelpBroker
public boolean isViewDisplayed()
isViewDisplayed
in interface javax.help.HelpBroker
public void setCurrentID(java.lang.String id) throws javax.help.BadIDException
setCurrentID
in interface javax.help.HelpBroker
id
- 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.HelpBroker
id
- 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.HelpBroker
public void setCurrentURL(java.net.URL url)
setCurrentURL
in interface javax.help.HelpBroker
url
- The url to display. A null URL is a valid url.public java.net.URL getCurrentURL()
getCurrentURL
in interface javax.help.HelpBroker
public void enableHelpKey(java.awt.Component comp, java.lang.String id, javax.help.HelpSet hs)
enableHelpKey
in interface javax.help.HelpBroker
comp
- 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.getHelpKeyActionListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void enableHelp(java.awt.Component comp, java.lang.String id, javax.help.HelpSet hs)
enableHelp
in interface javax.help.HelpBroker
comp
- 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.setHelpSet
public void enableHelp(java.awt.MenuItem comp, java.lang.String id, javax.help.HelpSet hs)
enableHelp
in interface javax.help.HelpBroker
comp
- 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.setHelpSet
public void enableHelpOnButton(java.awt.Component comp, java.lang.String id, javax.help.HelpSet hs)
enableHelpOnButton
in interface javax.help.HelpBroker
comp
- 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
,
Button
public void enableHelpOnButton(java.awt.MenuItem comp, java.lang.String id, javax.help.HelpSet hs)
enableHelpOnButton
in interface javax.help.HelpBroker
comp
- 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
,
MenuItem
protected java.awt.event.ActionListener getDisplayHelpFromFocus()
enableHelpKey
protected java.awt.event.ActionListener getDisplayHelpFromSource()
enableHelp
public java.awt.Point getLocation() throws java.lang.UnsupportedOperationException
getLocation
in interface javax.help.HelpBroker
java.lang.UnsupportedOperationException
public void setLocation(java.awt.Point p) throws java.lang.UnsupportedOperationException
setLocation
in interface javax.help.HelpBroker
java.lang.UnsupportedOperationException
public static void main(java.lang.String[] args)