本文整理汇总了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;
}