Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mozilla.jrex.ui
Class JRexToolBarImpl

    java.lang.Object
      org.mozilla.jrex.ui.JRexToolBarImpl

All Implemented Interfaces:
  ActionListener, EventListener, HistoryListener, JRexToolBar

public class JRexToolBarImpl
extends Object
implements JRexToolBar, ActionListener, HistoryListener

Class implementing JRexToolBar interface.

Version:
  1.0
Author:
  C.N.Medappa
See Also:
  `JRexToolBar`

Constructor Summary
`JRexToolBarImpl()` Don't use this function to create a JRexToolBar instance use JRexFactory.

Method Summary
`void` | `actionPerformed(ActionEvent ae)`
`void` | `addEntry(HistoryEvent event)` called to notify a listener when a new document is added to session history.
`JComponent` | `getToolBar()` Function to get the tool bar.
`boolean` | `goBack(HistoryEvent event)` called to notify a listener when the user presses the 'back' button of the browser OR when the user attempts to go back one page in history thro' other means, from javascript or using nsIWebNavigation For this event the HistoryEvent's getEventParam will return uri of the previous page which is to be loaded.
`boolean` | `goForward(HistoryEvent event)` called to notify a listener when the user presses the 'forward' button of the browser OR when the user attempts to go forward one page in history thro' other means, from javascript or using nsIWebNavigation For this event the HistoryEvent's getEventParam will return uri of the next page which is to be loaded.
`boolean` | `goToIndex(HistoryEvent event)` called to notify a listener when the user visits a page using the 'Go' menu of the browser OR when the user attempts to go to a page at a particular index through other means, like from javascript or using nsIWebNavigation For this event the HistoryEvent's getEventParam will return IntegerEventParam instance with 'int' data containing index in history of the document to be loaded and 'uri' containing uri of the document to be loaded.
`boolean` | `purge(HistoryEvent event)` called to notify a listener when documents are removed from session history.
`boolean` | `reload(HistoryEvent event)` called to notify a listener when the user presses the 'reload' button of the browser OR when the user attempts to reload the current document through other means, like from javascript or using nsIWebNavigation For this event the HistoryEvent's getEventParam will return IntegerEventParam instance with 'int' data containing reloadFlags and 'uri' containing uri of the current document to be reloaded.
`void` | `setBrowser(JRexCanvas browser)` Invoked to set the browser component associated with tool bar.
`void` | `setModeAndChrome(int mode, long chromeFlags)` Invoked to set the WindowManager MODE in use and chrome flags associated with the browser component.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JRexToolBarImpl

    public JRexToolBarImpl()

  Don't use this function to create a JRexToolBar instance use JRexFactory.

See Also:
  `JRexFactory`

Method Detail

### setModeAndChrome

    public void setModeAndChrome(int mode,
                                 long chromeFlags)

  Description copied from interface: `JRexToolBar`
  Invoked to set the WindowManager MODE in use and chrome flags associated with the browser component.

  Specified by:
    `setModeAndChrome` in interface `JRexToolBar`

### setBrowser

    public void setBrowser(JRexCanvas browser)

  Description copied from interface: `JRexToolBar`
  Invoked to set the browser component associated with tool bar.

  Specified by:
    `setBrowser` in interface `JRexToolBar`

### getToolBar

    public JComponent getToolBar()

  Description copied from interface: `JRexToolBar`
  Function to get the tool bar. The toolbar will be based on WindowManager MODE and chrome flags associated with the browser component.

  Specified by:
    `getToolBar` in interface `JRexToolBar`

### actionPerformed

    public void actionPerformed(ActionEvent ae)

  Specified by:
    `actionPerformed` in interface `ActionListener`

### addEntry

    public void addEntry(HistoryEvent event)

  Description copied from interface: `HistoryListener`
  called to notify a listener when a new document is added to session history. New documents are added to session history by docshell when new pages are loaded in a frame or content area. For this event the HistoryEvent's getEventParam will return uri of the document to be added to session history

  Specified by:
    `addEntry` in interface `HistoryListener`
  See Also:
    `HistoryEvent.getEventParam()`

