org.mozilla.jrex.ui
Class JRexCanvas

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Canvas
          extended byorg.mozilla.jrex.ui.JRexCanvas
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class JRexCanvas
extends Canvas

JRexCanvas is the browser component. This component wraps the nsWebBrowser and related interfaces of mozilla embedding. It allows listening to follwing events:

The Mouse and Key events are posted directly into Java's SystemEvent queue. So there is no specific Mouse and Key Listener for JRexCanvas. All the event except URIContentListener are mulitcast events. i.e only one URIContentListener can be added to a browser component. Listening to ToolTip events not enabled at present. It is used only for internal use. It allows operation related to Navigation, Edit and Print actions.

Version:
1.0 see org.mozilla.jrex.navigation.WebNavigation
Author:
C.N.Medappa
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Canvas
Canvas.AccessibleAWTCanvas
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
protected JRexCanvas(boolean doRrealize, int waitKey)
          Constructor to create JRexCanvas.
 
Method Summary
static void abortBrowserCreation(int waitKey)
          This function is used to discard a window creation request from embedding engine.
 void addContextMenuListener(ContextMenuListener contextMenuListener)
          Adds the specified ContextMenu listener to receive ContextMenu events from this component.
 void addHistoryListener(HistoryListener historyListener)
          Adds the specified History listener to receive History events from this component.
 void addKeyListener(KeyListener l)
          Adds the specified key listener to receive key events from this component.
 void addKeyListenerInternal()
           
 void addMouseListener(MouseListener l)
          Adds the specified mouse listener to receive mouse events from this component.
 void addMouseListenerInternal()
           
 void addMouseMotionListener(MouseMotionListener l)
          Adds the specified mouse motion listener to receive mouse motion events from this component.
 void addMouseMotionListenerInternal()
           
 void addNotify()
          Creates the peer of the JRexCanvas.
 void addProgressListener(ProgressListener progressListener)
          Adds the specified progress listener to receive progress events from this component.
 void addURIContentListener(URIContentListener uriContentListener)
          Adds the specified URIContent listener to receive URIContent events from this component.
 void browserRealized()
          Invoked to indicate that browser peer has completed realization.
 void cancelPrint()
          Invoked to cancel an ongoing print request.
 void cancelPrintPreview()
          Invoked to cancel an print preview.
 boolean canCopy()
          Indicates whether an copy operation can be done.
 boolean canCopyImageContents()
          Indicates whether an copy ImageContents operation can be done.
 boolean canCopyImageLocation()
          Indicates whether an copy Imagelocation operation can be done.
 boolean canCopyLinkLocation()
          Indicates whether an copy linklocation operation can be done.
 boolean canCut()
          Indicates whether an cut operation can be done.
 boolean canDelete()
          Indicates whether an Delete operation can be done.
 boolean canPaste()
          Indicates whether an Paste operation can be done.
 boolean canRedo()
          Indicates whether an redo operation can be done.
 boolean canUndo()
          Indicates whether an undo operation can be done.
 void copy()
          Invoked to copy selected text.
 void copyImageContents()
          Invoked to copy ImageContents.
 void copyImageLocation()
          Invoked to copy selected ImageLocation.
 void copyLinkLocation()
          Invoked to copy selected LinkLocation.
static JRexCanvas createBrowserComponent(boolean doRrealize)
          Use this function to create a JRexCanvas.
