本文整理匯總了Java中org.eclipse.swt.browser.Browser.dispose方法的典型用法代碼示例。如果您正苦於以下問題:Java Browser.dispose方法的具體用法?Java Browser.dispose怎麽用?Java Browser.dispose使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.browser.Browser
的用法示例。
在下文中一共展示了Browser.dispose方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isAvailable
import org.eclipse.swt.browser.Browser; //導入方法依賴的package包/類
/**
* <p>
* Tells whether the SWT Browser widget and hence this information control is
* available.
* </p>
*
* @param parent the parent component used for checking or <code>null</code> if
* none
*
* @return <code>true</code> if this control is available
*/
public static boolean isAvailable(Composite parent) {
if (!fgAvailabilityChecked) {
try {
Browser browser= new Browser(parent, SWT.NONE);
browser.dispose();
fgIsAvailable= true;
Slider sliderV= new Slider(parent, SWT.VERTICAL);
Slider sliderH= new Slider(parent, SWT.HORIZONTAL);
int width= sliderV.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
int height= sliderH.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
fgScrollBarSize= new Point(width, height);
sliderV.dispose();
sliderH.dispose();
} catch (SWTError er) {
fgIsAvailable= false;
} finally {
fgAvailabilityChecked= true;
}
}
return fgIsAvailable;
}
示例2: isBrowserAvailable
import org.eclipse.swt.browser.Browser; //導入方法依賴的package包/類
public static boolean isBrowserAvailable(Composite parent)
{
if (!cAvailabilityChecked) {
try {
Browser browser= new Browser(parent, SWT.NONE);
browser.dispose();
cIsAvailable= true;
}
catch (SWTError er) {
cIsAvailable= false;
}
finally {
cAvailabilityChecked= true;
}
}
return cIsAvailable;
}
示例3: isAvailableFor
import org.eclipse.swt.browser.Browser; //導入方法依賴的package包/類
/**
* Tells whether this control is available for given parent composite
*
* @param parent
* the parent component used for checking or <code>null</code> if
* none
* @return <code>true</code> if this control is available
*/
public static boolean isAvailableFor(Composite parent) {
if (!browserAvailabilityChecked) {
try {
Browser browser = new Browser(parent, SWT.NONE);
browser.dispose();
swtBrowserCanBeUsed = true;
/* compute scrollbar size */
Slider sliderV = new Slider(parent, SWT.VERTICAL);
Slider sliderH = new Slider(parent, SWT.HORIZONTAL);
int width = sliderV.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
int height = sliderH.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
cachedScrollBarSize = new Point(width, height);
sliderV.dispose();
sliderH.dispose();
} catch (SWTError er) {
swtBrowserCanBeUsed = false;
} finally {
browserAvailabilityChecked = true;
}
}
return swtBrowserCanBeUsed;
}
示例4: isAvailable
import org.eclipse.swt.browser.Browser; //導入方法依賴的package包/類
/**
* Tells whether the SWT Browser widget and hence this information control is available.
*
* @param parent
* the parent component used for checking or <code>null</code> if none
* @return <code>true</code> if this control is available
*/
public static boolean isAvailable(Composite parent)
{
if (!fgAvailabilityChecked)
{
try
{
Browser browser = new Browser(parent, SWT.NONE);
browser.dispose();
fgIsAvailable = true;
Slider sliderV = new Slider(parent, SWT.VERTICAL);
Slider sliderH = new Slider(parent, SWT.HORIZONTAL);
int width = sliderV.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
int height = sliderH.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
fgScrollBarSize = new Point(width, height);
sliderV.dispose();
sliderH.dispose();
}
catch (SWTError er)
{
fgIsAvailable = false;
}
finally
{
fgAvailabilityChecked = true;
}
}
return fgIsAvailable;
}