### goBack

    public boolean goBack(HistoryEvent event)

  Description copied from interface: `HistoryListener`
  called to notify a listener when the user presses the 'back' button of the browser OR when the user attempts to go back one page in history thro' other means, from javascript or using nsIWebNavigation For this event the HistoryEvent's getEventParam will return uri of the previous page which is to be loaded.

  Specified by:
    `goBack` in interface `HistoryListener`
  Returns:
    A boolean flag returned by the listener to indicate if the back operation is to be aborted or continued. If the listener returns `true`, it indicates that the back operation can be continued else back operation will be aborted. This is a mechanism for the listener to control user's operations with history.
  See Also:
    `HistoryEvent.getEventParam()`

### goForward

    public boolean goForward(HistoryEvent event)

  Description copied from interface: `HistoryListener`
  called to notify a listener when the user presses the 'forward' button of the browser OR when the user attempts to go forward one page in history thro' other means, from javascript or using nsIWebNavigation For this event the HistoryEvent's getEventParam will return uri of the next page which is to be loaded.

  Specified by:
    `goForward` in interface `HistoryListener`
  Returns:
    A boolean flag returned by the listener to indicate if the forward operation is to be aborted or continued. If the listener returns `true`, it indicates that the forward operation can be continued else forward operation will be aborted. This is a mechanism for the listener to control user's operations with history.
  See Also:
    `HistoryEvent.getEventParam()`

### reload

    public boolean reload(HistoryEvent event)

  Description copied from interface: `HistoryListener`
  called to notify a listener when the user presses the 'reload' button of the browser OR when the user attempts to reload the current document through other means, like from javascript or using nsIWebNavigation For this event the HistoryEvent's getEventParam will return IntegerEventParam instance with 'int' data containing reloadFlags and 'uri' containing uri of the current document to be reloaded.

  Specified by:
    `reload` in interface `HistoryListener`
  Returns:
    A boolean flag returned by the listener to indicate if the reload operation is to be aborted or continued. If the listener returns `true`, it indicates that the reload operation can be continued else reload operation will be aborted. This is a mechanism for the listener to control user's operations with history.
  See Also:
    `IntegerEventParam`, `HistoryEvent.getEventParam()`

### goToIndex

    public boolean goToIndex(HistoryEvent event)

  Description copied from interface: `HistoryListener`
  called to notify a listener when the user visits a page using the 'Go' menu of the browser OR when the user attempts to go to a page at a particular index through other means, like from javascript or using nsIWebNavigation For this event the HistoryEvent's getEventParam will return IntegerEventParam instance with 'int' data containing index in history of the document to be loaded and 'uri' containing uri of the document to be loaded.

  Specified by:
    `goToIndex` in interface `HistoryListener`
  Returns:
    A boolean flag returned by the listener to indicate if the GotoIndex operation is to be aborted or continued. If the listener returns `true`, it indicates that the GotoIndex operation can be continued else GotoIndex operation will be aborted. This is a mechanism for the listener to control user's operations with history.
  See Also:
    `IntegerEventParam`, `HistoryEvent.getEventParam()`

### purge

    public boolean purge(HistoryEvent event)

  Description copied from interface: `HistoryListener`
  called to notify a listener when documents are removed from session history. Documents can be removed from session history for various reasons. For example to control the memory usage of the browser, to prevent users from loading documents from history, to erase evidence of prior page loads etc... For this event the HistoryEvent's getEventParam will return IntegerEventParam instance with 'int' data containing number of documents to be removed from session history.

  Specified by:
    `purge` in interface `HistoryListener`
  Returns:
    A boolean flag returned by the listener to indicate if the purge operation is to be aborted or continued. If the listener returns `true`, it indicates that the purge operation can be continued else purge operation will be aborted. This is a mechanism for the listener to control user's operations with history.
  See Also:
    `Note:- While purging history, the older documents are removed and newly loaded documents are kept. For example if there are 5 documents in history, and purge is called with 3 entries to be removed, then document 1, 2 and 3 are removed from history and most recently loaded document 4 and 5 are kept.`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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