static JRexCanvas createBrowserComponent(boolean doRrealize, int waitKey)
          Use this function to create a JRexCanvas.
 void cut()
          Invoked to cut selected text.
 void delete()
          Invoked to delete selected text.
 void find()
          Invoked to find a given text.
 void findAgain()
          Invoked to repeat previous find.
 Rectangle getBounds()
          Gets the bounds of this component in the form of a Rectangle object.
 ContextMenuListener[] getContextMenuListeners()
          Returns an array of all the ContextMenu listeners registered on this component.
 HistoryListener[] getHistoryListeners()
          Returns an array of all the History listeners registered on this component.
 int getJRexPeer()
          Return peer component associated with JRexCanvas.
 String getJRexWindowTitle()
          Gets the JRex Window Title.
 Dimension getMinimumSize()
          Gets the mininimum size of this component.
 WebNavigation getNavigator()
          Returns the navigator assocaiated with the browser component.
 Dimension getPreferredSize()
          Gets the preferred size of this component.
 int getPrintPreviewNumPages()
          Gets the number of print preview pages.
 ProgressListener[] getProgressListeners()
          Returns an array of all the progress listeners registered on this component.
 Dimension getSize()
          Returns the size of this object in the form of a Dimension object.
 boolean isEnabled()
          Determines whether this component is enabled.
 boolean isPrinting()
          Indicates whether a print is under progress.
 boolean isPrintPreviewing()
          Indicates whether a print preview is under progress.
 boolean isVisible()
          Determines whether this component should be visible when its parent is visible.
 void pageSetup()
          Invoked to do print PageSetup.
 void paint(Graphics g)
          Paints the JRexCanvas by signalling Repaint to the peer component.
 void paste()
          Invoked to paste text from clipboard.
 void print(boolean prompt, boolean showProgress)
          Invoked to print the current page shown by the browser
 void printPreview(boolean shrinkToFit, boolean isLandScape)
          Invoked to Preview the current page shown by the browser
 void printPreviewNavigate(int navType, int pageNum)
          Invoked to nagivate in print preview mode.
 void processContextMenuEvent(ContextMenuEvent ce)
          Processes ContextMenu events occurring on this browser by dispatching them to any registered ContextMenuListener objects.
protected  void processFocusEvent(FocusEvent fe)
          Processes focus events occurring on this component by dispatching them to native peer.
 Boolean processHistoryEvent(HistoryEvent he)
          Processes history events occurring on this browser by dispatching them to any registered HistoryListener objects.
 void processProgressEvent(ProgressEvent pe)
          Processes progress events occurring on this browser by dispatching them to any registered ProgressListener objects.
 void processTooltipEvent(TooltipEvent tte)
           
 Object processURIContentEvent(URIContentEvent uce)
          Processes URIContent events occurring on this browser by dispatching them to registered URIContentListener object.
 void redo()
          Invoked to redo an edit operation.
 void removeContextMenuListener(ContextMenuListener contextMenuListener)
          Removes the specified ContextMenu listener so that it no longer receives ContextMenu events from this component.
 void removeHistoryListener(HistoryListener historyListener)
          Removes the specified History listener so that it no longer receives History events from this component.
 void removeKeyListener(KeyListener l)
          Removes the specified key listener so that it no longer receives key events from this component.
 void removeMouseListener(MouseListener l)
          Removes the specified mouse listener so that it no longer receives mouse events from this component.
 void removeMouseMotionListener(MouseMotionListener l)
          Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component.
 void removeNotify()
          Destroys the peer of the JRexCanvas.
 void removeProgressListener(ProgressListener progressListener)
          Removes the specified progress listener so that it no longer receives progress events from this component.
 void removeURIContentListener()
          Removes the URIContent listener so that it no longer receives URIContent events from this component.
 void selectAll()
          Invoked to select all text in an control.
 void selectNone()
          Invoked to clear all selection in an control.
 void setBounds(int x, int y, int width, int height)
          Moves and resizes this component.
 void setEnabled(boolean enable)
          Enables or disables this component, depending on the value of the parameter enable.
 void setJRexWindowTitle(String title)
          Sets the JRex Window Title.
 void setVisible(boolean visible)
          Sets the visible state of the JRexCanvas.
 void undo()
          Invoked to undo an edit operation.
 void update(Graphics g)
          Simply calls paint function.
 
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JRexCanvas

protected JRexCanvas(boolean doRrealize,
                     int waitKey)
Constructor to create JRexCanvas.

Parameters:
doRrealize - true indicates that peer will be realized from java.
waitKey - The unique-id associated with JRexCanvas creation. this is used by WindowManager.
Method Detail

createBrowserComponent

public static JRexCanvas createBrowserComponent(boolean doRrealize)
Use this function to create a JRexCanvas.

Parameters:
doRrealize - true to realize peer from java.

createBrowserComponent

public static JRexCanvas createBrowserComponent(boolean doRrealize,
                                                int waitKey)
Use this function to create a JRexCanvas. This function is meant for WindowManger to handle WindowCreation request from embedding engine.

Parameters:
doRrealize - true to realize peer from java. Note:- doRrealize should be false for WindowCreation request from embedding engine to avoid deadlock(Perticluarly when dealing with modal dialogs).
waitKey - The unique-id associated with JRexCanvas creation. this is used by WindowManager.

