org.eclipse.swt.browser.Browser.getData()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中org.eclipse.swt.browser.Browser.getData()方法的一些代码示例,展示了Browser.getData()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Browser.getData()方法的具体详情如下:
包路径:org.eclipse.swt.browser.Browser
类名称:Browser
方法名:getData

Browser.getData介绍

暂无

代码示例

代码示例来源:origin: BiglySoftware/BiglyBT

@Override
public Object
getData(
  String    key )
{
  return( browser.getData( key ));
}

代码示例来源:origin: org.eclipse/org.eclipse.help.ui

private String executeQuery(String domValue) {
  String query = "window.status=\"" + QUERY + "\"+" + domValue + ";"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
  boolean status = browser.execute(query);
  if (status) {
    return (String) browser.getData("query"); //$NON-NLS-1$
  }
  return null;
}

代码示例来源:origin: org.xworker/xworker_swt

public static Object getValue(ActionContext actionContext){
  Thing self = (Thing) actionContext.get("self");
  Browser browser = (Browser) self.getAttribute("browser");
  Object value = browser.getData();
  return value;        
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.intro

public void flagStartOfNavigation() {
  if (implementation.getBrowser().getData("navigation") == null) //$NON-NLS-1$
    implementation.getBrowser().setData("navigation", "true"); //$NON-NLS-1$ //$NON-NLS-2$
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.intro

public void flagStoredTempUrl() {
  if (implementation.getBrowser().getData("tempUrl") == null) //$NON-NLS-1$
    implementation.getBrowser().setData("tempUrl", "true"); //$NON-NLS-1$ //$NON-NLS-2$
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.intro

public void flagStartOfFrameNavigation() {
  if (implementation.getBrowser().getData("frameNavigation") == null) //$NON-NLS-1$
    implementation.getBrowser().setData("frameNavigation", "true"); //$NON-NLS-1$ //$NON-NLS-2$
}

代码示例来源:origin: org.xworker/xworker_swt

public static void homeToolItemSelection(ActionContext actionContext){
  Browser browser = (Browser) actionContext.get("browser");

  ((Thing) actionContext.get("htmlThing")).doAction("setValue", actionContext, UtilMap.toParams(new Object[]{"value", browser.getData()}));
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.intro

if (browser.getData("navigation") != null //$NON-NLS-1$
    && browser.getData("navigation").equals("true")) //$NON-NLS-1$ //$NON-NLS-2$
  return;
  if (browser.getData("frameNavigation") != null) { //$NON-NLS-1$
    if (event.top == false && browser.getData("tempUrl") != null //$NON-NLS-1$
        && browser.getData("tempUrl").equals("true")) { //$NON-NLS-1$ //$NON-NLS-2$
      implementation.getHistory().removeLastHistory();
      flagRemovedTempUrl();
  if (browser.getData("frameNavigation") == null //$NON-NLS-1$
      && event.top == false) {

代码示例来源:origin: org.xworker/xworker_swt

public static void backToolItemSelection(ActionContext actionContext){
  Browser browser = (Browser) actionContext.get("browser");
  browser.back();
  if(!browser.isBackEnabled()){
    ((Thing) actionContext.get("htmlThing")).doAction("setValue", actionContext, UtilMap.toParams(new Object[]{"value", browser.getData()}));
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

Browser browser = (Browser) e.widget;
  BrowserExample app = (BrowserExample) browser
      .getData("org.eclipse.swt.examples.browserexample.BrowserApplication");
  app.show(true, e.location, e.size, e.addressBar, e.menuBar, e.statusBar, e.toolBar);
}));

代码示例来源:origin: org.xworker/xworker_swt

value =  browser.getData("query");

代码示例来源:origin: org.xworker/xworker_swt

public static void htmlToolBarSelection(ActionContext actionContext){
  Browser browser = (Browser) actionContext.get("browser");
  //取ViewForm数据对象的定义,要编辑的数据对象放置在ViewForm的数据对象中
  Object value = browser.getData();
  ActionContext ctx = new ActionContext();
  ctx.put("value", value);
  ctx.put("toolbarSet", actionContext.get("toolbarSet"));
  ctx.put("htmlThing", actionContext.get("htmlThing"));
  Shell newShell = (Shell) PoolableControlFactory.borrowControl(browser.getShell(), "xworker.swt.xworker.HtmlEditor/@shell", ctx);
  //虽然newShell创建时传入的parent是browser.getShell(),但是 newShell.getParent()还是空,所以设置到data中
  newShell.setData("shell_parent", browser.getShell());
  ActionContext newContext = (ActionContext) newShell.getData("_poolActionContext");
  newContext.put("value", value);
  newContext.put("toolbarSet", actionContext.get("toolbarSet"));
  newContext.put("htmlThing", actionContext.get("htmlThing"));
  ((ActionContainer) newContext.get("actions")).doAction("init");
  newShell.setVisible(true);
}

代码示例来源:origin: org.xworker/xworker_swt

ProgressListener lis = (ProgressListener) browser.getData("listener");
if(lis != null){
  browser.removeProgressListener(lis);

相关文章