Package org.gwtlib.client.table.ui

Examples of org.gwtlib.client.table.ui.Column


    if(root != null) init(root);
  }

  private void init(RootPanel root) {
    Column[] columns = {
      new Column(0, false, "First column", "50%"),
      new Column(1, false, "Second column", "50%")
    };
    final Row[] rows = {
      new Row(0, new Object[] { "First row, first column" , "First row, second column" }),
      new Row(1, new Object[] { "Second row, first column", "Second row, second column" }),
      new Row(2, new Object[] { "Third row, first column" , "Third row, second column" })
View Full Code Here


  private PagingTable createTable() {
    // Set up the columns we want to be displayed
    final CheckBox checkAll = new CheckBox();
    final Column[] columns = {
        new Column(0, false, checkAll, "20", new CheckBoxRenderer()),
        new Column(1, true, "Text (StringRenderer)", "10%"),
        new Column(2, false, "Date (StringRenderer)", "10%"),
        new Column(3, false, "Number (StringRenderer)", "10%"),
        new Column(4, true, "Date (DateTimeRenderer)", "10%", new DateTimeRenderer(DateTimeFormat.getFormat("yyyy-MM-dd"))),
        new Column(5, true, "Number (NumberRenderer)", "10%", new NumberRenderer(NumberFormat.getDecimalFormat())),
        new Column(6, false, "(ListBoxRenderer)", "10%", new ListBoxRenderer(new String[] { "One", "Two", "Three" },
        "Select an item")),
        new Column(7, false, "(ButtonRenderer)", "10%", new ButtonRenderer("Click here")),
        new Column(8, false, "(TextBoxRenderer)", "10%", new TextBoxRenderer(50, 5, "Enter your message")),
        new Column(9, false, "(HyperlinkRenderer)", "10%", new HyperlinkRenderer("A Hyperlink")),
        new Column(10, false, "(ImageRenderer)", "10%", new ImageRenderer("An Image")),
    };
    // Generate some semi-random data for our example
    final Row[] rows = new Row[TOTAL_SIZE];
    for(int i = 0; i < rows.length; ++i) {
      Boolean check = new Boolean(false);
View Full Code Here

  private void init(RootPanel root) {
    ServiceDefTarget endpoint = (ServiceDefTarget)_service;
    endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "person-service");

    Column[] columns = {
      new Column(0, false, "First Name", "50%"),
      new Column(1, false, "Last Name", "50%")
    };
    Table table = new Table(new ColumnLayout(columns));
    table.setSize("100%", "100%");
    table.setContentProvider(new PersonContentProvider(table));
    table.update();
View Full Code Here

    return -1;
  }
 
  public int getSortColumn() {
    for(int i = 0; i < _columns.length; ++i) {
      Column column = _columns[i];
      if(column.getSortDirection() != Column.Sort.NONE) return i;
    }
    return -1;
  }
View Full Code Here

TOP

Related Classes of org.gwtlib.client.table.ui.Column

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.