getJRexPeer

public int getJRexPeer()
Return peer component associated with JRexCanvas.


addNotify

public void addNotify()
Creates the peer of the JRexCanvas. If doRrealize is set to true the native component is realized and made visible. This function is also used to associate the JRex peer with java canvas peer in windows platform.

See Also:
Canvas.addNotify()

abortBrowserCreation

public static void abortBrowserCreation(int waitKey)
This function is used to discard a window creation request from embedding engine. This will notify the native counterpart to abort window creation request identified by id waitKey This function is intended to be used by WindowManager.


browserRealized

public void browserRealized()
Invoked to indicate that browser peer has completed realization. This function is intended to be used by WindowManager.


processFocusEvent

protected void processFocusEvent(FocusEvent fe)
Processes focus events occurring on this component by dispatching them to native peer.

See Also:
Component.processFocusEvent(FocusEvent)

paint

public void paint(Graphics g)
Paints the JRexCanvas by signalling Repaint to the peer component. This function is also used to associate the JRex peer with java canvas peer in *nix platform. since the java.awt.Component's addnotify function actualy does not create a java peer component in addnotify call.

Parameters:
g - the specified Graphics context
See Also:
Component.paint(Graphics)

update

public void update(Graphics g)
Simply calls paint function.

Parameters:
g - the specified Graphics context
See Also:
paint(Graphics)

removeNotify

public void removeNotify()
Destroys the peer of the JRexCanvas.

See Also:
Component.removeNotify()

setVisible

public void setVisible(boolean visible)
Sets the visible state of the JRexCanvas.

Parameters:
visible - if true, shows this JRexCanvas peer; otherwise, hides it

isVisible

public boolean isVisible()
Determines whether this component should be visible when its parent is visible.

See Also:
setVisible(boolean)

setEnabled

public void setEnabled(boolean enable)
Enables or disables this component, depending on the value of the parameter enable.


isEnabled

public boolean isEnabled()
Determines whether this component is enabled.

See Also:
setEnabled(boolean)

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Moves and resizes this component. The new location of the top-left corner is specified by x and y, and the new size is specified by width and height.

Parameters:
x - the new x-coordinate of this component
y - the new y-coordinate of this component
width - the new width of this component
height - the new height of this component
See Also:
getBounds()

getBounds

public Rectangle getBounds()
Gets the bounds of this component in the form of a Rectangle object. The bounds specify this component's width, height, and location relative to its parent.

Returns:
a rectangle indicating this component's bounds
See Also:
setBounds(int, int, int, int)

getMinimumSize

public Dimension getMinimumSize()
Gets the mininimum size of this component.

See Also:
getSize(), LayoutManager

getSize

public Dimension getSize()
Returns the size of this object in the form of a Dimension object. The height field of the Dimension object contains this objects's height, and the width field of the Dimension object contains this object's width.

Returns:
a Dimension object that indicates the size of this component; null if this object is not on the screen

getPreferredSize

public Dimension getPreferredSize()
Gets the preferred size of this component.

Returns:
a dimension object indicating this component's preferred size
See Also:
getSize()

getJRexWindowTitle

public String getJRexWindowTitle()
Gets the JRex Window Title.

Returns:
the tittle associated with the browser component
See Also:
setJRexWindowTitle(java.lang.String)

setJRexWindowTitle

public void setJRexWindowTitle(String title)
Sets the JRex Window Title.

Parameters:
title - the tittle to be associated with the browser component
See Also:
getJRexWindowTitle()

getNavigator

public WebNavigation getNavigator()
Returns the navigator assocaiated with the browser component. see org.mozilla.jrex.navigation.WebNavigation


addKeyListenerInternal

public void addKeyListenerInternal()

addKeyListener

public void addKeyListener(KeyListener l)
Adds the specified key listener to receive key events from this component. If listener l is null, no exception is thrown and no action is performed.

Parameters:
l - the key listener.
See Also:
KeyEvent, KeyListener, removeKeyListener(java.awt.event.KeyListener), Component.getKeyListeners()

addMouseListenerInternal

public void addMouseListenerInternal()

addMouseListener

public void addMouseListener(MouseListener l)
Adds the specified mouse listener to receive mouse events from this component. If listener l is null, no exception is thrown and no action is performed.

