How do I add general Button or Label widget into CellTable ?

177 views
Skip to first unread message

suresh babu

unread,
Sep 15, 2011, 3:01:24 AM9/15/11
to google-we...@googlegroups.com
Hi,

I would like to use general Button, and Label widget inside the CellTable column instead of Cell Type like

Text
TextCell - A non-editable cell that displays text
ClickableTextCell - A text field; clicking on the cell causes its ValueUpdater to be called
EditTextCell - A cell that initially displays text; when clicked, the text becomes editable
TextInputCell - A field for entering text
Buttons, Checkboxes and Menus
ActionCell<C> - A button that takes a delegate to perform actions on mouseUp
ButtonCell - A button whose text is the data value
CheckboxCell - A checkbox that can be checked or unchecked
SelectionCell - A drop-down menu for selecting one of many choices
Dates
DateCell - A date that conforms to a specified date format
DatePickerCell - A date picker that displays a month calendar in which the user can select a date
Images
ImageCell - A cell used to render an image URL
ImageResourceCell - A cell used to render an ImageResource
ImageLoadingCell - A cell used to render an image URL. A loading indicator is initially displayed
Numbers
NumberCell - A number that conforms to a specified number format
Compositions
CompositeCell<C> - A composition of multiple Cells.
Decorators
IconCellDecorator<C> - A decorator that adds an icon to another Cell


 Can somebody throw some light on this, Any help would be greatly appreciated. 

Regards

Suresh Babu G



Ashwin Desikan

unread,
Sep 15, 2011, 3:47:20 AM9/15/11
to google-we...@googlegroups.com
Why do u want 2 use a label & button inplae of TextCell /ButtonCell?

You can always create your custom cell by extending one of the abstract cell classes 

Thanks
Ashwin

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

suresh babu

unread,
Sep 15, 2011, 4:13:02 AM9/15/11
to google-we...@googlegroups.com
I have ImageButton which is extend by Button widget, so I want to use this ImageButton into my CellTable.

 Any way I can do this ?.


--
Regards
Suresh Babu G



Ashwin Desikan

unread,
Sep 15, 2011, 4:34:42 AM9/15/11
to google-we...@googlegroups.com
On Thursday 15 September 2011 01:43:02 PM IST, suresh babu wrote:
> I have ImageButton which is extend by Button widget, so I want to use
> this ImageButton into my CellTable.
>
> Any way I can do this ?.
>
>
>
>
> On Thu, Sep 15, 2011 at 1:17 PM, Ashwin Desikan
> <ashwin....@gmail.com <mailto:ashwin....@gmail.com>> wrote:
>
> Why do u want 2 use a label & button inplae of TextCell /ButtonCell?
>
> You can always create your custom cell by extending one of the
> abstract cell classes
>
> Thanks
> Ashwin
>
> Sent from my iPhone
>
> On Sep 15, 2011, at 12:31 PM, suresh babu <suresh...@gmail.com
> <mailto:suresh...@gmail.com>> wrote:
>
>> Hi,
>>
>> I would like to use general Button, and Label widget inside the
>> CellTable column instead of Cell Type like
>>
>> Text
>> TextCell
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/TextCell.html> -

>> A non-editable cell that displays text
>> ClickableTextCell
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/ClickableTextCell.html> -

>> A text field; clicking on the cell causes its ValueUpdater to
>> be called
>> EditTextCell
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/EditTextCell.html> -

>> A cell that initially displays text; when clicked, the text
>> becomes editable
>> TextInputCell
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/TextInputCell.html> -

>> A field for entering text
>> Buttons, Checkboxes and Menus
>> ActionCell<C>
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/ActionCell.html> -

>> A button that takes a delegate to perform actions on mouseUp
>> ButtonCell
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/ButtonCell.html> -

>> A button whose text is the data value
>> CheckboxCell
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/CheckboxCell.html> -

>> A checkbox that can be checked or unchecked
>> SelectionCell
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/SelectionCell.html> -

>> A drop-down menu for selecting one of many choices
>> Dates
>> DateCell
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/DateCell.html> -

>> A date that conforms to a specified date format
>> DatePickerCell
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/DatePickerCell.html> -

>> A date picker that displays a month calendar in which the
>> user can select a date
>> Images
>> ImageCell
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/ImageCell.html> -

>> A cell used to render an image URL
>> ImageResourceCell
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/ImageResourceCell.html> -

>> A cell used to render an ImageResource
>> ImageLoadingCell
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/ImageLoadingCell.html> -

>> A cell used to render an image URL. A loading indicator is
>> initially displayed
>> Numbers
>> NumberCell
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/NumberCell.html> -

>> A number that conforms to a specified number format
>> Compositions
>> CompositeCell<C>
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/CompositeCell.html> -

>> A composition of multiple Cells.
>> Decorators
>> IconCellDecorator<C>
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/IconCellDecorator.html> -

>> A decorator that adds an icon to another Cell
>>
>>
>> Can somebody throw some light on this, Any help would be greatly
>> appreciated.
>>
>> Regards
>> Suresh Babu G
>>
>> <http://www.accountingguru.in/>

>>
>> --
>> You received this message because you are subscribed to the
>> Google Groups "Google Web Toolkit" group.
>> To post to this group, send email to
>> google-we...@googlegroups.com
>> <mailto:google-we...@googlegroups.com>.

>> To unsubscribe from this group, send email to
>> google-web-tool...@googlegroups.com
>> <mailto:google-web-tool...@googlegroups.com>.

>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Google Web Toolkit" group.
> To post to this group, send email to
> google-we...@googlegroups.com
> <mailto:google-we...@googlegroups.com>.

> To unsubscribe from this group, send email to
> google-web-tool...@googlegroups.com
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com>.

> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>
>
> --
> Regards
> Suresh Babu G
>
> <http://www.accountingguru.in/>

>
> --
> You received this message because you are subscribed to the Google
> Groups "Google Web Toolkit" group.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-tool...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.

easiest would be to use the ButtonCell or ImageCell or even the
ActionCell and use the styling of your ImageButton. This would make the
cell appear similar to your ImageButton.

Using Widgets on a Cell is not straightforward. One way to do use a
ClickableTextCell and override its render method, and wrap your
ImageButton to render within this Cell. It would be ugly and you would
have to handle all the events. Also you need to determine if you want
the button to appear permanently or only show it when the cell is
clicked etc

~ashwin

Jeff Larsen

unread,
Sep 15, 2011, 6:54:22 AM9/15/11
to google-we...@googlegroups.com
Short answer is no.

Long answer is yes, but it will take you far more time to implement than you want. 

If you wanted to use similar implementations, you could change your button implementation to work with ButtonBase from the com.google.gwt.widget.client package. 
Reply all
Reply to author
Forward
0 new messages