|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.rssowl.controller.panel.BrowserPanel
public class BrowserPanel
This is the Web-Browser support for RSSOwl. It loads a Browser in a Composite and opens URLs.
Important Note: Dynamically disable/enable JavaScript in the Browser widget
on Windows with the following modifications:
BrowserPanel.java:
Line 276:
browser.setScriptDisabled(false);
Line 550:
browser.setScriptDisabled(!URLShop.isScriptAllowed(event.location));
Browser.java:
public void setScriptDisabled(boolean disabled) {
if (site != null)
((WebSite) site).disableScript = disabled;
}
WebSite.java:
boolean disableScript = false;
Line 417:
if (disableScript && dwAction == 5120 //0x1400 - URLACTION_SCRIPT_RUN//) {
policy = Browser.URLPOLICY_DISALLOW;
}
| Field Summary | |
|---|---|
(package private) boolean |
blockNavigation
|
(package private) Browser |
browser
|
private Composite |
browserPanel
|
private ToolItem |
itemDiscovery
|
private ToolItem |
itemHome
|
private ToolItem |
itemNewTab
|
private ToolItem |
itemReload
|
private ToolItem |
itemStop
|
private static java.lang.String |
JAVA_SCRIPT_PRINT
JavaScript command to print the current website of the Browser |
(package private) Text |
location
|
private MenuItem |
menuItemBackward
|
private MenuItem |
menuItemForward
|
private static boolean |
mozillaAvailable
Flag to check if Mozilla is available on Windows |
private static java.lang.String |
NO_MOZILLA_PROPERTY
DWord to disable the use of Mozilla on Windows |
private Composite |
parent
|
(package private) CTabItem |
parentTabItem
|
(package private) GUI |
rssOwlGui
|
(package private) java.lang.String |
saveHome
|
private boolean |
showControls
|
private boolean |
showNewTabControl
|
(package private) Label |
status
|
(package private) Label |
statusProgressBar
|
(package private) ToolItem |
toolItemBack
|
(package private) ToolItem |
toolItemForward
|
| Constructor Summary | |
|---|---|
BrowserPanel(GUI rssOwlGui,
Composite parent,
boolean showControls)
Instantiate a new BrowserPanel |
|
BrowserPanel(GUI rssOwlGui,
Composite parent,
CTabItem parentTabItem,
boolean showControls,
boolean showNewTabControl)
Instantiate a new BrowserPanel |
|
| Method Summary | |
|---|---|
private void |
addMenu(Browser browser)
|
void |
displayNews(NewsItem rssNewsItem)
Display HTML formatted news |
void |
dispose()
Dispose the browser |
Browser |
getBrowser()
Get the Browser widget |
Composite |
getBrowserPanel()
Get the browser panel |
Text |
getLocation()
Get the Location Text-Input field. |
void |
hideNoControlsBrowser()
Hide the Newstext Browser Panel |
private void |
initBrowser()
Init the browser |
private void |
initBrowserNoControls()
Create the browser to use with no controls |
private void |
initComponents()
Init all components |
private void |
initComponentsNoControls()
Init components without the controls |
(package private) void |
onProgressChange(ProgressEvent event)
Called whenever the Progress is changing |
(package private) void |
onProgressCompletion()
Called whenever the Progress is completed |
(package private) void |
onStatusTextChange(StatusTextEvent event)
Called whenever the Status Text is changing |
void |
openUrl(java.lang.String url)
Open a new URL in the browser |
boolean |
print()
Print the Browser using the JavaScript print() method |
void |
setBlockNavigation(boolean blockNav)
Set TRUE to block navigation in the browser widget. |
void |
setTabItem(CTabItem tabItem)
Sets the CTabItem this BrowserPanel is part of. |
private void |
setText(java.lang.String text)
Set HTML text to the browser |
private void |
setupFeedProtocolSupport(Browser browser)
Add Support for the Feed Protocol to the given Browser. |
(package private) void |
updateNavToolItems()
Update "Back" and "Forward" tool items |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String JAVA_SCRIPT_PRINT
private static boolean mozillaAvailable
private static final java.lang.String NO_MOZILLA_PROPERTY
private Composite browserPanel
private ToolItem itemDiscovery
private ToolItem itemHome
private ToolItem itemNewTab
private ToolItem itemReload
private ToolItem itemStop
private MenuItem menuItemForward
private MenuItem menuItemBackward
private Composite parent
private boolean showControls
private boolean showNewTabControl
boolean blockNavigation
Browser browser
ToolItem toolItemBack
ToolItem toolItemForward
Text location
CTabItem parentTabItem
GUI rssOwlGui
java.lang.String saveHome
Label status
Label statusProgressBar
| Constructor Detail |
|---|
public BrowserPanel(GUI rssOwlGui,
Composite parent,
boolean showControls)
rssOwlGui - The maincontrollerparent - The parent compositeshowControls - TRUE if the controls should be visible
public BrowserPanel(GUI rssOwlGui,
Composite parent,
CTabItem parentTabItem,
boolean showControls,
boolean showNewTabControl)
rssOwlGui - The maincontrollerparent - The parent compositeparentTabItem - The parent CTabItem containing the Browser if
availableshowControls - TRUE if the controls should be visibleshowNewTabControl - TRUE if the "Open new Tab" button should be
visible| Method Detail |
|---|
public void displayNews(NewsItem rssNewsItem)
rssNewsItem - News to displaypublic void dispose()
public Browser getBrowser()
public Composite getBrowserPanel()
public Text getLocation()
public void hideNoControlsBrowser()
public void openUrl(java.lang.String url)
url - URL of the webpagepublic boolean print()
public void setBlockNavigation(boolean blockNav)
blockNav - The blockNav to set.public void setTabItem(CTabItem tabItem)
tabItem - The CTabItem this Table is part of.private void initBrowser()
private void addMenu(Browser browser)
private void initBrowserNoControls()
private void initComponents()
private void initComponentsNoControls()
private void setText(java.lang.String text)
text - HTML codeprivate void setupFeedProtocolSupport(Browser browser)
browser - The Browser to add the Feed Protocol Support.void onProgressChange(ProgressEvent event)
event - The ProgressEventvoid onProgressCompletion()
void onStatusTextChange(StatusTextEvent event)
event - The StatusTextEventvoid updateNavToolItems()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||