Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-backports > by-pkgid > c2e615936765807dc5e5b6d855353087 > files > 89

java-1.8.0-openjfx-1.8.0.121-1.b13.1.mga5.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_111) on Tue Jan 31 13:48:12 UTC 2017 -->
<title>HostServices (JavaFX 8)</title>
<meta name="date" content="2017-01-31">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="HostServices (JavaFX 8)";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/HostServices.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">JavaFX&nbsp;8</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../javafx/application/ConditionalFeature.html" title="enum in javafx.application"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../javafx/application/Platform.html" title="class in javafx.application"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?javafx/application/HostServices.html" target="_top">Frames</a></li>
<li><a href="HostServices.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">javafx.application</div>
<h2 title="Class HostServices" class="title">Class HostServices</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>javafx.application.HostServices</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="typeNameLabel">HostServices</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">This class provides HostServices for an Application. This includes
 methods to get the code base and document base for an Application,
 show a web page in a browser, and communicate with the enclosing web page
 using JavaScript if the Application is running in
 a browser.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.0</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/application/HostServices.html#getCodeBase--">getCodeBase</a></span>()</code>
<div class="block">Gets the code base URI for this application.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/application/HostServices.html#getDocumentBase--">getDocumentBase</a></span>()</code>
<div class="block">Gets the document base URI for this application.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../netscape/javascript/JSObject.html" title="class in netscape.javascript">JSObject</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/application/HostServices.html#getWebContext--">getWebContext</a></span>()</code>
<div class="block">Returns the JavaScript handle of the enclosing DOM window of the web
 page containing this application.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/application/HostServices.html#resolveURI-java.lang.String-java.lang.String-">resolveURI</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;base,
          <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;rel)</code>
<div class="block">Resolves the specified relative URI against the base URI and returns
 the resolved URI.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/application/HostServices.html#showDocument-java.lang.String-">showDocument</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;uri)</code>
<div class="block">Opens the specified URI in a new browser window or tab.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="getCodeBase--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCodeBase</h4>
<pre>public final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getCodeBase()</pre>
<div class="block">Gets the code base URI for this application.
 If the application was launched via a JNLP file, this method returns
 the codebase parameter specified in the JNLP file.
 If the application was launched in standalone mode, this method returns
 the directory containing the application jar file. If the
 application is not packaged in a jar file, this method
 returns the empty string.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the code base URI for this application.</dd>
</dl>
</li>
</ul>
<a name="getDocumentBase--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDocumentBase</h4>
<pre>public final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getDocumentBase()</pre>
<div class="block">Gets the document base URI for this application.
 If the application is embedded in a browser, this method returns the
 URI of the web page containing the application.
 If the application was launched in webstart mode, this method returns
 the the codebase parameter specified in the JNLP file (the document
 base and the code base are the same in this mode).
 If the application was launched in standalone mode, this method returns
 the URI of the current directory.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the document base URI for this application.</dd>
</dl>
</li>
</ul>
<a name="resolveURI-java.lang.String-java.lang.String-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resolveURI</h4>
<pre>public final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;resolveURI(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;base,
                               <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;rel)</pre>
<div class="block">Resolves the specified relative URI against the base URI and returns
 the resolved URI.

 <p>Example:</p>
 <ul>
 <pre>
 HostServices services = getHostServices();
 String myImage = services.resolveURI(services.getDocumentBase(),
                                      "image.jpg");
 Image image = new Image(myImage);
 </pre>
 </ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>base</code> - the base URI against which to resolve the relative URI</dd>
<dd><code>rel</code> - the relative URI to be resolved</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the fully resolved URI.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if either the <code>base</code> or the
 <code>rel</code> strings are null.</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if there is an error parsing either
 the <code>base</code> or <code>rel</code> URI strings, or if there is
 any other error in resolving the URI.</dd>
</dl>
</li>
</ul>
<a name="showDocument-java.lang.String-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>showDocument</h4>
<pre>public final&nbsp;void&nbsp;showDocument(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;uri)</pre>
<div class="block">Opens the specified URI in a new browser window or tab.
 The determination of whether it is a new browser window or a tab in
 an existing browser window will be made by the browser preferences.
 Note that this will respect the pop-up blocker settings of the default
 browser; it will not try to circumvent them.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the URI of the web page that will be opened in a browser.</dd>
</dl>
</li>
</ul>
<a name="getWebContext--">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getWebContext</h4>
<pre>public final&nbsp;<a href="../../netscape/javascript/JSObject.html" title="class in netscape.javascript">JSObject</a>&nbsp;getWebContext()</pre>
<div class="block">Returns the JavaScript handle of the enclosing DOM window of the web
 page containing this application.
 This handle is used to access the web page by calling from Java into
 JavaScript.
 If the application is not embedded into a web page, this method
 return null.

 <p>Example:</p>
 <ul>
 <pre>
 JSObject jsWin = getHostServices().getWebContext();
 if (jsWin != null) {
     jsWin.eval("var b = document.body;" +
                "var newdiv = document.createElement('div');" +
                "newdiv.innerHTML = '&lt;br&gt;Hello from JavaScript!';" +
                "b.appendChild(newdiv);");
 }
 </pre>
 </ul></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>handle of the enclosing DOM window of the web page containing
 this application</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/HostServices.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">JavaFX&nbsp;8</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../javafx/application/ConditionalFeature.html" title="enum in javafx.application"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../javafx/application/Platform.html" title="class in javafx.application"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?javafx/application/HostServices.html" target="_top">Frames</a></li>
<li><a href="HostServices.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><font size="-1"><a href="http://bugreport.java.com/bugreport/" target="_blank">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="https://docs.oracle.com/javase/8/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="https://docs.oracle.com/javase/8/docs/legal/cpyr.html" target="_blank">Copyright</a> &copy; 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to <a href="http://download.oracle.com/otndocs/jcp/java_se-8-mrel-spec/license.html" target="_blank">license terms</a>. Also see the <a target="_blank" href="http://www.oracle.com/technetwork/java/redist-137594.html" target="_blank">documentation redistribution policy</a>.</font></small></p>
</body>
</html>