Example usage for com.google.gwt.dom.client TableRowElement getElementsByTagName

List of usage examples for com.google.gwt.dom.client TableRowElement getElementsByTagName

Introduction

In this page you can find the example usage for com.google.gwt.dom.client TableRowElement getElementsByTagName.

Prototype

@Override
    public NodeList<Element> getElementsByTagName(String name) 

Source Link

Usage

From source file:cimav.client.view.nomina.HorasExtrasUI.java

private void buildGrid() {

    List<HoraExtra> list = new ArrayList<>();
    provider = new ListDataProvider<>(list);

    ICustomDataGridResource dataGridResource = GWT.create(ICustomDataGridResource.class);
    dataGridResource.dataGridStyle().ensureInjected();

    dataGrid = new DataGrid<>(60, dataGridResource);

    //dataGrid = new DataGrid<>(provider.getKeyProvider());
    dataGrid.getElement().setId("idDataGrid");

    dataGrid.setAutoHeaderRefreshDisabled(true);

    dataGrid.setEmptyTableWidget(new Label("Sin Horas Extras"));

    dataGrid.setPageSize(20);//  w w w.ja va2 s.co  m

    diaCell = new DatePickerCell(DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.DATE_MEDIUM));
    horasCell = new NomCantidadInputCell();

    initTableColumns();

    // Add the CellList to the adapter in the database.
    provider.addDataDisplay(dataGrid);

    dataGrid.addRowHoverHandler(new RowHoverEvent.Handler() {
        @Override
        public void onRowHover(RowHoverEvent event) {
            TableRowElement rowEle = event.getHoveringRow();
            Element removeHoraExtraEle = rowEle.getElementsByTagName("a").getItem(0);
            if (event.isUnHover()) {
                GQuery.$(removeHoraExtraEle).css(CSS.VISIBILITY.with(Style.Visibility.HIDDEN));
            } else {
                GQuery.$(removeHoraExtraEle).css(CSS.VISIBILITY.with(Style.Visibility.VISIBLE));
            }
        }
    });

}

From source file:cimav.client.view.nomina.NominaFaltasUI.java

private void buildGrid() {

    List<Incidencia> list = new ArrayList<>();
    provider = new ListDataProvider<>(list);

    ICustomDataGridResource dataGridResource = GWT.create(ICustomDataGridResource.class);
    dataGridResource.dataGridStyle().ensureInjected();

    dataGrid = new DataGrid<>(60, dataGridResource);

    //dataGrid = new DataGrid<>(provider.getKeyProvider());
    dataGrid.getElement().setId("idDataGrid");

    dataGrid.setAutoHeaderRefreshDisabled(true);

    dataGrid.setEmptyTableWidget(new Label("Sin incidencias"));

    dataGrid.setPageSize(20);//from w  ww.ja v  a  2 s  .  c o m

    fechaInicioCell = new DatePickerCell(DateTimeFormat.getFormat(PredefinedFormat.DATE_MEDIUM));
    diasCell = new NomIntegerInputCell("80");
    folioCell = new NomTextInputCell();

    initTableColumns();

    //        // Add the CellList to the adapter in the database.
    provider.addDataDisplay(dataGrid);

    dataGrid.addRowHoverHandler(new RowHoverEvent.Handler() {
        @Override
        public void onRowHover(RowHoverEvent event) {
            TableRowElement rowEle = event.getHoveringRow();
            Element removeFaltaEle = rowEle.getElementsByTagName("a").getItem(0);
            if (event.isUnHover()) {
                GQuery.$(removeFaltaEle).css(CSS.VISIBILITY.with(Style.Visibility.HIDDEN));
            } else {
                GQuery.$(removeFaltaEle).css(CSS.VISIBILITY.with(Style.Visibility.VISIBLE));
            }
        }
    });

}

From source file:cimav.client.view.nomina.NominaSaldoUI.java

private void buildGrid() {

    List<Movimiento> nominaQuincenalList = new ArrayList<>();
    provider = new ListDataProvider<>(nominaQuincenalList);

    ICustomDataGridResource dataGridResource = GWT.create(ICustomDataGridResource.class);
    dataGridResource.dataGridStyle().ensureInjected();

    dataGrid = new DataGrid<>(60, dataGridResource);

    //dataGrid = new DataGrid<>(provider.getKeyProvider());

    dataGrid.getElement().setId("idDataGrid");

    dataGrid.setAutoHeaderRefreshDisabled(true);

    dataGrid.setEmptyTableWidget(new Label("Sin movimientos"));

    dataGrid.setPageSize(20);/*from w  ww.ja  v  a  2 s .c  o m*/

    quincenasCell = new NomIntegerInputCell("24");
    saldoCell = new NomCantidadInputCell();
    permanenteCell = new CheckboxCell();

    initTableColumns();

    // Add the CellList to the adapter in the database.
    provider.addDataDisplay(dataGrid);

    dataGrid.addRowHoverHandler(new RowHoverEvent.Handler() {
        @Override
        public void onRowHover(RowHoverEvent event) {
            TableRowElement rowEle = event.getHoveringRow();
            Element removeSaldoEle = rowEle.getElementsByTagName("a").getItem(0);
            if (event.isUnHover()) {
                GQuery.$(removeSaldoEle).css(CSS.VISIBILITY.with(Style.Visibility.HIDDEN));
            } else {
                GQuery.$(removeSaldoEle).css(CSS.VISIBILITY.with(Style.Visibility.VISIBLE));
            }
        }
    });

}

From source file:com.google.speedtracer.client.SourceViewer.java

License:Apache License

/**
 * Returns the cell that contains the line contents for a row.
 *///from  w w  w  .jav a 2s  .c  om
private TableCellElement getRowContentCell(TableRowElement row) {
    NodeList<TableCellElement> cells = row.getElementsByTagName("td").cast();

    for (int i = 0, n = cells.getLength(); i < n; i++) {
        TableCellElement cell = cells.getItem(i);
        if (cell.getClassName().indexOf(LINE_CONTENT) >= 0) {
            return cell;
        }
    }

    return null;
}