com.google.gwt.user.client.ui.Tree.add()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(160)

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

Tree.add介绍

[英]Overloaded version for IsWidget.
[中]IsWidget的重载版本。

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Overloaded version for IsWidget.
 *
 * @see #add(Widget)
 */
@Override
public void add(IsWidget w) {
 this.add(asWidgetOrNull(w));
}

代码示例来源:origin: org.eagle-i/eagle-i-common-ui-suggest-gwt

@Override
public void setResource(final EIClass resource) {
  rootClass = resource;
  if ( tree != null ) {
    tree.clear();
    scroll.getElement().getStyle().clearHeight();
  }
  if ( rootClass.hasSubClass() ) {
    if ( tree != null ) {
      tree.add( LOADING );
    }
    rootListLoading = true;
  } else {
    // Probably should assert...
    if ( tree != null ) {
      tree.addItem( "No types are available" );
    }
  }
}

代码示例来源:origin: org.eagle-i/eagle-i-datatools-sweet-gwt

@Override
public void setResource(final EIClass resource) {
  if ( resource != null ) {
    rootClass = resource;
    setTitle( "Taxonomy Browser for Class " + rootClass.getEntity().getLabel() );
    if ( tree != null ) {
      tree.clear();
      scroll.getElement().getStyle().clearHeight();
    }
    if ( rootClass.hasSubClass() ) {
      if ( tree != null ) {
        tree.add( LOADING );
      }
      rootListLoading = true;
    } else {
      // Probably should assert...
      if ( tree != null ) {
        final SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
        tree.addItem( safeHtmlBuilder.appendEscaped( "No types are available").toSafeHtml() );
      }
    }
  } else {
    setTitle( UIMessages.NO_ONTOLOGY_TERMS );
    button.setVisible( false );
    this.setStyleName( "OntologyDropDownNoTerm" );
  }
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Overloaded version for IsWidget.
 *
 * @see #add(Widget)
 */
@Override
public void add(IsWidget w) {
 this.add(asWidgetOrNull(w));
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Overloaded version for IsWidget.
 *
 * @see #add(Widget)
 */
@Override
public void add(IsWidget w) {
 this.add(asWidgetOrNull(w));
}

代码示例来源:origin: stackoverflow.com

import java.io.*;
public class TestTree
{
  public static void main(String[] args) throws Exception
  {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    Tree t = new Tree();
    String s;
    int i=7;
    while(i-->0)
    {
      s = br.readLine();
      t.add(s);
    }
    System.out.println("Tree constructed!");
    t.print();
  }
}

相关文章