public class HelpController extends java.lang.Object implements Controller
Modifier and Type | Class and Description |
---|---|
static class |
HelpController.Property
The properties that may be edited by the view associated to this controller.
|
Constructor and Description |
---|
HelpController(UserPreferences preferences,
ViewFactory viewFactory) |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(HelpController.Property property,
java.beans.PropertyChangeListener listener)
Adds the property change
listener in parameter to this controller. |
void |
displayView()
Displays the help view controlled by this controller.
|
java.net.URL |
getBrowserPage()
Returns the browser page.
|
java.net.URL |
getHelpPage()
Returns the current page.
|
java.lang.String |
getHighlightedText()
Returns the highlighted text.
|
HelpView |
getView()
Returns the view associated with this controller.
|
protected boolean |
isBrowserPage(java.net.URL page)
Returns
true if the given page should be displayed
by the system browser rather than by the help view. |
boolean |
isNextPageEnabled()
Returns whether a next page is available or not.
|
boolean |
isPreviousPageEnabled()
Returns whether a previous page is available or not.
|
void |
removePropertyChangeListener(HelpController.Property property,
java.beans.PropertyChangeListener listener)
Removes the property change
listener in parameter from this controller. |
void |
search(java.lang.String searchedText)
Searches
searchedText in help documents and displays
the result. |
void |
setHighlightedText(java.lang.String highlightedText)
Sets the highlighted text.
|
void |
showNext()
Controls the display of next page.
|
void |
showPage(java.net.URL page)
Controls the display of the given
page . |
void |
showPrevious()
Controls the display of previous page.
|
public HelpController(UserPreferences preferences, ViewFactory viewFactory)
public HelpView getView()
getView
in interface Controller
public void displayView()
public void addPropertyChangeListener(HelpController.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter to this controller.public void removePropertyChangeListener(HelpController.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter from this controller.public java.net.URL getHelpPage()
public java.net.URL getBrowserPage()
public boolean isPreviousPageEnabled()
public boolean isNextPageEnabled()
public void setHighlightedText(java.lang.String highlightedText)
public java.lang.String getHighlightedText()
public void showPrevious()
public void showNext()
public void showPage(java.net.URL page)
page
.protected boolean isBrowserPage(java.net.URL page)
true
if the given page
should be displayed
by the system browser rather than by the help view.
By default, it returns true
if the page
protocol is http or https.public void search(java.lang.String searchedText)
searchedText
in help documents and displays
the result.
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License