|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface NewsService
Defines an OSGi service which allows for news information to be displayed
on the main screen of the MMOUI Manager. Each NewsService
instance operates in its own thread such that they need not worry about
interfering with each other or yielding CPU time. NewsService
instances are run via an adaptive thread pool so the information should
be accessible quickly.
| Method Summary | |
|---|---|
java.awt.Component |
getNewsPanel()
Gets the panel to display in this NewsService
implementation's news tab. |
void |
initialize(ModuleLogger log)
Initializes this logging service. |
void |
run()
Executes this news service. |
void |
setHyperlinkHandler(BrowserPopupCreator creator)
Sets the hyperlink handler for this news service. |
| Methods inherited from interface com.mmoui.manager.services.Service |
|---|
getAdvertisements, getFullProviderName, getPermissions, getShortProviderName |
| Method Detail |
|---|
void initialize(ModuleLogger log)
getShortProviderName() and
getFullProviderName().
log - the logging object to use by the module to report messagesjava.awt.Component getNewsPanel()
Gets the panel to display in this NewsService
implementation's news tab. The panel is displayed naturally with a
white background, so, while not enforced, it is generally recommended
that implementations provide a panel with a white background to match
the look and feel of other NewsService objects and
the overall manager UI.
The panel is displayed in a Swing layout, so if desired, Swing
components may be returned and will be appropriately managed. If a
swing component is used, the package must remember to declare the
Import-Package header in the bundle manifest with the
javax.swing package.
No information should be downloaded, nor complex information
processed, until execution of the run() method. This
should simply provide a relatively empty panel which will be filled
by a future call to run().
run()void setHyperlinkHandler(BrowserPopupCreator creator)
Sets the hyperlink handler for this news service. The news service should call the popup creator to create a popup web browser whenever a user clicks on a link.
It is strongly advised that this not be used for automated popups. Only popups intentionally triggered by the user should be handled.
Note that this method is NOT guaranteed to be called by the core. If the core cannot identify the appropriate method to create a popup window, it will not call this method. As such, the module must be prepared to ignore hyperlink requests if it has not yet received this call.
creator - the BrowserPopupCreator object that
should handle hyperlink requests.void run()
NewsService
implementation should perform the majority of its work, including
the actual downloading of information. This method should
"fill in" the information for the panel specified in a former call
to getNewsPanel()
run in interface java.lang.RunnablegetNewsPanel()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||