Skip to main content

Table in LWUIT.

2 replies [Last post]
corical
Offline
Joined: 2008-01-10

Hi, yes there's been a couple of posts on this subject but it never really cleared up the matter, hopefully we'll get it this time.

Goal: a table like structure that will display data which in turn will change (underlying model) and needs to be updated live with some cell animation.

In short, think of a table containing stock market values. These needs to be updated as you receive new data, the individual cells needs to be updated (values) and I need to flash the background of that cell to graphically indicate an update occurred.

I've tried my hand with 2 scenarios:

1. ) List vertically, representing a column (values from various stock items) where in this instance I can easily update values in the corresponding list cell through probably listening on dataChanged event listener.

2. ) List horizontally where the list represents a row. (a stock item with its values). Inside this list I have simple Labels, that I need to alter and then flag it to be animated.

Both of these are in a container with a BoxLayout.

Am I going in the right direction here, or would it be better to create some Grid component and implement the animations for data that changes.

Thanks,
C

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jrousset
Offline
Joined: 2009-01-19

Hey corical,
I guess the better option is to create a Table component, extending Component, with a 2 dimensional model.
I guess you can inspire yourself from the source code of the J2SE JTable Component.

saturon

I have a table component in my app. I started off with the netbeans
mobility pack table component and extended it for my needs.

The fine grained control (layouting etc.) I needed worked best when
drawing this component myself.

Rgds Ben

-----Original Message-----
From: lwuit-users@mobileandembedded.org
[mailto:lwuit-users@mobileandembedded.org]
Sent: Montag, 9. März 2009 17:57
To: users@lwuit.dev.java.net
Subject: Re: Table in LWUIT.

Hey corical,
I guess the better option is to create a Table component, extending
Component, with a 2 dimensional model. I guess you can inspire yourself
from the source code of the J2SE JTable Component. [Message sent by
forum member 'jrousset' (jrousset)]

http://forums.java.net/jive/thread.jspa?messageID=335884

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net