celltable

GWT: Export a CellTable to an image or pdf file

余生长醉 提交于 2020-01-06 02:16:48
问题 I have a CellTable showing data that is plotted in a GFlot SimplePlot. An export of the plot is possible with GFlots integrated function: exportImage = plot.getImage(); Now I would like to export the CellTable too, to show the corresponding data to the plot. Is this possible in some way with GWT on the client-side? It needn't to be the CellTable itself, just the data it shows would suffice. 回答1: I think You can use flash4j library: package com.emitrom.flash4j.demo.client; import com.emitrom

How to customize the last row of a CellTable in GWT?

自作多情 提交于 2019-12-25 08:03:49
问题 Assume each row has the format: Data | <Delete Button> Now I am trying to add an empty row at the end. And I would like to not showing the <Delete Button> at the last row. I added the empty data through data provider. Is there a way to achieve this? 回答1: There is a method you can override when you create a column: Column<MyObject, Number> myColumn = new Column<MyObject, Number>(new NumberCell()) { @Override public String getCellStyleNames(Context context, MyObject myObject) { return context

How do I programmatically get info about a CellTable's headers?

自作多情 提交于 2019-12-24 03:52:57
问题 I'm using GWT 2.4. I have a com.google.gwt.user.cellview.client.CellTable widget, but I'm having trouble figuring out a programmatic way to get the String headers after the widget is constructed. I add column data like so ... tableWidget.addColumn(column, header); where column is a com.google.gwt.user.cellview.client.Column object and header is a String. how can I get the header from either the column or cell table objects? 回答1: For using protected method you can create a custom class, like

Programatic CellTable sort in GWT not working

Deadly 提交于 2019-12-23 10:17:18
问题 I'm using the ListDataProvider example here as a guide. The columns are sorting fine as expectd based on the provided comparators. I'm trying to programatically apply a sort as alluded to on this line from the example: // We know that the data is sorted alphabetically by default. table.getColumnSortList().push(nameColumn); What this does, is it makes the cell column appear to be sorted with the carrot sort indicator. However, the underlying data isn't sorted. Is there a way to get the table

Defining GWT CellTables with UiBinder

故事扮演 提交于 2019-12-21 04:04:35
问题 If I define my CellTable in MyView.ui.xml UiBinder file like this: <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:c="urn:import:com.google.gwt.user.cellview.client" ui:generateFormat='com.google.gwt.i18n.rebind.format.PropertiesFormat' ui:generateKeys='com.google.gwt.i18n.rebind.keygen.MD5KeyGenerator' ui:generateLocales='default' xmlns:p1="urn:import:com.google.gwt.user.cellview.client"> ... <g:HTMLPanel> <c:CellTable

GWT Datagrid does not show data , but contains it

那年仲夏 提交于 2019-12-17 18:40:00
问题 I'm trying to convert a cellTable into a datagrid , because I want to add a search handler later and therefor I need fixed column headers. At the moment I extend the celltable / datagrid class and put the widget into a simplelayoutpanel and add this to my tabpanel . If I use the celltable , all works fine and the data shows up. If I change the type of the class to datagrid , the data shows sometimes up (The column names are always there). To add something to the table I used setRowData or a

GWT CheckboxCell hinders selection in CellTable

感情迁移 提交于 2019-12-13 19:06:38
问题 I discovered that if you have a GWT CellTable and add a column that contains a CheckboxCell , the selection via a SingleSelectionModel does not work anymore. This cell type does hinder the row selection. Following a code sample that demonstrates this behaviour in 2.5.0.rc1. final CellTable<LicenseDto> licenseTable = new CellTable<LicenseDto>(); final SingleSelectionModel<LicenseDto> selectionModel = new SingleSelectionModel<LicenseDto>(); licenseTable.setSelectionModel(selectionModel); //---

Look up GWT CellTable header style/s?

[亡魂溺海] 提交于 2019-12-13 18:56:53
问题 How can TH style name/s of a GWT CellTable's heading be looked up programatically? I have looked at the Client Bundle documentation but it isn't immediately obvious to me how it all fits together. Thanks. 回答1: Not sure exactly what you want to do when accessing the TH style names. If you want to override the standard css style of a celltable header, here are some of the css styles you can override to change the Look and Feel of the component. .cellTableFirstColumnHeader {}

When handling browser events in a GWT CellTable, how do I get the most specific within a cell?

寵の児 提交于 2019-12-12 17:40:52
问题 The onBrowserEvent method of an abstract cell returns a parent element. If I have multiple HTML items rendered within the cell, such as spans or divs, how do I get and distinguish which one triggered the event? 回答1: NativeEvent#getEventTarget() will give you the exact element that fired the event. You can then walk up until you find an element with some discriminant (e.g. a specific CSS class name), or walk down from the parent element and use Element#isOrHasChild(). Have a look at how

GWT 2: how can I add Button to the CellTable's header?

偶尔善良 提交于 2019-12-12 02:19:21
问题 My task is to create a table with a control to add the new lines. This typical control should consist of corresponding set of TextEdits and an "add new row" Button. I use CellTable. I can create this "adding widget" separately just combing button and necessary fields in some panel, but I want to try to bind it to the table. I want to make it using the CellTable. For this purpose I try to utilize the header of the CellTable. I created a Header and added a EditCellText and ButtonCell. I have