You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Eugene Kondrashev <eu...@gmail.com> on 2011/07/10 11:06:48 UTC

Customized table view

Hi!

I need to implement a component that would be something between calendar and
table view.

Let me explain.
In general it should be a grid, much like ms excel grid with possibility to
select ranges of cells.
Cells should be clickable handle single and double clicks.

Described component is similar to the calendar with one difference, - I need
to render some panel in the cell along with the date itself.

And even more - displaying time period should be much more flexible. It
should include such time frames as:
- Quarlat view(three monthes) - it is the most general view with only three
cells and one row
- Month view (the classic calendar)
- Week view - 7 cells and 1 row
- Day view - 6 cells and 4 rows (24h)

In general, the dimension should be set one per creation time.

So, the question is what component should a take as a base?
Should it be a TableView or a Calendar itself?
Any thoughts?

Thanks,
Eugene

Re: Customized table view

Posted by Greg Brown <gk...@verizon.net>.
Have you considered using a TableView with custom cell editors and renderers for this?

On Jul 10, 2011, at 5:06 AM, Eugene Kondrashev wrote:

> Hi!
> 
> I need to implement a component that would be something between calendar and table view.
> 
> Let me explain.
> In general it should be a grid, much like ms excel grid with possibility to select ranges of cells.
> Cells should be clickable handle single and double clicks.
> 
> Described component is similar to the calendar with one difference, - I need to render some panel in the cell along with the date itself. 
> 
> And even more - displaying time period should be much more flexible. It should include such time frames as:
> - Quarlat view(three monthes) - it is the most general view with only three cells and one row
> - Month view (the classic calendar)
> - Week view - 7 cells and 1 row
> - Day view - 6 cells and 4 rows (24h)
> 
> In general, the dimension should be set one per creation time.
> 
> So, the question is what component should a take as a base?
> Should it be a TableView or a Calendar itself?
> Any thoughts?
> 
> Thanks,
> Eugene


Re: Customized table view

Posted by Chris Bartlett <cb...@gmail.com>.
Eugene,

The Pivot Calendar Component uses TablePanes and Spinners to display
its data.  Have you had a look at the source code for its skin?  I
think that might help you a lot.

http://svn.apache.org/repos/asf/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java

Or consider getting the source for the entire project
http://pivot.apache.org/download.cgi#2.0
http://pivot.apache.org/svn.html

Chris

On 10 July 2011 16:06, Eugene Kondrashev <eu...@gmail.com> wrote:
> Hi!
> I need to implement a component that would be something between calendar and
> table view.
> Let me explain.
> In general it should be a grid, much like ms excel grid with possibility to
> select ranges of cells.
> Cells should be clickable handle single and double clicks.
> Described component is similar to the calendar with one difference, - I need
> to render some panel in the cell along with the date itself.
> And even more - displaying time period should be much more flexible. It
> should include such time frames as:
> - Quarlat view(three monthes) - it is the most general view with only three
> cells and one row
> - Month view (the classic calendar)
> - Week view - 7 cells and 1 row
> - Day view - 6 cells and 4 rows (24h)
> In general, the dimension should be set one per creation time.
> So, the question is what component should a take as a base?
> Should it be a TableView or a Calendar itself?
> Any thoughts?
> Thanks,
> Eugene