uk.ac.kcl.cch.jb.pliny.imageRes.actions
Class BrowserButtonForSetup

java.lang.Object
  extended byuk.ac.kcl.cch.jb.pliny.imageRes.actions.BrowserButtonForSetup
All Implemented Interfaces:
IBrowserToolbarContribution

public class BrowserButtonForSetup
extends Object
implements IBrowserToolbarContribution

an Action-like class to be displayed in the Pliny browser that, when clicked, harvests suitable images from the current HTML page and sets up Image Resource that point at them.

This is done by invoking methods in ImageEditorResourceExtensionProcessor

Author:
John Bradley

Constructor Summary
BrowserButtonForSetup()
           
 
Method Summary
 void run(org.eclipse.ui.IWorkbenchPage page)
          When the browser use clicks on the contributed button the browser will call this code, passing as a parameter its workbench Page.
 void setTitle(String title)
          Each time the browser processes the web page and collects the page title it will call this method to provide the current web page's title to the implementor.
 void setupToolItem(org.eclipse.swt.widgets.ToolItem item)
          The browser calls this to get a button to display.
 void setUrl(URL url)
          Each time the browser user changes the current web page the browser will call this method to keep the implementing process informed about the current URL the user is seeing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrowserButtonForSetup

public BrowserButtonForSetup()
Method Detail

setupToolItem

public void setupToolItem(org.eclipse.swt.widgets.ToolItem item)
Description copied from interface: IBrowserToolbarContribution
The browser calls this to get a button to display. The implementor must define the provided ToolItem -- with an image or text label and other options for display of the button such as a tooltip.

Specified by:
setupToolItem in interface IBrowserToolbarContribution
Parameters:
item - ToolItem the browser will display

setTitle

public void setTitle(String title)
Description copied from interface: IBrowserToolbarContribution
Each time the browser processes the web page and collects the page title it will call this method to provide the current web page's title to the implementor.

Specified by:
setTitle in interface IBrowserToolbarContribution
Parameters:
title -

setUrl

public void setUrl(URL url)
Description copied from interface: IBrowserToolbarContribution
Each time the browser user changes the current web page the browser will call this method to keep the implementing process informed about the current URL the user is seeing.

Specified by:
setUrl in interface IBrowserToolbarContribution
Parameters:
url - URL the URL of the current displayed page

run

public void run(org.eclipse.ui.IWorkbenchPage page)
Description copied from interface: IBrowserToolbarContribution
When the browser use clicks on the contributed button the browser will call this code, passing as a parameter its workbench Page. The implementor should interpret this as a request to process the previously passed URL and title.

Specified by:
run in interface IBrowserToolbarContribution
Parameters:
page - IWorkbenchPage the browser's page