org.eclipse.actf.visualization.gui
Class GuiTargetWindowData

java.lang.Object
  extended by org.eclipse.actf.visualization.gui.GuiTargetWindowData
All Implemented Interfaces:
IModelService

public class GuiTargetWindowData
extends Object
implements IModelService


Field Summary
 
Fields inherited from interface org.eclipse.actf.model.ui.IModelService
ATTR_WINDOWHANDLE, EXTS_HTML, EXTS_ODF, MIMETYPES_HTML, MIMETYPES_ODF
 
Constructor Summary
GuiTargetWindowData(int hwnd, boolean isBrowser)
          Constructor of the class.
 
Method Summary
 ImagePositionInfo[] getAllImagePosition()
          Get all image position information within the content
 Object getAttribute(String name)
          Get corresponding Object with the specified key.
 String getCategory()
          Get category string for menu bar
 String getCurrentMIMEType()
          Get MIME type of the content
 Document getDocument()
          Get model of the content as Document.
 String getID()
          Get ID
 Document getLiveDocument()
          Get model of the content as Document.
 IModelServiceHolder getModelServiceHolder()
          Get IModelServiceHolder who owns this implementation
 IModelServiceScrollManager getScrollManager()
          Get IModelServiceScrollManager to scroll the content
 String[] getSupportExtensions()
          Get file extensions that are supported by this IModelService
 String[] getSupportMIMETypes()
          Get MIME types that are supported by this IModelService
 Composite getTargetComposite()
          Get the Composite that hold the content
 String getTitle()
          Get title
 String getURL()
          Get content URL as String
 boolean isBrowser()
          Check if this data source is Web browser
 void jumpToNode(Node target)
          Move current position to the specified Node
 void open(File target)
          Open specified File
 void open(String url)
          Open specified URL
 File saveDocumentAsHTMLFile(String file)
          Convert the Document into HTML and save into target file.
 File saveOriginalDocument(String file)
          Save the original Document into target file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuiTargetWindowData

public GuiTargetWindowData(int hwnd,
                           boolean isBrowser)
Constructor of the class.

Parameters:
hwnd - Window handle of the target window
isBrowser - set true if the target window is a Web browser
Method Detail

getCategory

public String getCategory()
Get category string for menu bar

Returns:
category

isBrowser

public boolean isBrowser()
Check if this data source is Web browser

Returns:
true if this data source is Web browser

getTitle

public String getTitle()
Description copied from interface: IModelService
Get title

Specified by:
getTitle in interface IModelService
Returns:
title

getID

public String getID()
Description copied from interface: IModelService
Get ID

Specified by:
getID in interface IModelService
Returns:
ID

getAttribute

public Object getAttribute(String name)
Description copied from interface: IModelService
Get corresponding Object with the specified key. This method is used for implementation unique customization.

Specified by:
getAttribute in interface IModelService
Parameters:
name - target key
Returns:
corresponding Object with the specified key

getCurrentMIMEType

public String getCurrentMIMEType()
Description copied from interface: IModelService
Get MIME type of the content

Specified by:
getCurrentMIMEType in interface IModelService
Returns:
MIME type of the content

getDocument

public Document getDocument()
Description copied from interface: IModelService
Get model of the content as Document. This method returns Document based on the original source of the content.

Specified by:
getDocument in interface IModelService
Returns:
Document

getLiveDocument

public Document getLiveDocument()
Description copied from interface: IModelService
Get model of the content as Document. This method returns runtime Document inside the Editor.

Specified by:
getLiveDocument in interface IModelService
Returns:
current Document

getScrollManager

public IModelServiceScrollManager getScrollManager()
Description copied from interface: IModelService
Get IModelServiceScrollManager to scroll the content

Specified by:
getScrollManager in interface IModelService
Returns:
scroll manager IModelServiceScrollManager

getSupportExtensions

public String[] getSupportExtensions()
Description copied from interface: IModelService
Get file extensions that are supported by this IModelService

Specified by:
getSupportExtensions in interface IModelService
Returns:
array of file extensions

getSupportMIMETypes

public String[] getSupportMIMETypes()
Description copied from interface: IModelService
Get MIME types that are supported by this IModelService

Specified by:
getSupportMIMETypes in interface IModelService
Returns:
array of MIME type

getTargetComposite

public Composite getTargetComposite()
Description copied from interface: IModelService
Get the Composite that hold the content

Specified by:
getTargetComposite in interface IModelService
Returns:
target Composite

getURL

public String getURL()
Description copied from interface: IModelService
Get content URL as String

Specified by:
getURL in interface IModelService
Returns:
content URL as String

jumpToNode

public void jumpToNode(Node target)
Description copied from interface: IModelService
Move current position to the specified Node

Specified by:
jumpToNode in interface IModelService
Parameters:
target - target Node

open

public void open(File target)
Description copied from interface: IModelService
Open specified File

Specified by:
open in interface IModelService
Parameters:
target - target File

open

public void open(String url)
Description copied from interface: IModelService
Open specified URL

Specified by:
open in interface IModelService
Parameters:
url - target URL

saveDocumentAsHTMLFile

public File saveDocumentAsHTMLFile(String file)
Description copied from interface: IModelService
Convert the Document into HTML and save into target file. Empty file will be generated if this method is not supported by the implementation.

Specified by:
saveDocumentAsHTMLFile in interface IModelService
Parameters:
file - target file path
Returns:
resulting File.

saveOriginalDocument

public File saveOriginalDocument(String file)
Description copied from interface: IModelService
Save the original Document into target file

Specified by:
saveOriginalDocument in interface IModelService
Parameters:
file - target file path
Returns:
resulting File

getAllImagePosition

public ImagePositionInfo[] getAllImagePosition()
Description copied from interface: IModelService
Get all image position information within the content

Specified by:
getAllImagePosition in interface IModelService
Returns:
array of ImagePositionInfo

getModelServiceHolder

public IModelServiceHolder getModelServiceHolder()
Description copied from interface: IModelService
Get IModelServiceHolder who owns this implementation

Specified by:
getModelServiceHolder in interface IModelService
Returns:
IModelServiceHolder