This change-bundle implements the FULL proposal for this, as well as
covering some corner-cases not in the initial proposal.

I have yet to get the last stamp of approval from the EG, but I'm
confident we'll get it, so I'm checking it in now.

r=visvan.

SECTION: API Changes

M jsf-api/src/javax/faces/application/StateManager.java

- reword the class description for readability

- saveSerializedView

  Deprecate this.  Make it no-longer abstract.  Provide default impl
  that returns null.

- saveView

  new method.  Replaces saveSerializedView.  Provide default impl that
  calls through to saveSerializedView().


- writeState that takes Object

  new method.  Provide default impl:

+     * <p>For backwards compatability with existing
+     * <code>StateManager</code> implementations, the default
+     * implementation of this method checks if the argument is an
+     * instance of <code>Object []</code> of length greater than or
+     * equal to two.  If so, it creates a <code>SerializedView</code>
+     * instance with the tree structure coming frome element zero and
+     * the component state coming from element one and calls through to
+     * {@link
+     * #writeState(javax.faces.context.FacesContext,javax.faces.application.StateManager.SerializedView}.
+     * If not, does nothing.</p>

- getTreeStructureToSave
- getComponentStateToSave
- restoreTreeStructure
- restoreComponentState

  Deprecate these.  Provide default impl that returns null or no-ops.

- SerializedView

  Deprecate this.

M jsf-api/src/javax/faces/application/StateManagerWrapper.java

- add new methods.

M jsf-api/src/javax/faces/render/ResponseStateManager.java

- writeState that takes Object

  new method.

+     * <p>For backwards compatability with existing
+     * <code>ResponseStateManager</code> implementations, the default
+     * implementation of this method checks if the argument is an
+     * instance of <code>SerializedView</code>.  If so, it calls through
+     * to {@link
+     * #writeState(javax.faces.context.FacesContext,javax.faces.application.StateManager.SerializedView}.
+     * If not, does nothing.</p>

- writeState that takes SerializedView

+     * @deprecated This method has been replaced by {@link
+     * #writeState(javax.faces.context.FacesContext,java.lang.Object)}.
+     * The default implementation of this method does nothing.
+     *

- getState

  new method.

- getTreeStructureToRestore
- getComponentStateToRestore

  Deprecate these.  Provide default impl that returns null or no-ops.

SECTION: RI Changes

M jsf-ri/src/com/sun/faces/application/StateManagerImpl.java

  Provide implementations for deprecated methods that will be called by
  the default implementations of the new methods in StateManager.

  - saveSerializedView(): no functional change since last version

M jsf-ri/src/com/sun/faces/application/ViewHandlerImpl.java

- move the responsibility for doing the redirect to createView() from
  renderView(), since it was only designed to catch the initial request.

M jsf-ri/src/com/sun/faces/lifecycle/RestoreViewPhase.java

- introduce private isPostback() method.

+     * @return true if the request method is POST or PUT, or the method
+     * is GET but there are query parameters, or the request is not an
+     * instance of HttpServletRequest.

  Only call restoreView() if isPostback(), otherwise call createView().

M jsf-ri/src/com/sun/faces/renderkit/ResponseStateManagerImpl.java

- modify getTreeStructureToRestore() so it knows the value of the hidden
  field is only a string, not a base64 encoded object tree, if the
  stateSavingMethod is server.

- modify writeState() to not encode the view if we're saving state in
  the server, just write out the id.

- remove unused replaceMarkers method.

M jsf-ri/src/com/sun/faces/taglib/jsf_core/ViewTag.java

- leverage new APIs and rely on impl to delegate to deprecated APIs for
  backwards compatability.

M jsf-ri/systest/build-tests.xml
M jsf-ri/systest/src/com/sun/faces/htmlunit/AbstractTestCase.java
M jsf-ri/systest/src/com/sun/faces/jsptest/JspIntegrationTestCase.java
M jsf-ri/test/com/sun/faces/FacesTestCaseService.java
M jsf-ri/test/com/sun/faces/lifecycle/TestApplyRequestValuesPhase.java
M jsf-ri/test/com/sun/faces/lifecycle/TestLifecycleImpl_initial.java
M jsf-ri/test/com/sun/faces/lifecycle/TestPhase.java
M jsf-ri/test/com/sun/faces/lifecycle/TestProcessValidationsPhase.java
M jsf-ri/test/com/sun/faces/lifecycle/TestRestoreViewPhase.java
M jsf-ri/web/test/RenderResponse_correct
M jsf-ri/web/test/TestLifecycleImpl_initial_correct
M jsf-ri/web/test/TestViewHandlerImpl_correct

- Oof, mondo changes here.
This commit is contained in:
edburns%acm.org 2005-03-17 01:56:55 +00:00
Родитель 0c0ab93fb8
Коммит a40373132c
13 изменённых файлов: 567 добавлений и 158 удалений

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@ -25,28 +25,84 @@ package org.mozilla.webclient;
import java.util.Properties;
import javax.swing.tree.MutableTreeNode;
public interface BookmarkEntry extends MutableTreeNode
{
/**
* <p>The <code>TreeModel</code> returned by {@link
* Bookmarks#getBookmarks} is composed of instances of this class.</p>
*
* <p>New instances of this class may only be created with {@link
* Bookmarks#newBookmarkEntry}. Instances may be added to and removed
* from the bookmarks tree by calling {@link Bookmarks#addBookmark} and
* {@link Bookmarks#removeBookmark} respectively. A special entry that is a
* folder may be created with {@link Bookmarks#newBookmarkFolder}.</p>
*
* <p>The meta-data for the bookmark is contained in a
* <code>Properties</code></p> instance returned from {@link
* #getProperties}. The constants for this class signify the valid keys
* for this <code>Properties</code> table.
*
*/
/**
public interface BookmarkEntry extends MutableTreeNode {
/**
* <p>The date on which this bookmark entry was added.</p>
*/
public final static String ADD_DATE = "AddDate";
* Property names
/**
* <p>The date on which this bookmark entry was last modified.</p>
*/
*/
public final static String LAST_MODIFIED_DATE = "LastModifiedDate";
public final static String ADD_DATE = "AddDate";
public final static String LAST_MODIFIED_DATE = "LastModifiedDate";
public final static String LAST_VISIT_DATE = "LastVisitDate";
public final static String NAME = "Name";
public final static String URL = "URL";
public final static String DESCRIPTION = "Description";
public final static String IS_FOLDER = "IsFolder";
/**
* <p>The date on which this bookmark entry was last visited by the
* browser.</p>
*/
public Properties getProperties();
public final static String LAST_VISIT_DATE = "LastVisitDate";
public boolean isFolder();
/**
* <p>The name of this bookmark entry.</p>
*/
public final static String NAME = "Name";
/**
* <p>The URL of this bookmark entry.</p>
*/
public final static String URL = "URL";
/**
* <p>The optional user given description of this bookmark
* entry.</p>
*/
public final static String DESCRIPTION = "Description";
/**
* <p>If this bookmark entry is a folder, the value of this property
* is the string "<code>true</code>" without the quotes.</p>
*/
public final static String IS_FOLDER = "IsFolder";
/**
* <p>Returns the <code>Properties</code> for this instance. Valid
* keys are given by the constants of this interface. Other keys
* may exist depending on the implementation.</p>
*/
public Properties getProperties();
/**
* <p>Returns <code>true</code> if and only if this instance is a
* bookmark folder.</p>
*/
public boolean isFolder();
}
// end of interface BookmarkEntry

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@ -24,19 +24,55 @@ package org.mozilla.webclient;
import javax.swing.tree.TreeModel;
public interface Bookmarks
{
/**
* <p>Provide an abstraction around the bookmarks facility provided by
* the underlying browser.</p>
*/
public void addBookmark(BookmarkEntry mayBeNullParent,
BookmarkEntry bookmark);
public interface Bookmarks {
/**
* <p>Add the argument <code>bookmark</code> as a child of the
* argument <code>mayBeNullParent</code>. If
* <code>mayBeNullParent</code>is null, the <code>bookmark</code> is
* added as a child of the root node.</p>
*
* @param mayBeNullParent if non-<code>null</code> the parent of
* this bookmark. The parent must return <code>true</code> from
* {@link BookmarkEntry#isFolder}.
*/
public void addBookmark(BookmarkEntry mayBeNullParent,
BookmarkEntry bookmark);
/**
* <p>Return a <code>TreeModel</code> representation of the
* bookmarks for the current profile.</p>
*/
public TreeModel getBookmarks() throws IllegalStateException;
/**
* <p>Remove the argument bookmark from its current position in the
* tree.</p>
*/
public TreeModel getBookmarks() throws IllegalStateException;
public void removeBookmark(BookmarkEntry bookmark);
public void removeBookmark(BookmarkEntry bookmark);
public BookmarkEntry newBookmarkEntry(String url);
/**
* <p>Create a new, un-attached {@link BookmarkEntry} instance
* suitable for passing to {@link #addBookmark}.</p>
*/
public BookmarkEntry newBookmarkFolder(String name);
public BookmarkEntry newBookmarkEntry(String url);
/**
* <p>Create a new, un-attached {@link BookmarkEntry} instance
* suitable for passing to {@link #addBookmark} that is a
* folder for containing other <code>BookmarkEntry</code> instances.</p>
*/
public BookmarkEntry newBookmarkFolder(String name);
}
// end of interface Bookmarks

Просмотреть файл

@ -45,7 +45,7 @@ import java.io.FileNotFoundException;
* WebclientFactory}. All of the public static methods in this class
* simply call through to this implementation instance.</p>
*
* @version $Id: BrowserControlFactory.java,v 1.12 2005-03-15 02:49:16 edburns%acm.org Exp $
* @version $Id: BrowserControlFactory.java,v 1.13 2005-03-17 01:56:55 edburns%acm.org Exp $
*
*
*/
@ -145,7 +145,9 @@ public class BrowserControlFactory extends Object {
* <p>Delete a {@link BrowserControl} instance created with {@link
* #newBrowserControl}. This method must be called when the user no
* longer needs a <code>BrowserControl</code> instance. For
* example, when a browser tab closes.</p>
* example, when a browser tab closes. After returning from this
* call, any extant references to that <code>BrowserControl</code>
* are completely useless.</p>
*
* @param toDelete the <code>BrowserControl</code> instance to
* delete.

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@ -81,26 +81,98 @@ package org.mozilla.webclient;
import java.util.Properties;
import org.w3c.dom.Document;
public interface CurrentPage
{
public void copyCurrentSelectionToSystemClipboard();
public void findInPage(String stringToFind, boolean forward, boolean matchCase);
public void findNextInPage();
public String getCurrentURL();
public Document getDOM();
/**
* <p>Get information about and perform operations on the page currently
* being shown in the {@link BrowserControlCanvas} for the {@link
* BrowserControl} instance from which this <code>CurrentPage</code>
* instance was obtained.</p>
*/
public Properties getPageInfo();
public interface CurrentPage {
/**
* <p>Copy the current selection to the system clipboard so its
* contents can be obtained using the standard Java
* <code>Toolkit.getDefaultToolkit().getSystemClipboard()</code>
* method. The selection that is copied may be made either by the
* user, or programmatically via the {@link #selectAll} or {@link
* CurrentPage2#highlightSelection} methods. </p>
*/
public void copyCurrentSelectionToSystemClipboard();
/**
* <p>Search for the argument <code>stringToFind</code> in the
* current page, highlighting it and scrolling the view to show
* it.</p>
*
* @param stringToFind the search string
*
* @param forward if <code>true</code>, search forward from the
* previous hit
*
* @param matchCase if <code>true</code>, the case must match in
* order to be considered a hit.
*
* @deprecated this method has been replaced by {@link
* CurrentPage2#find}.
*/
public String getSource();
public void findInPage(String stringToFind, boolean forward, boolean matchCase);
/**
* <p>Find the next occurrence of the String found with {@link
* #findInPage}.</p>
*
* @deprecated this method has been replaced by {@link
* CurrentPage2#findNext}.
*/
public void findNextInPage();
/**
* <p>Return the <code>URL</code> of the document currently
* showing.</p>
*/
public String getCurrentURL();
/**
* <p>Return a W3C DOM <code>Document</code> of the document currently
* showing.</p>
*/
public Document getDOM();
/**
* <p><b>Unimplemented</b> Return meta-information for the current
* page.</p>
*/
public Properties getPageInfo();
/**
* <p>Return the source for the current page as a String.</p>
*/
public String getSource();
public byte [] getSourceBytes();
/**
* <p>Return the source for the current page as a <code>byte</code>
* array.</p>
*/
public byte [] getSourceBytes();
/**
* <p>Reset the find so that the next find starts from the beginning
* or end of the page.</p>
*/
public void resetFind();
public void resetFind();
public void selectAll();
/**
* <p>Tell the underlying browser to select all text in the current
* page.</p>
*/
public void selectAll();
}
// end of interface CurrentPage

Просмотреть файл

@ -23,20 +23,65 @@
package org.mozilla.webclient;
/**
* <p>Extended current page functionality.</p>
*/
public interface CurrentPage2 extends CurrentPage {
/**
* <p>Return a {@link Selection} instance for the current selection.
* This is the only way to obtain a <code>Selection</code>
* instance.</p>
*/
public Selection getSelection();
/**
* <p>Take the argument {@link Selection} and highlight it in the
* current page.</p>
*
* @param selection the selection, obtained from {@link
* #getSelection} to be highlighted.
*/
public void highlightSelection(Selection selection);
/**
* <p>Make it so the current page has nothing selected.</p>
*/
public void clearAllSelections();
/**
* <p>Pop up a native print dialog to allow the user to print the
* current page.</p>
*/
public void print();
/**
* <p>Turn the browser into print preview mode depending on the
* value of the argument <code>preview</code>.</p>
*
* @param preview if true, turn the browser into print preview mode.
* If false, turn the browser to normal view mode.
*/
public void printPreview(boolean preview);
/**
* <p>Enhanced version of {@link CurrentPage#findInPage} that allows
* the caller to discover the result of the find.</p>
*/
public boolean find(String stringToFind, boolean forward, boolean matchCase);
/**
* <p>Enhanced version of {@link CurrentPage#findNextInPage} that allows
* the caller to discover the result of the find.</p>
*/
public boolean findNext();
}
// end of interface CurrentPage2

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@ -22,26 +22,88 @@
package org.mozilla.webclient;
public class DocumentLoadEvent extends WebclientEvent
{
/**
* <p>Event class for the {@link DocumentLoadListener} interface.</p>
*
*/
public static final long START_DOCUMENT_LOAD_EVENT_MASK = 1;
public static final long END_DOCUMENT_LOAD_EVENT_MASK = 1 << 2;
public static final long START_URL_LOAD_EVENT_MASK = 1 << 3;
public static final long END_URL_LOAD_EVENT_MASK = 1 << 4;
public static final long PROGRESS_URL_LOAD_EVENT_MASK = 1 << 5;
public static final long STATUS_URL_LOAD_EVENT_MASK = 1 << 6;
public static final long UNKNOWN_CONTENT_EVENT_MASK = 1 << 7;
public static final long FETCH_INTERRUPT_EVENT_MASK = 1 << 8;
public class DocumentLoadEvent extends WebclientEvent {
/**
* <p>The <code>type</code> of the event to indicate the start of a
* document load.</p>
*/
public static final long START_DOCUMENT_LOAD_EVENT_MASK = 1;
/**
* <p>The <code>type</code> of the event to indicate the end of a
* document load.</p>
*/
public static final long END_DOCUMENT_LOAD_EVENT_MASK = 1 << 2;
/**
* <p>If the current document is a compound document, this event
* will be generated, indicating the start of a URL load within a
* document load for that compound document.</p>
*/
public static final long START_URL_LOAD_EVENT_MASK = 1 << 3;
/**
* <p>If the current document is a compound document, this event
* will be generated, indicating the end of a URL load within a
* document load for that compound document.</p>
*/
public static final long END_URL_LOAD_EVENT_MASK = 1 << 4;
/**
* <p>This event indicates a progress message from the browser.</p>
*/
public static final long PROGRESS_URL_LOAD_EVENT_MASK = 1 << 5;
/**
* <p>This event indicates a status message from the browser. For
* example, "completed."</p>
*/
public static final long STATUS_URL_LOAD_EVENT_MASK = 1 << 6;
/**
* <p>This event indicates the browser encountered an unknown
* content that it does not know how to display.</p>
*/
public static final long UNKNOWN_CONTENT_EVENT_MASK = 1 << 7;
/**
* <p>This event indicates the current fetch was interrupted.</p>
*/
public static final long FETCH_INTERRUPT_EVENT_MASK = 1 << 8;
//
// Constructors
//
/**
* <p>Create a new <code>DocumentLoadListener</code> instance.</p>
*
* @param source the source of the event, passed to
* <code>super</code>. This will be the {@link EventRegistration}
* instance for this {@link BrowserControl}.
*
* @param newType the eventType. Depends on the {@link
* WebclientEventListener} sub-interface.
*
* @param newEventData the eventType. Depends on the {@link
* WebclientEventListener} sub-interface.
*/
public DocumentLoadEvent(Object source, long newType,
Object newEventData)
{
super(source, newType, newEventData);
}
public DocumentLoadEvent(Object source, long newType,
Object newEventData) {
super(source, newType, newEventData);
}
} // end of class DocumentLoadEvent

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@ -23,21 +23,25 @@
package org.mozilla.webclient;
/**
* <p>The <code>eventDispatched()</code> method is passed a {@link
* DocumentLoadEvent} instance. The <code>type</code> property of the
* event will be one of the types defined as a <code>public static final
* int</code> in <code>DocumentLoadEvent</code>.</p>
* <p>The {@link WebclientEventListener#eventDispatched} method is
* passed a {@link DocumentLoadEvent} instance. The <code>type</code>
* property of the event will be one of the types defined as a
* <code>public static final int</code> constant in
* <code>DocumentLoadEvent</code>.</p>
*
* <p>The <code>eventData</code> property of the
* <code>DocumentLoadEvent</code> instance will be a
* <code>java.util.Map</code>. For all <code>EVENT_MASK</code> types in
* <code>java.util.Map</code>. For all <code>type</code>s in
* <code>DocumentLoadEvent</code> the map will contain an entry under
* the key "<code>URI</code>" without the quotes. This will be the
* fully qualified URI for the event.</p>
*
* <p>For the <code>PROGRESS_URL_LOAD_EVENT_MASK</code> there will be an
* entry in the map for the key "<code>message</code>". This will be
* the progress message from the browser.</p>
* entry in the map for the key "<code>message</code>" without the
* quotes. This will be the progress message from the browser.</p>
*
* <p>For extended information about the event, implement {@link
* PageInfoListener}.</p>
*
*/

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@ -22,50 +22,134 @@
package org.mozilla.webclient;
/**
* <p>This interface allows the implementer to be notified of {@link
* NewWindowEvent}s that occur as a result of user browsing. For
* example, pop-ups.</p>
*
* <p>The constants defined in this interface should really be defined
* on {@link NewWindowEvent}, but they remain here for backwards
* compatability. They are given to the user as the value of the
* <code>type</code> property of the <code>NewWindowEvent</code>. They
* advise the user on the characteristics of the new window to be
* created. They should be anded with the argument eventType to
* determine if they are indicated for this event. Here is an example
* of how to create a new window in response to a
* <code>NewWindowEvent</code>:</p>
*
* <code><pre>
*
*
public void eventDispatched(WebclientEvent newWindowEvent) {
BrowserControl newBrowserControl = null;
BrowserControlCanvas newCanvas = null;
Frame newFrame = new Frame();
long type = newWindowEvent.getType();
if (type & NewWindowListener.CHROME_MENUBAR) {
// create a menu bar for the new window
}
if (type & NewWindowListener.CHROME_WINDOW_CLOSE) {
// Make it so this window cannot be closed
}
try {
newBrowserControl = BrowserControlFactory.newBrowserControl();
newCanvas = (BrowserControlCanvas)
newBrowserControl.queryInterface(BrowserControl.BROWSER_CONTROL_CANVAS_NAME);
// obtain any other interfaces you need.
} catch (Throwable e) {
System.out.println(e.getMessage());
}
newFrame.add(newCanvas, BorderLayout.CENTER);
newFrame.setVisible(true);
newCanvas.setVisible(true);
}
* </pre></code>
*
* <p></p>
*/
public interface NewWindowListener extends WebclientEventListener {
public static final long CHROME_DEFAULT = 1;
public static final long CHROME_DEFAULT = 1;
public static final long CHROME_WINDOW_BORDERS = 1 << 1;
public static final long CHROME_WINDOW_BORDERS = 1 << 1;
/* Specifies whether the window can be closed. */
public static final long CHROME_WINDOW_CLOSE = 1 << 2;
/*
* Specifies whether the window can be closed.
*/
/* Specifies whether the window is resizable. */
public static final long CHROME_WINDOW_RESIZE = 1 << 3;
public static final long CHROME_WINDOW_CLOSE = 1 << 2;
/* Specifies whether to display the menu bar. */
public static final long CHROME_MENUBAR = 1 << 4;
/**
* Specifies whether the window is resizable.
*/
/* Specifies whether to display the browser toolbar, making buttons such as Back, Forward, and Stop available. */
public static final long CHROME_TOOLBAR = 1 << 5;
public static final long CHROME_WINDOW_RESIZE = 1 << 3;
/* Specifies whether to display the input field for entering URLs directly into the browser. */
public static final long CHROME_LOCATIONBAR = 1 << 6;
/**
* Specifies whether to display the menu bar.
*/
/* Specifies whether to add a status bar at the bottom of the window. */
public static final long CHROME_STATUSBAR = 1 << 7;
public static final long CHROME_MENUBAR = 1 << 4;
/* Specifies whether to display the personal bar. (Mozilla only) */
public static final long CHROME_PERSONAL_TOOLBAR = 1 << 8;
/**
* Specifies whether to display the browser toolbar, making buttons
* such as Back, Forward, and Stop available.
*/
/* Specifies whether to display horizontal and vertical scroll bars. */
public static final long CHROME_SCROLLBARS = 1 << 9;
public static final long CHROME_TOOLBAR = 1 << 5;
/* Specifies whether to display a title bar for the window. */
public static final long CHROME_TITLEBAR = 1 << 10;
/**
* Specifies whether to display the input field for entering URLs
* directly into the browser.
*/
public static final long CHROME_EXTRA = 1 << 11;
public static final long CHROME_LOCATIONBAR = 1 << 6;
public static final long CHROME_WITH_SIZE = 1 << 12;
/**
* Specifies whether to add a status bar at the bottom of the window.
*/
public static final long CHROME_WITH_POSITION = 1 << 13;
public static final long CHROME_STATUSBAR = 1 << 7;
/* Specifies whether the window is minimizable. */
public static final long CHROME_WINDOW_MIN = 1 << 14;
/**
* Specifies whether to display the personal bar. (Mozilla only)
*/
public static final long CHROME_PERSONAL_TOOLBAR = 1 << 8;
public static final long CHROME_WINDOW_POPUP = 1 << 15;
/**
* Specifies whether to display horizontal and vertical scroll bars.
*/
public static final long CHROME_ALL = 4094;
public static final long CHROME_SCROLLBARS = 1 << 9;
/**
* Specifies whether to display a title bar for the window.
*/
public static final long CHROME_TITLEBAR = 1 << 10;
public static final long CHROME_EXTRA = 1 << 11;
public static final long CHROME_WITH_SIZE = 1 << 12;
public static final long CHROME_WITH_POSITION = 1 << 13;
/**
* Specifies whether the window is minimizable.
*/
public static final long CHROME_WINDOW_MIN = 1 << 14;
public static final long CHROME_WINDOW_POPUP = 1 << 15;
public static final long CHROME_ALL = 4094;
}

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@ -24,37 +24,64 @@ package org.mozilla.webclient;
import java.util.EventObject;
public class WebclientEvent extends EventObject
{
/**
* <p>Base event class for browser specific events coming from the
* browser.</p>
*/
//
// Attribute ivars
//
public class WebclientEvent extends EventObject {
private long type;
//
// Attribute ivars
//
private long type;
private Object eventData;
//
// Constructors
//
private Object eventData;
/**
* <p>Construct a new instance with the given <code>source</code>,
* <code>type</code>, and <code>eventData</code>. This method is
* typically not called by user code.</p>
*
* @param source the source of the event, passed to
* <code>super</code>. Depends on the {@link
* WebclientEventListener} sub-interface.
*
* @param newType the eventType. Depends on the {@link
* WebclientEventListener} sub-interface.
*
* @param newEventData the eventType. Depends on the {@link
* WebclientEventListener} sub-interface.
*/
public WebclientEvent(Object source, long newType,
Object newEventData) {
super(source);
type = newType;
eventData = newEventData;
}
//
// Constructors
//
public WebclientEvent(Object source, long newType,
Object newEventData)
{
super(source);
type = newType;
eventData = newEventData;
}
public long getType()
{
return type;
}
public Object getEventData()
{
return eventData;
}
/**
* <p>Return the type of this event. Depends on the {@link
* WebclientEventListener} sub-interface. </p>
*/
public long getType() {
return type;
}
/**
* <p>Return the event data for this event. Depends on the {@link
* WebclientEventListener} sub-interface. </p>
*/
public Object getEventData() {
return eventData;
}
} // end of class WebclientLoadEvent

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@ -22,16 +22,28 @@
package org.mozilla.webclient;
public interface WebclientEventListener
{
/**
* Important: do not call any webclient methods during this callback.
* It may caus your app to deadlock.
* <p>The base interface for many, but not all, events coming from the
* browser. For example, it is possible to add a
* <code>java.awt.event.MouseListener</code> or
* <code>java.awt.event.KeyListener</code> to the {@link
* BrowserControlCanvas}. Doing so will cause events specific to those
* interfaces to be generated. See the sub-interface javadoc for more
* details.</p>
*/
public void eventDispatched(WebclientEvent event);
public interface WebclientEventListener {
/**
* <p>This method will be called by the browser when a particular
* event occurs. The nature of the argument <code>event</code>
* depends on the particular <code>WebclientEventListener</code>
* sub-interface that is implemented. See the sub-interface javadoc
* for more details.</p>
*
* @param event the event object for this event
*/
public void eventDispatched(WebclientEvent event);
} // end of interface WebclientEventListener

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@ -56,32 +56,40 @@ public interface WebclientFactory {
throws FileNotFoundException, ClassNotFoundException;
/**
* <p>if called before {@link
* BrowserControlFactory#setAppData(java.lang.String)}, this will
* cause the profile used for starting up the underlying browser to
* be set. If not called, the default will be "webclient"</p>
*
* <p>See {@link
* BrowserControlFactory#setProfile}.</p>
*
*/
public void setProfile(String profileName);
/**
*
* <p>See {@link
* BrowserControlFactory#appTerminate}.</p>
*
*/
public void appTerminate() throws Exception;
/**
*
* <p>See {@link
* BrowserControlFactory#newBrowserControl}.</p>
*
*/
public BrowserControl newBrowserControl()
throws InstantiationException, IllegalAccessException,
IllegalStateException;
/**
* BrowserControlFactory.deleteBrowserControl is called with a
* BrowserControl instance obtained from
* BrowserControlFactory.newBrowserControl. This method renders the
* argument instance completely un-usable. It should be called when the
* BrowserControl instance is no longer needed. This method simply
* calls through to the non-public BrowserControlImpl.delete() method.
* @see org.mozilla.webclient.ImplObject#delete
*/
*
* <p>See {@link
* BrowserControlFactory#deleteBrowserControl}.</p>
*
*/
public void deleteBrowserControl(BrowserControl toDelete);

Просмотреть файл

@ -33,16 +33,16 @@
<body>
<p>The API Javadocs for the Webclient specification.</p>
<p>Brief usage available in the package docs for the
<code>org.mozilla.webclient</code> package. Detailed usage instructions
are available at <a target="_"
<p>Brief usage available in the package docs for the <a
href="org/mozilla/webclient/package-summary.html"><code>org.mozilla.webclient</code></a> package. Detailed usage
instructions are available at <a target="_"
href="http://www.mozilla.org/projects/blackwood/webclient/#Using">http://www.mozilla.org/projects/blackwood/webclient/#Using</a>.</p>
<hr>
<!-- Created: Mon Mar 14 19:57:56 Eastern Standard Time 2005 -->
<!-- hhmts start -->
Last modified: Mon Mar 14 21:40:08 Eastern Standard Time 2005
Last modified: Wed Mar 16 19:09:12 Eastern Standard Time 2005
<!-- hhmts end -->
</body>
</html>

Просмотреть файл

@ -39,7 +39,8 @@ org.mozilla.webclient.BrowserControlFactory#setAppData}. If embedding a
native browser, the argument must be the fully qualified path name of
the binary directory for the browser. If embedding a non-native
browser, <code>null</code> must be passed to this method. This method
must be called once and only once.</p>
must be called once and only once in the lifetime of the
application.</p>
<p>For browsers that support the concept of "profiles" it must be
possible to set the current profile used for this browsing session by
@ -69,7 +70,7 @@ org.mozilla.webclient.BrowserControlFactory#appTerminate}.</p>
<hr>
<!-- Created: Mon Mar 14 20:36:26 Eastern Standard Time 2005 -->
<!-- hhmts start -->
Last modified: Mon Mar 14 20:45:20 Eastern Standard Time 2005
Last modified: Wed Mar 16 19:10:03 Eastern Standard Time 2005
<!-- hhmts end -->
</body>
</html>