com.borland.primetime.ide
Interface BrowserListener


public interface BrowserListener
extends java.util.EventListener

The BrowserListener interface makes up the Browser's event set. BrowserListeners can listen to individual Browsers using the standard registration method:
abrowserinstance.addBrowserListener(...)

or to all Browsers by using the static registration method:
Browser.addStaticBrowserListener(...)

See Also:
Browser, NodeViewer, Node

Method Summary
 void browserActivated(Browser browser)
          Invoked when a Browser window is activated.
 void browserClosed(Browser browser)
          Invoked when all listeners agree that close is okay.
 void browserClosing(Browser browser)
          Invoked in response to a close request.
 void browserDeactivated(Browser browser)
          Invoked when the Browser window loses activation to another Browser, or to another application.
 void browserNodeActivated(Browser browser, Node node)
          Invoked when the Browser's 'active' Node is changed, such as when the user switches from one file to another.
 void browserNodeClosed(Browser browser, Node node)
          Invoked when a Node is closed.
 void browserOpened(Browser browser)
          Invoked when a Browser is first opened.
 void browserProjectActivated(Browser browser, Project project)
          Invoked when the Browser's 'active' Project has just changed, such as when the user switches from one file belonging to ProjectA to another file that belongs to ProjectB.
 void browserProjectClosed(Browser browser, Project project)
          Invoked when a Project is closed.
 void browserViewerActivated(Browser browser, Node node, NodeViewer viewer)
          Invoked when the Browser's active viewer is changed, such as when the user switches from the source tab to the design tab.
 void browserViewerDeactivating(Browser browser, Node node, NodeViewer viewer)
          Invoked when the Browser's viewer is about to be changed, ie.
 

Method Detail

browserOpened

public void browserOpened(Browser browser)
Invoked when a Browser is first opened. This event is fired only once per Browser.
Parameters:
browser - The Browser that just opened.

browserActivated

public void browserActivated(Browser browser)
Invoked when a Browser window is activated.
Parameters:
browser - The Browser that was just activated.

browserDeactivated

public void browserDeactivated(Browser browser)
Invoked when the Browser window loses activation to another Browser, or to another application.
Parameters:
browser - The Browser that was just deactivated.

browserClosing

public void browserClosing(Browser browser)
                    throws VetoException
Invoked in response to a close request. Listener may veto Browser shutdown by throwing a VetoException, and the Browser will not be closed.
Parameters:
browser - The Browser that is trying to close.
Throws:
VetoException - A VetoException may be thrown if a listner doesn't want the Browser to close.

browserClosed

public void browserClosed(Browser browser)
Invoked when all listeners agree that close is okay. This is a notification that the Browser has closed (is about to, and you can't stop it).
Parameters:
browser - The Browser that is about to close.

browserProjectActivated

public void browserProjectActivated(Browser browser,
                                    Project project)
Invoked when the Browser's 'active' Project has just changed, such as when the user switches from one file belonging to ProjectA to another file that belongs to ProjectB.
Parameters:
browser - The Browser whose 'active' Project has just changed.
node - The Browser's new 'active' Project. - MAY BE NULL!

browserProjectClosed

public void browserProjectClosed(Browser browser,
                                 Project project)
Invoked when a Project is closed.
Parameters:
browser - The Browser whose 'active' Project has just changed.
node - The Browser's new 'active' Project. - MAY BE NULL!

browserNodeActivated

public void browserNodeActivated(Browser browser,
                                 Node node)
Invoked when the Browser's 'active' Node is changed, such as when the user switches from one file to another.
Parameters:
browser - The Browser whose 'active' Node has just changed.
node - The Browser's new 'active' Node. - MAY BE NULL!

browserNodeClosed

public void browserNodeClosed(Browser browser,
                              Node node)
Invoked when a Node is closed.
Parameters:
browser - The Browser containing the Node that closed
node - The Node that closed

browserViewerActivated

public void browserViewerActivated(Browser browser,
                                   Node node,
                                   NodeViewer viewer)
Invoked when the Browser's active viewer is changed, such as when the user switches from the source tab to the design tab.
Parameters:
browser - The Browser whose viewer has changed.
node - The Node whose viewer has just changed.
viewer - The NodeViewer that is newly displaying the Node - MAY BE NULL!

browserViewerDeactivating

public void browserViewerDeactivating(Browser browser,
                                      Node node,
                                      NodeViewer viewer)
                               throws VetoException
Invoked when the Browser's viewer is about to be changed, ie. the user switches from the source tab to the design tab. A listener can veto the change by throwing a VetoException, and the viewer will not be changed.
Parameters:
browser - The Browser whose viewer is changing.
node - The Node whose viewer is changing.
viewer - The NodeViewer that is currently displaying the Node.
Throws:
VetoException - A VetoException may be thrown if a listener doesn't want the viewer to change.