org.gcube.portlets.user.templates.client.components
Class GenericTable

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by org.gcube.portlets.d4sreporting.common.client.uicomponents.ReportUIComponent
                  extended by org.gcube.portlets.user.templates.client.components.GenericTable
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget

public class GenericTable
extends org.gcube.portlets.d4sreporting.common.client.uicomponents.ReportUIComponent

Author:
Massimiliano Assante ISTI-CNR

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
static int DEFAULT_COLS_NUM
           
static int DEFAULT_HEIGHT
           
static int DEFAULT_ROWS_NUM
           
 
Fields inherited from class org.gcube.portlets.d4sreporting.common.client.uicomponents.ReportUIComponent
DELTA, height, left, mainPanel, resizablePanel, top, topPanel, width
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
GenericTable(int rows, int cols, org.gcube.portlets.d4sreporting.common.shared.ComponentType type, Presenter presenter, int left, int top, int width, int height, boolean hideControls)
          Constructor for brand new tables
GenericTable(org.gcube.portlets.d4sreporting.common.shared.Table sTable, Presenter presenter, int top, int left, int width, int height, boolean isLocked)
          constructor called when reading the model
 
Method Summary
 void addColumn()
          add a column next to the last onw
 void addColumnLeft(int colindex)
          adda a column at the left of the selected cell of the selected tableb TODO: next version
 void addRow()
          adda a row at the bottom of the tableb
 void deleteColumn(int colIndex)
          delete the colIndex column from the table
 void deleteLastRow()
          delete the selected row from the table
 void deleteRow(int rowIndex)
          delete the rowIndex row from the table
 int getCols()
           
 com.google.gwt.user.client.ui.FlexTable getMyTable()
           
 ArrayList<org.gcube.portlets.d4sreporting.common.shared.TableCell> getRow(int i)
           
 int getRowsNo()
           
 GenTableCell getSelectedCell()
           
 org.gcube.portlets.d4sreporting.common.shared.Table getSerializable()
           
 void lockComponent(org.gcube.portlets.d4sreporting.common.client.uicomponents.ReportUIComponent toLock, boolean locked)
           
 void removeTemplateComponent(org.gcube.portlets.d4sreporting.common.client.uicomponents.ReportUIComponent toRemove)
           
 void setCols(int cols)
           
 void setMyTable(com.google.gwt.user.client.ui.FlexTable myTable)
           
 void setRows(int rows)
           
 
Methods inherited from class org.gcube.portlets.d4sreporting.common.client.uicomponents.ReportUIComponent
get, getLeft, getMyFakeTextArea, getResizablePanel, getTop, getTopPanel, getType, hideCloseButton, repositionMyPanel, resizePanel, setHeight, setLeft, setLocked, setMyFakeTextArea, setTop, setType
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, performDetachedInitialization, render, render, resolvePotentialElement, setWidget, wrapElement
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_HEIGHT

public static final int DEFAULT_HEIGHT
See Also:
Constant Field Values

DEFAULT_ROWS_NUM

public static final int DEFAULT_ROWS_NUM
See Also:
Constant Field Values

DEFAULT_COLS_NUM

public static final int DEFAULT_COLS_NUM
See Also:
Constant Field Values
Constructor Detail

GenericTable

public GenericTable(int rows,
                    int cols,
                    org.gcube.portlets.d4sreporting.common.shared.ComponentType type,
                    Presenter presenter,
                    int left,
                    int top,
                    int width,
                    int height,
                    boolean hideControls)
Constructor for brand new tables

Parameters:
rows -
cols -
type -
presenter -
left -
top -
width -
height -

GenericTable

public GenericTable(org.gcube.portlets.d4sreporting.common.shared.Table sTable,
                    Presenter presenter,
                    int top,
                    int left,
                    int width,
                    int height,
                    boolean isLocked)
constructor called when reading the model

Parameters:
sTable -
Method Detail

getMyTable

public com.google.gwt.user.client.ui.FlexTable getMyTable()

setMyTable

public void setMyTable(com.google.gwt.user.client.ui.FlexTable myTable)

getRowsNo

public int getRowsNo()

setRows

public void setRows(int rows)

getCols

public int getCols()

setCols

public void setCols(int cols)

getSerializable

public org.gcube.portlets.d4sreporting.common.shared.Table getSerializable()
Returns:

getRow

public ArrayList<org.gcube.portlets.d4sreporting.common.shared.TableCell> getRow(int i)

getSelectedCell

public GenTableCell getSelectedCell()

deleteLastRow

public void deleteLastRow()
delete the selected row from the table


addRow

public void addRow()
adda a row at the bottom of the tableb


addColumn

public void addColumn()
add a column next to the last onw


addColumnLeft

public void addColumnLeft(int colindex)
adda a column at the left of the selected cell of the selected tableb TODO: next version


deleteRow

public void deleteRow(int rowIndex)
delete the rowIndex row from the table


deleteColumn

public void deleteColumn(int colIndex)
delete the colIndex column from the table


lockComponent

public void lockComponent(org.gcube.portlets.d4sreporting.common.client.uicomponents.ReportUIComponent toLock,
                          boolean locked)
Specified by:
lockComponent in class org.gcube.portlets.d4sreporting.common.client.uicomponents.ReportUIComponent

removeTemplateComponent

public void removeTemplateComponent(org.gcube.portlets.d4sreporting.common.client.uicomponents.ReportUIComponent toRemove)
Specified by:
removeTemplateComponent in class org.gcube.portlets.d4sreporting.common.client.uicomponents.ReportUIComponent


Copyright © 2013. All Rights Reserved.