Parameters:
l - the mouse listener
See Also:
MouseEvent, MouseListener, removeMouseListener(java.awt.event.MouseListener), Component.getMouseListeners()

addMouseMotionListenerInternal

public void addMouseMotionListenerInternal()

addMouseMotionListener

public void addMouseMotionListener(MouseMotionListener l)
Adds the specified mouse motion listener to receive mouse motion events from this component. If listener l is null, no exception is thrown and no action is performed.

Parameters:
l - the mouse motion listener
See Also:
MouseEvent, MouseMotionListener, removeMouseMotionListener(java.awt.event.MouseMotionListener), Component.getMouseMotionListeners()

addProgressListener

public void addProgressListener(ProgressListener progressListener)
Adds the specified progress listener to receive progress events from this component. If listener progressListener is null, no exception is thrown and no action is performed.

Parameters:
progressListener - the Progress listener
See Also:
ProgressEvent, removeProgressListener(org.mozilla.jrex.event.progress.ProgressListener), getProgressListeners()

getProgressListeners

public ProgressListener[] getProgressListeners()
Returns an array of all the progress listeners registered on this component.

Returns:
all of this component's ProgressListeners or an empty array if no progress listeners are currently registered
See Also:
addProgressListener(org.mozilla.jrex.event.progress.ProgressListener), removeProgressListener(org.mozilla.jrex.event.progress.ProgressListener)

addContextMenuListener

public void addContextMenuListener(ContextMenuListener contextMenuListener)
Adds the specified ContextMenu listener to receive ContextMenu events from this component. If listener contextMenuListener is null, no exception is thrown and no action is performed.

Parameters:
contextMenuListener - the ContextMenu listener
See Also:
ContextMenuEvent, removeContextMenuListener(org.mozilla.jrex.event.context.ContextMenuListener), getContextMenuListeners()

getContextMenuListeners

public ContextMenuListener[] getContextMenuListeners()
Returns an array of all the ContextMenu listeners registered on this component.

Returns:
all of this component's ContextMenuListeners or an empty array if no ContextMenu listeners are currently registered
See Also:
addContextMenuListener(org.mozilla.jrex.event.context.ContextMenuListener), removeContextMenuListener(org.mozilla.jrex.event.context.ContextMenuListener)

addHistoryListener

public void addHistoryListener(HistoryListener historyListener)
Adds the specified History listener to receive History events from this component. If listener historyListener is null, no exception is thrown and no action is performed.

Parameters:
historyListener - the History listener
See Also:
HistoryEvent, removeHistoryListener(org.mozilla.jrex.event.history.HistoryListener), getHistoryListeners()

getHistoryListeners

public HistoryListener[] getHistoryListeners()
Returns an array of all the History listeners registered on this component.

Returns:
all of this component's HistoryListeners or an empty array if no History listeners are currently registered
See Also:
addHistoryListener(org.mozilla.jrex.event.history.HistoryListener), removeHistoryListener(org.mozilla.jrex.event.history.HistoryListener)

addURIContentListener

public void addURIContentListener(URIContentListener uriContentListener)
Adds the specified URIContent listener to receive URIContent events from this component. If listener uriContentListener is null, no exception is thrown and no action is performed. If listener was already added the uriContentListener will relace it.

Parameters:
uriContentListener - the URIContent listener
See Also:
URIContentEvent, removeURIContentListener()

removeKeyListener

public void removeKeyListener(KeyListener l)
Removes the specified key listener so that it no longer receives key events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed. If list of KeyListeners is empty, native peer is requested to remove the KeyListener.

Parameters:
l - the key listener
See Also:
KeyEvent, KeyListener, addKeyListener(java.awt.event.KeyListener), Component.getKeyListeners()

removeMouseListener

public void removeMouseListener(MouseListener l)
Removes the specified mouse listener so that it no longer receives mouse events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed. If list of MouseListener is empty, native peer is requested to remove the MouseListener.

Parameters:
l - the mouse listener
See Also:
MouseEvent, MouseListener, addMouseListener(java.awt.event.MouseListener), Component.getMouseListeners()

removeMouseMotionListener

public void removeMouseMotionListener(MouseMotionListener l)
Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed. If list of MouseMotionListener is empty, native peer is requested to remove the MouseMotionListener.

