Added PlugletTagInfo
Updated test.java Fixed some build problems git-svn-id: svn://10.0.0.236/trunk@46992 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||
* the License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun Microsystems,
|
||||
* Inc. Portions created by Sun are Copyright (C) 1999 Sun Microsystems,
|
||||
* Inc. All Rights Reserved.
|
||||
*/
|
||||
package org.mozilla.pluglet.mozilla;
|
||||
|
||||
public interface ByteRanges {
|
||||
public void addRange(int offset, int length);
|
||||
}
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||
* the License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun Microsystems,
|
||||
* Inc. Portions created by Sun are Copyright (C) 1999 Sun Microsystems,
|
||||
* Inc. All Rights Reserved.
|
||||
*/
|
||||
package org.mozilla.pluglet.mozilla;
|
||||
|
||||
public interface ByteRanges {
|
||||
public void addRange(int offset, int length);
|
||||
}
|
||||
|
||||
@@ -52,5 +52,5 @@ public interface PlugletInstancePeer {
|
||||
* @param height - new window height
|
||||
*/
|
||||
public void setWindowSize(int width, int height);
|
||||
|
||||
public PlugletTagInfo getTagInfo();
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ class PlugletInstancePeerImpl implements PlugletInstancePeer {
|
||||
* @param height - new window height
|
||||
*/
|
||||
public native void setWindowSize(int width, int height);
|
||||
public native PlugletTagInfo getTagInfo();
|
||||
private native void nativeFinalize();
|
||||
private native void nativeInitialize();
|
||||
};
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||
* the License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun Microsystems,
|
||||
* Inc. Portions created by Sun are Copyright (C) 1999 Sun Microsystems,
|
||||
* Inc. All Rights Reserved.
|
||||
*/
|
||||
package org.mozilla.pluglet.mozilla;
|
||||
import java.util.*;
|
||||
|
||||
public interface PlugletTagInfo {
|
||||
public Properties getAttributes();
|
||||
public String getAttribute(String name);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||
* the License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun Microsystems,
|
||||
* Inc. Portions created by Sun are Copyright (C) 1999 Sun Microsystems,
|
||||
* Inc. All Rights Reserved.
|
||||
*/
|
||||
package org.mozilla.pluglet.mozilla;
|
||||
import java.util.*;
|
||||
|
||||
public interface PlugletTagInfo2 extends PlugletTagInfo {
|
||||
public Properties getAttributes();
|
||||
public String getAttribute(String name);
|
||||
/* Get the type of the HTML tag that was used ot instantiate this
|
||||
* pluglet. Currently supported tags are EMBED, APPLET and OBJECT.
|
||||
*/
|
||||
public String getTagType();
|
||||
/* Get the complete text of the HTML tag that was
|
||||
* used to instantiate this pluglet
|
||||
*/
|
||||
public String getTagText();
|
||||
public String getDocumentBase();
|
||||
/* Return an encoding whose name is specified in:
|
||||
* http://java.sun.com/products/jdk/1.1/docs/guide/intl/intl.doc.html#25303
|
||||
*/
|
||||
public String getDocumentEncoding();
|
||||
public String getAlignment();
|
||||
public int getWidth();
|
||||
public int getHeight();
|
||||
public int getBorderVertSpace();
|
||||
public int getBorderHorizSpace();
|
||||
/* Returns a unique id for the current document on which the
|
||||
* pluglet is displayed.
|
||||
*/
|
||||
public int getUniqueID();
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||
* the License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun Microsystems,
|
||||
* Inc. Portions created by Sun are Copyright (C) 1999 Sun Microsystems,
|
||||
* Inc. All Rights Reserved.
|
||||
*/
|
||||
package org.mozilla.pluglet.mozilla;
|
||||
import java.util.*;
|
||||
|
||||
class PlugletTagInfo2Impl implements PlugletTagInfo2 {
|
||||
private long peer = 0;
|
||||
private PlugletTagInfo2Impl(long _peer) {
|
||||
peer = _peer;
|
||||
nativeInitialize();
|
||||
}
|
||||
public native Properties getAttributes();
|
||||
public native String getAttribute(String name);
|
||||
/* Get the type of the HTML tag that was used ot instantiate this
|
||||
* pluglet. Currently supported tags are EMBED, APPLET and OBJECT.
|
||||
*/
|
||||
public native String getTagType();
|
||||
/* Get the complete text of the HTML tag that was
|
||||
* used to instantiate this pluglet
|
||||
*/
|
||||
public native String getTagText();
|
||||
public native String getDocumentBase();
|
||||
/* Return an encoding whose name is specified in:
|
||||
* http://java.sun.com/products/jdk/1.1/docs/guide/intl/intl.doc.html#25303
|
||||
*/
|
||||
public native String getDocumentEncoding();
|
||||
public native String getAlignment();
|
||||
public native int getWidth();
|
||||
public native int getHeight();
|
||||
public native int getBorderVertSpace();
|
||||
public native int getBorderHorizSpace();
|
||||
/* Returns a unique id for the current document on which the
|
||||
* pluglet is displayed.
|
||||
*/
|
||||
public native int getUniqueID();
|
||||
protected void finalize() {
|
||||
nativeFinalize();
|
||||
}
|
||||
private native void nativeFinalize();
|
||||
private native void nativeInitialize();
|
||||
}
|
||||
Reference in New Issue
Block a user