📄 webbrowser.html
字号:
<BR>
Synchronously navigates to a resource identified by a URL, with the HTTP POST data and HTTP headers to send to the server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.net.URL</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#toFileUrl(java.net.URL)">toFileUrl</A></B>(java.net.URL location)</CODE>
<BR>
Takes a URL that points to a resource within a JAR, unzips it onto the filesystem, and returns a file: url to it</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#willOpenURL(java.net.URL)">willOpenURL</A></B>(java.net.URL url)</CODE>
<BR>
Called before a navigation occurs. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#willOpenWindow(java.net.URL)">willOpenWindow</A></B>(java.net.URL url)</CODE>
<BR>
Called when a new window is to be created for loading a resource. </TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.awt.Canvas"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.awt.Canvas</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update</CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.awt.Component"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.awt.Component</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, 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, 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, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, 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, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate</CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="WebBrowser()"><!-- --></A><H3>
WebBrowser</H3>
<PRE>
public <B>WebBrowser</B>()</PRE>
<DL>
<DD>Constructs a new <code>WebBrowser</code> object with no URL specified. This instance will automatically dispose itself when <code>removeNotify() </code> is called. <p> This constructor is equivalent to <code>WebBrowser(true)</code>.
<P>
<DT><B>See Also:</B><DD><A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#WebBrowser(boolean)"><CODE>WebBrowser(boolean)</CODE></A>, <A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#removeNotify()"><CODE>removeNotify()</CODE></A>, <A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#dispose()"><CODE>dispose()</CODE></A></DL>
<HR>
<A NAME="WebBrowser(boolean)"><!-- --></A><H3>
WebBrowser</H3>
<PRE>
public <B>WebBrowser</B>(boolean autoDispose)</PRE>
<DL>
<DD>Constructs a new <code>WebBrowser</code> object with the specified boolean value <code>autoDispose</code> as the flag which indicates whether this instance will automatically dispose itself in <code> removeNotify()</code> or should be disposed by the developer directly calling <code>dispose()</code>. <p> This constructor is equivalent to <code>WebBrowser(null, autoDispose) </code>.
<P>
<DT><B>Parameters:</B><DD><CODE>autoDispose</CODE> - ture to indicate this instance will automatically dispose itself in <code>removeNotify()</code>; false to indicate the developer should call <code>dispose()</code> when this instance is no longer needed.<DT><B>See Also:</B><DD><A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#removeNotify()"><CODE>removeNotify()</CODE></A>, <A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#dispose()"><CODE>dispose()</CODE></A>, <A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#isAutoDispose()"><CODE>isAutoDispose()</CODE></A></DL>
<HR>
<A NAME="WebBrowser(java.net.URL)"><!-- --></A><H3>
WebBrowser</H3>
<PRE>
public <B>WebBrowser</B>(java.net.URL url)</PRE>
<DL>
<DD>Constructs a new <code>WebBrowser</code> with an URL specified. This instance will automatically dispose itself when <code>removeNotify() </code> is called. <p> This constructor is equivalent to <code>WebBrowser(url, true)</code>.
<P>
<DT><B>Parameters:</B><DD><CODE>url</CODE> - the URL to be shown in this instance.<DT><B>See Also:</B><DD><A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#WebBrowser(boolean)"><CODE>WebBrowser(boolean)</CODE></A>, <A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#removeNotify()"><CODE>removeNotify()</CODE></A>, <A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#dispose()"><CODE>dispose()</CODE></A></DL>
<HR>
<A NAME="WebBrowser(java.net.URL, boolean)"><!-- --></A><H3>
WebBrowser</H3>
<PRE>
public <B>WebBrowser</B>(java.net.URL url, boolean autoDispose)</PRE>
<DL>
<DD>Constructs a new <code>WebBrowser</code> with an specified URL and boolean flag to indicate the dispose schema.
<P>
<DT><B>Parameters:</B><DD><CODE>url</CODE> - the URL to be shown in this instance.<DD><CODE>autoDispose</CODE> - ture to indicate this instance will automatically dispose itself in <code>removeNotify()</code>; false to indicate the developer should call <code>dispose()</code> when this instance is no longer needed.<DT><B>See Also:</B><DD><A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#removeNotify()"><CODE>removeNotify()</CODE></A>, <A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#dispose()"><CODE>dispose()</CODE></A>, <A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#isAutoDispose()"><CODE>isAutoDispose()</CODE></A></DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="setInitialized(boolean)"><!-- --></A><H3>
setInitialized</H3>
<PRE>
public void <B>setInitialized</B>(boolean b)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jdesktop/jdic/browser/IWebBrowser.html" title="interface in org.jdesktop.jdic.browser">IWebBrowser</A></CODE></B></DD>
<DD>Set if the IWebBrowser has been initialized.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jdesktop/jdic/browser/IWebBrowser.html#setInitialized(boolean)">setInitialized</A></CODE> in interface <CODE><A HREF="../../../../org/jdesktop/jdic/browser/IWebBrowser.html" title="interface in org.jdesktop.jdic.browser">IWebBrowser</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - </DL>
</DD>
</DL>
<HR>
<A NAME="setInitFailureMessage(java.lang.String)"><!-- --></A><H3>
setInitFailureMessage</H3>
<PRE>
public void <B>setInitFailureMessage</B>(java.lang.String msg)</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jdesktop/jdic/browser/IWebBrowser.html#setInitFailureMessage(java.lang.String)">setInitFailureMessage</A></CODE> in interface <CODE><A HREF="../../../../org/jdesktop/jdic/browser/IWebBrowser.html" title="interface in org.jdesktop.jdic.browser">IWebBrowser</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="paint(java.awt.Graphics)"><!-- --></A><H3>
paint</H3>
<PRE>
public void <B>paint</B>(java.awt.Graphics g)</PRE>
<DL>
<DD>Could only get HWND when this method is called.This will fix the can't get awt HWND error.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addNotify()"><!-- --></A><H3>
addNotify</H3>
<PRE>
public void <B>addNotify</B>()</PRE>
<DL>
<DD>Creates the peer for this WebBrowser component. The peer allows us to modify the appearance of the WebBrowser component without changing its functionality.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#removeNotify()"><CODE>removeNotify()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="removeNotify()"><!-- --></A><H3>
removeNotify</H3>
<PRE>
public void <B>removeNotify</B>()</PRE>
<DL>
<DD>Makes this WebBrowser component undisplayable by destroying it native screen resource if the <code>isAutoDispose()</code> return true. Or just make this instance invisible if the <code>isAutoDispose()</code> return false. <p> This method is called by the toolkit internally and should not be called directly by programs. <p> If <code>isAutoDispose()</code> return false, developer should call <code>dispose()</code> when this instance is no longer needed. Otherwise, it resource will never be released untill this JVM exit.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#addNotify()"><CODE>addNotify()</CODE></A>, <A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#dispose()"><CODE>dispose()</CODE></A>, <A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#isAutoDispose()"><CODE>isAutoDispose()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="dispose()"><!-- --></A><H3>
dispose</H3>
<PRE>
public void <B>dispose</B>()</PRE>
<DL>
<DD>Release this instance's resource and make it undisplayable. If <code> isAutoDispose()</code> return true, this method will be called by the toolkit internally. If <code>isAutoDispose()</code> return false, this method should be called by developer when this instance is no longer needed. Attention,this method must be called if using js to close a page.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#removeNotify()"><CODE>removeNotify()</CODE></A>, <A HREF="../../../../org/jdesktop/jdic/browser/WebBrowser.html#isAutoDispose()"><CODE>isAutoDispose()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isAutoDispose()"><!-- --></A><H3>
isAutoDispose</H3>
<PRE>
public boolean <B>isAutoDispose</B>()</PRE>
<DL>
<DD>Return the boolean flag which indicates how to dispose this instance.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if this instance should be disposed by itself when <code>removeNotify()</code> is called. false if this instance
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -