org.gcube.portlets.user.collectionexplorer.client.util
Class FlexTableUtil

java.lang.Object
  extended by org.gcube.portlets.user.collectionexplorer.client.util.FlexTableUtil

public class FlexTableUtil
extends Object

Utility class to manipulate FlexTables.


Constructor Summary
FlexTableUtil()
           
 
Method Summary
static void copyRow(com.google.gwt.user.client.ui.FlexTable sourceTable, com.google.gwt.user.client.ui.FlexTable targetTable, int sourceRow, int targetRow)
          Copy an entire FlexTable from one FlexTable to another.
static void moveRow(com.google.gwt.user.client.ui.FlexTable sourceTable, com.google.gwt.user.client.ui.FlexTable targetTable, int sourceRow, int targetRow)
          Move an entire FlexTable from one FlexTable to another.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlexTableUtil

public FlexTableUtil()
Method Detail

copyRow

public static void copyRow(com.google.gwt.user.client.ui.FlexTable sourceTable,
                           com.google.gwt.user.client.ui.FlexTable targetTable,
                           int sourceRow,
                           int targetRow)
Copy an entire FlexTable from one FlexTable to another. Each element is copied by creating a new HTML widget by calling HTMLTable.getHTML(int, int) on the source table.

Parameters:
sourceTable - the FlexTable to copy a row from
targetTable - the FlexTable to copy a row to
sourceRow - the index of the source row
targetRow - the index before which to insert the copied row

moveRow

public static void moveRow(com.google.gwt.user.client.ui.FlexTable sourceTable,
                           com.google.gwt.user.client.ui.FlexTable targetTable,
                           int sourceRow,
                           int targetRow)
Move an entire FlexTable from one FlexTable to another. Elements are moved by attempting to call HTMLTable.getWidget(int, int) on the source table. If no widget is found (because null is returned), a new HTML is created instead by calling HTMLTable.getHTML(int, int) on the source table.

Parameters:
sourceTable - the FlexTable to move a row from
targetTable - the FlexTable to move a row to
sourceRow - the index of the source row
targetRow - the index before which to insert the moved row


Copyright © 2014. All Rights Reserved.