Parameters:
l - the mouse motion listener
See Also:
MouseEvent, MouseMotionListener, addMouseMotionListener(java.awt.event.MouseMotionListener), Component.getMouseMotionListeners()

removeProgressListener

public void removeProgressListener(ProgressListener progressListener)
Removes the specified progress listener so that it no longer receives progress events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener progressListener is null, no exception is thrown and no action is performed. If list of ProgressListener is empty, native peer is requested to remove the ProgressListener.

Parameters:
progressListener - the progress listener
See Also:
ProgressEvent, addProgressListener(org.mozilla.jrex.event.progress.ProgressListener), getProgressListeners()

removeContextMenuListener

public void removeContextMenuListener(ContextMenuListener contextMenuListener)
Removes the specified ContextMenu listener so that it no longer receives ContextMenu events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener contextMenuListener is null, no exception is thrown and no action is performed. If list of ContextMenuListener is empty, native peer is requested to remove the ContextMenuListener.

Parameters:
contextMenuListener - the ContextMenu listener
See Also:
ContextMenuEvent, addContextMenuListener(org.mozilla.jrex.event.context.ContextMenuListener), getContextMenuListeners()

removeHistoryListener

public void removeHistoryListener(HistoryListener historyListener)
Removes the specified History listener so that it no longer receives History events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener historyListener is null, no exception is thrown and no action is performed. If list of HistoryListener is empty, native peer is requested to remove the HistoryListener.

Parameters:
historyListener - the History listener
See Also:
HistoryEvent, addHistoryListener(org.mozilla.jrex.event.history.HistoryListener), getHistoryListeners()

removeURIContentListener

public void removeURIContentListener()
Removes the URIContent listener so that it no longer receives URIContent events from this component. This method performs no function, nor does it throw an exception, if the listener was not previously added to this component. Native peer is requested to remove the URIContentListener.

See Also:
URIContentEvent, addURIContentListener(org.mozilla.jrex.event.uricontent.URIContentListener)

processProgressEvent

public void processProgressEvent(ProgressEvent pe)
Processes progress events occurring on this browser by dispatching them to any registered ProgressListener objects.

This method is not called unless progress events are enabled for this browser. Progress events are enabled when an ProgressListener object is registered via addProgressListener.

Parameters:
pe - the Progress event
See Also:
ProgressListener

processContextMenuEvent

public void processContextMenuEvent(ContextMenuEvent ce)
Processes ContextMenu events occurring on this browser by dispatching them to any registered ContextMenuListener objects.

This method is not called unless ContextMenu events are enabled for this browser. ContextMenu events are enabled when an ContextMenuListener object is registered via addContextMenuListener.

Parameters:
ce - the ContextMenu event
See Also:
ContextMenuListener

processHistoryEvent

public Boolean processHistoryEvent(HistoryEvent he)
Processes history events occurring on this browser by dispatching them to any registered HistoryListener objects.

This method is not called unless history events are enabled for this browser. History events are enabled when an HistoryListener object is registered via addHistoryListener.

Parameters:
he - the History event
Returns:
Boolean appropriate can's depending on event.
See Also:
HistoryListener

processURIContentEvent

public Object processURIContentEvent(URIContentEvent uce)
Processes URIContent events occurring on this browser by dispatching them to registered URIContentListener object.

This method is not called unless URIContent events are enabled for this browser. URIContent events are enabled when an URIContentListener object is registered via addURIContentListener.

Parameters:
uce - the URIContent event
See Also:
URIContentListener

processTooltipEvent

public void processTooltipEvent(TooltipEvent tte)

print

public void print(boolean prompt,
                  boolean showProgress)
           throws JRexException
Invoked to print the current page shown by the browser

Parameters:
prompt - If true system will prompt with print dialog.
showProgress - If true print progress dialog is shown.
Throws:
JRexException

cancelPrint

public void cancelPrint()
                 throws JRexException
Invoked to cancel an ongoing print request.

Throws:
JRexException
See Also:
isPrinting()

isPrinting

public boolean isPrinting()
                   throws JRexException
Indicates whether a print is under progress.

Throws:
JRexException
See Also:
cancelPrint(), print(boolean, boolean)

printPreview

public void printPreview(boolean shrinkToFit,
                         boolean isLandScape)
                  throws JRexException
Invoked to Preview the current page shown by the browser

Parameters:
shrinkToFit - If true Preview will shrink to fit to the browser component view.
isLandScape - If true Preview will be in LandScape view.
Throws:
JRexException
See Also:
print(boolean, boolean)

cancelPrintPreview

public void cancelPrintPreview()
                        throws JRexException
Invoked to cancel an print preview.

Throws:
JRexException
See Also:
isPrintPreviewing()

isPrintPreviewing

public boolean isPrintPreviewing()
                          throws JRexException
Indicates whether a print preview is under progress.

Throws:
JRexException
See Also:
cancelPrintPreview(), printPreview(boolean, boolean)

getPrintPreviewNumPages

public int getPrintPreviewNumPages()
                            throws JRexException
Gets the number of print preview pages.

Throws:
JRexException
See Also:
printPreview(boolean, boolean)

printPreviewNavigate

public void printPreviewNavigate(int navType,
                                 int pageNum)
                          throws JRexException
Invoked to nagivate in print preview mode.

Parameters:
navType - the type of navigation to perform.
pageNum - the page number to navigate to.
Throws:
JRexException
See Also:
see PrintPreview Navigation Constants Above.

pageSetup

public void pageSetup()
               throws JRexException
Invoked to do print PageSetup.

Throws:
JRexException
See Also:
print(boolean, boolean)

canUndo

public boolean canUndo()
                throws JRexException
Indicates whether an undo operation can be done.

Throws:
JRexException
See Also:
undo()

canRedo

public boolean canRedo()
                throws JRexException
Indicates whether an redo operation can be done.

Throws:
JRexException
See Also:
redo()

canCut

public boolean canCut()
               throws JRexException
Indicates whether an cut operation can be done.

Throws:
JRexException
See Also:
cut()

canCopy

public boolean canCopy()
                throws JRexException
Indicates whether an copy operation can be done.

Throws:
JRexException
See Also:
copy()

canCopyLinkLocation

public boolean canCopyLinkLocation()
                            throws JRexException
Indicates whether an copy linklocation operation can be done.

Throws:
JRexException
See Also:
copyLinkLocation()

canCopyImageLocation

public boolean canCopyImageLocation()
                             throws JRexException
Indicates whether an copy Imagelocation operation can be done.

Throws:
JRexException
See Also:
copyImageLocation()

canCopyImageContents

public boolean canCopyImageContents()
                             throws JRexException
Indicates whether an copy ImageContents operation can be done.

Throws:
JRexException
See Also:
copyImageContents()

canPaste

public boolean canPaste()
                 throws JRexException
Indicates whether an Paste operation can be done.

Throws:
JRexException
See Also:
paste()

canDelete

public boolean canDelete()
                  throws JRexException
Indicates whether an Delete operation can be done.

Throws:
JRexException
See Also:
delete()

undo

public void undo()
          throws JRexException
Invoked to undo an edit operation.

Throws:
JRexException

redo

public void redo()
          throws JRexException
Invoked to redo an edit operation.

Throws:
JRexException

cut

public void cut()
         throws JRexException
Invoked to cut selected text.

Throws:
JRexException

copy

public void copy()
          throws JRexException
Invoked to copy selected text.

Throws:
JRexException

copyLinkLocation

public void copyLinkLocation()
                      throws JRexException
Invoked to copy selected LinkLocation.

Throws:
JRexException

copyImageLocation

public void copyImageLocation()
                       throws JRexException
Invoked to copy selected ImageLocation.

Throws:
JRexException

copyImageContents

public void copyImageContents()
                       throws JRexException
Invoked to copy ImageContents.

Throws:
JRexException

paste

public void paste()
           throws JRexException
Invoked to paste text from clipboard.

Throws:
JRexException

selectAll

public void selectAll()
               throws JRexException
Invoked to select all text in an control.

Throws:
JRexException

selectNone

public void selectNone()
                throws JRexException
Invoked to clear all selection in an control.

Throws:
JRexException

delete

public void delete()
            throws JRexException
Invoked to delete selected text.

Throws:
JRexException

find

public void find()
          throws JRexException
Invoked to find a given text.

Throws:
JRexException

findAgain

public void findAgain()
               throws JRexException
Invoked to repeat previous find.

Throws:
JRexException


Copyright © 2004 C.N.Medappa. All Rights Reserved.