openjfx-dev Digest, Vol 4, Issue 11

dandem sai pradeep saipradeep.dandem at gmail.com
Wed Mar 7 21:37:05 PST 2012


Hi Jonathan,
It is very interesting to see that, my much awaited feature is going to be
added in tableview component :) ( ie., customized headers or graphic
property in column header ).

I am not sure whether this is a right context to ask this or not, Are there
any plans to introduce the "Locking Column / Freeze Column" feature in the
TableView.?
A more explanatory example can be found in the below link..
http://dev.sencha.com/deploy/ext-4.0.0/examples/grid/locking-grid.html

Some thing an extra feature(locked) for the TableColumn which will be like

TableColumn column1 = new TableColumn();
column1.setLocked(true);

TableColumn column2 = new TableColumn();
column2.setLocked(true);

TableColumn column3 = new TableColumn();
TableColumn column4 = new TableColumn();
..
..
..

In which the first two columns are locked and the remaining columns are
displayed with horizontal scroll bar.
Please let me know your opinion regarding this functionality.

Thanks & Regards,
Sai Pradeep Dandem.



On Thu, Mar 8, 2012 at 3:04 AM, <openjfx-dev-request at openjdk.java.net>wrote:

> Send openjfx-dev mailing list submissions to
>        openjfx-dev at openjdk.java.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://mail.openjdk.java.net/mailman/listinfo/openjfx-dev
> or, via email, send a message with subject or body 'help' to
>        openjfx-dev-request at openjdk.java.net
>
> You can reach the person managing the list at
>        openjfx-dev-owner at openjdk.java.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of openjfx-dev digest..."
>
>
> Today's Topics:
>
>   1. TableView enhancements for JavaFX 2.2 (Jonathan Giles)
>   2. Re: TableView enhancements for JavaFX 2.2 (Tom Eugelink)
>   3. Re: TableView enhancements for JavaFX 2.2 (Jonathan Giles)
>   4. Re: TableView enhancements for JavaFX 2.2 (Jonathan Giles)
>   5. Re: TableView enhancements for JavaFX 2.2 (Daniel Zwolenski)
>   6. Re: TableView enhancements for JavaFX 2.2 (Jonathan Giles)
>   7. Re: TableView enhancements for JavaFX 2.2 (Tom Schindl)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 08 Mar 2012 09:40:40 +1300
> From: Jonathan Giles <jonathan.giles at oracle.com>
> Subject: TableView enhancements for JavaFX 2.2
> To: "openjfx-dev at openjdk.java.net" <openjfx-dev at openjdk.java.net>
> Message-ID: <4F57C7C8.3080806 at oracle.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi all,
>
> I'm in the very early stages of planning improvements to TableView for
> JavaFX 2.2, particularly centred around the following three Jira issues.
>
> http://javafx-jira.kenai.com/browse/RT-19450
> http://javafx-jira.kenai.com/browse/RT-14943
> http://javafx-jira.kenai.com/browse/RT-14909
>
> Basically, I am wanting to make it easier to style and customise
> TableView. The two main use cases are:
>
> 1) allowing for CSS styling to, for example, change the background
> colour of a given column. This requires that we provide an easy way to
> expose each column via CSS. As mentioned in RT-19450, the best
> approaches I can think of right now are to add two style classes per
> column: column-x (where x is the column index), and also a styleclass of
> the TableColumn.text property (although I'm not sure this second
> styleclass is really necessary or useful, as the id property can be used
> to achieve the same thing, and we don't overuse the styleclass list). To
> achieve this, I'd need to add more API to the TableColumn class for
> id/style/styleclass.
>
> 2) allowing for developers to customise the TableColumn header area, for
> example, to allow for people to put filter buttons in, hide the sort
> arrows, add a media player control, etc.
>
> The general approach I want to take is to have TableColumn copy (not
> extend from) a number of the Labeled APIs, as well as the
> id/style/styleclass properties. My justification for wanting to take
> this approach is to prevent TableColumn becoming a Control. A similar
> discussion will need to be had about Tab, which has much the same
> requirements. Perhaps there is a need for some kind of abstract
> interface / class that sits above Labeled, but I think this may be
> taking things too far (for possibly no perceivable gain, except perhaps
> ensuring API consistency). Another option is to have a 'label' property
> that people can interact with directly.
>
> With the addition of the Labeled API, I can then easily add listeners to
> maintain the relevant id/style/styleclass on each TableColumn skin, and
> add API to allow for customisation of the header area (refer to RT-14909
> for a example of the API I have in mind).
>
> If you have any concerns, questions or feature requests related to this
> topic, please put them forward in this thread.
>
> Thanks,
> Jonathan
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 07 Mar 2012 22:02:02 +0100
> From: Tom Eugelink <tbee at tbee.org>
> Subject: Re: TableView enhancements for JavaFX 2.2
> To: openjfx-dev at openjdk.java.net
> Message-ID: <4F57CCCA.2030407 at tbee.org>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>
> Wat would be interesting is to be able to indicate that a cell as an
> error, maybe by showing a red border. Or by some overlay.
>
>
> On 2012-03-07 21:40, Jonathan Giles wrote:
> > Hi all,
> >
> > I'm in the very early stages of planning improvements to TableView for
> JavaFX 2.2, particularly centred around the following three Jira issues.
> >
> > http://javafx-jira.kenai.com/browse/RT-19450
> > http://javafx-jira.kenai.com/browse/RT-14943
> > http://javafx-jira.kenai.com/browse/RT-14909
> >
> > Basically, I am wanting to make it easier to style and customise
> TableView. The two main use cases are:
> >
> > 1) allowing for CSS styling to, for example, change the background
> colour of a given column. This requires that we provide an easy way to
> expose each column via CSS. As mentioned in RT-19450, the best approaches I
> can think of right now are to add two style classes per column: column-x
> (where x is the column index), and also a styleclass of the
> TableColumn.text property (although I'm not sure this second styleclass is
> really necessary or useful, as the id property can be used to achieve the
> same thing, and we don't overuse the styleclass list). To achieve this, I'd
> need to add more API to the TableColumn class for id/style/styleclass.
> >
> > 2) allowing for developers to customise the TableColumn header area, for
> example, to allow for people to put filter buttons in, hide the sort
> arrows, add a media player control, etc.
> >
> > The general approach I want to take is to have TableColumn copy (not
> extend from) a number of the Labeled APIs, as well as the
> id/style/styleclass properties. My justification for wanting to take this
> approach is to prevent TableColumn becoming a Control. A similar discussion
> will need to be had about Tab, which has much the same requirements.
> Perhaps there is a need for some kind of abstract interface / class that
> sits above Labeled, but I think this may be taking things too far (for
> possibly no perceivable gain, except perhaps ensuring API consistency).
> Another option is to have a 'label' property that people can interact with
> directly.
> >
> > With the addition of the Labeled API, I can then easily add listeners to
> maintain the relevant id/style/styleclass on each TableColumn skin, and add
> API to allow for customisation of the header area (refer to RT-14909 for a
> example of the API I have in mind).
> >
> > If you have any concerns, questions or feature requests related to this
> topic, please put them forward in this thread.
> >
> > Thanks,
> > Jonathan
> >
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 08 Mar 2012 10:09:38 +1300
> From: Jonathan Giles <jonathan.giles at oracle.com>
> Subject: Re: TableView enhancements for JavaFX 2.2
> Cc: openjfx-dev at openjdk.java.net
> Message-ID: <4F57CE92.1040603 at oracle.com>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Yes, this is true, and I heard it mentioned today elsewhere too. So,
> there has been talk for sometime about validation APIs, etc, and this
> may one day be applicable, but there is also a simpler way that we
> could do in 2.2. We could just add a styleclass to each row in the
> TableView visible area that represents its index, and have both column
> and row styleclasses in the TableCell. I'll have to check with David,
> our CSS guy, on how much of a heart attack this may give him though.
>
> For example, the third column of a TableView might be column-3 (or
> column-2, I'm not sure if we should count from zero or one), and the
> third row might be row-3 (or row-2). I would then possibly also have
> the TableCell include both style classes, so that you could write
> something like:
>
> .table-cell:column-3:row-3 {
>    -fx-background-color: red;
> }
>
> If you wanted to fill all cells in the 5th column with a green fill,
> you could do:
>
> .table-cell:column-5 {
>   -fx-background-color: green;
> }
>
> And, of course, if you wanted to fill a row with a blue fill, you could
> do:
>
> .table-cell:row-10 {
>    -fx-background-color: blue;
> }
>
> I think this might be a little painful initially, but when combined
> with a future validation API that knows explicitly about TableView and
> its styleclass approach above, you could get some cool stuff happening
> fairly simply.
>
> -- Jonathan
>
> On Thursday, 8 March 2012 10:02:02 a.m., Tom Eugelink wrote:
> >
> > Wat would be interesting is to be able to indicate that a cell as an
> > error, maybe by showing a red border. Or by some overlay.
> >
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 08 Mar 2012 10:12:05 +1300
> From: Jonathan Giles <jonathan.giles at oracle.com>
> Subject: Re: TableView enhancements for JavaFX 2.2
> To: openjfx-dev at openjdk.java.net
> Message-ID: <4F57CF25.60000 at oracle.com>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> I should quickly note that this is consistent with how the chart API
> does things, where it exposes series and data nodes via CSS with a
> counter value appended to the style class to represent each node
> separately.
>
> Also, my gut feeling is that we count from zero to be consistent with
> how columns and rows are represented in Java.
>
> -- Jonathan
>
> On Thursday, 8 March 2012 10:09:38 a.m., Jonathan Giles wrote:
>
>
>
> ------------------------------
>
> Message: 5
> Date: Thu, 8 Mar 2012 07:18:46 +1000
> From: Daniel Zwolenski <zonski at googlemail.com>
> Subject: Re: TableView enhancements for JavaFX 2.2
> To: jonathan.giles at oracle.com
> Cc: openjfx-dev at openjdk.java.net
> Message-ID:
>        <CANbPsPxT_pcuq1ceg5qtyVGm3vTE2r-VCTp4o1r=d0pDKZXdMA at mail.gmail.com
> >
> Content-Type: text/plain; charset=ISO-8859-1
>
> I like the idea of being able to style cells (will have a look at the other
> changes later) but might not the index option run into trouble when you
> start adding/removing rows/columns? Row 5 becomes row 4 when you delete row
> 2, so the developer will have to manually adjust the styles.
>
> As a side note, currently I do this sort of styling by using a custom cell
> factory and adding a style class on the cell as needed in the updateItem
> method (or in a listener that holds onto the reference to the cell). Seems
> to work well enough - apart from the issues with adding/removing styles but
> that's a separate issue.
>
>
> On Thu, Mar 8, 2012 at 7:09 AM, Jonathan Giles <jonathan.giles at oracle.com
> >wrote:
>
> > Yes, this is true, and I heard it mentioned today elsewhere too. So,
> there
> > has been talk for sometime about validation APIs, etc, and this may one
> day
> > be applicable, but there is also a simpler way that we could do in 2.2.
> We
> > could just add a styleclass to each row in the TableView visible area
> that
> > represents its index, and have both column and row styleclasses in the
> > TableCell. I'll have to check with David, our CSS guy, on how much of a
> > heart attack this may give him though.
> >
> > For example, the third column of a TableView might be column-3 (or
> > column-2, I'm not sure if we should count from zero or one), and the
> third
> > row might be row-3 (or row-2). I would then possibly also have the
> > TableCell include both style classes, so that you could write something
> > like:
> >
> > .table-cell:column-3:row-3 {
> >   -fx-background-color: red;
> > }
> >
> > If you wanted to fill all cells in the 5th column with a green fill, you
> > could do:
> >
> > .table-cell:column-5 {
> >  -fx-background-color: green;
> > }
> >
> > And, of course, if you wanted to fill a row with a blue fill, you could
> do:
> >
> > .table-cell:row-10 {
> >   -fx-background-color: blue;
> > }
> >
> > I think this might be a little painful initially, but when combined with
> a
> > future validation API that knows explicitly about TableView and its
> > styleclass approach above, you could get some cool stuff happening fairly
> > simply.
> >
> > -- Jonathan
> >
> >
> > On Thursday, 8 March 2012 10:02:02 a.m., Tom Eugelink wrote:
> >
> >>
> >> Wat would be interesting is to be able to indicate that a cell as an
> >> error, maybe by showing a red border. Or by some overlay.
> >>
> >>
>
>
> ------------------------------
>
> Message: 6
> Date: Thu, 08 Mar 2012 10:23:28 +1300
> From: Jonathan Giles <jonathan.giles at oracle.com>
> Subject: Re: TableView enhancements for JavaFX 2.2
> Cc: openjfx-dev at openjdk.java.net
> Message-ID: <4F57D1D0.7030202 at oracle.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Yes - as columns and rows change positions, their indices will have to
> change too.
>
> Depending on the use case this may be fine. Basically some people will
> want to style columns and rows based on the index the cells find
> themselves in, whereas others want to style rows and columns based on
> the content the cells contain. Unfortunately I don't have a strong gut
> feeling on which is the more common use case. The approach I'm
> suggesting here is perfect for the former use case, but terrible for the
> latter. I'd love to hear an idea for the latter approach though, and it
> may entail the kind of approach you mention where it is left up to the
> developer and their cell factories...
>
> -- Jonathan
>
>
> On 8/03/2012 10:18 a.m., Daniel Zwolenski wrote:
> > I like the idea of being able to style cells (will have a look at the
> > other changes later) but might not the index option run into trouble
> > when you start adding/removing rows/columns? Row 5 becomes row 4 when
> > you delete row 2, so the developer will have to manually adjust the
> > styles.
> >
> > As a side note, currently I do this sort of styling by using a custom
> > cell factory and adding a style class on the cell as needed in the
> > updateItem method (or in a listener that holds onto the reference to
> > the cell). Seems to work well enough - apart from the issues with
> > adding/removing styles but that's a separate issue.
> >
> >
> > On Thu, Mar 8, 2012 at 7:09 AM, Jonathan Giles
> > <jonathan.giles at oracle.com <mailto:jonathan.giles at oracle.com>> wrote:
> >
> >     Yes, this is true, and I heard it mentioned today elsewhere too.
> >     So, there has been talk for sometime about validation APIs, etc,
> >     and this may one day be applicable, but there is also a simpler
> >     way that we could do in 2.2. We could just add a styleclass to
> >     each row in the TableView visible area that represents its index,
> >     and have both column and row styleclasses in the TableCell. I'll
> >     have to check with David, our CSS guy, on how much of a heart
> >     attack this may give him though.
> >
> >     For example, the third column of a TableView might be column-3 (or
> >     column-2, I'm not sure if we should count from zero or one), and
> >     the third row might be row-3 (or row-2). I would then possibly
> >     also have the TableCell include both style classes, so that you
> >     could write something like:
> >
> >     .table-cell:column-3:row-3 {
> >       -fx-background-color: red;
> >     }
> >
> >     If you wanted to fill all cells in the 5th column with a green
> >     fill, you could do:
> >
> >     .table-cell:column-5 {
> >      -fx-background-color: green;
> >     }
> >
> >     And, of course, if you wanted to fill a row with a blue fill, you
> >     could do:
> >
> >     .table-cell:row-10 {
> >       -fx-background-color: blue;
> >     }
> >
> >     I think this might be a little painful initially, but when
> >     combined with a future validation API that knows explicitly about
> >     TableView and its styleclass approach above, you could get some
> >     cool stuff happening fairly simply.
> >
> >     -- Jonathan
> >
> >
> >     On Thursday, 8 March 2012 10:02:02 a.m., Tom Eugelink wrote:
> >
> >
> >         Wat would be interesting is to be able to indicate that a cell
> >         as an error, maybe by showing a red border. Or by some overlay.
> >
> >
>
>
> ------------------------------
>
> Message: 7
> Date: Wed, 07 Mar 2012 22:34:23 +0100
> From: Tom Schindl <tom.schindl at bestsolution.at>
> Subject: Re: TableView enhancements for JavaFX 2.2
> To: "openjfx-dev at openjdk.java.net" <openjfx-dev at openjdk.java.net>
> Message-ID: <4F57D45F.9020901 at bestsolution.at>
> Content-Type: text/plain; charset=UTF-8
>
> I'm wondering if this index-value is a good idea - what happens when one
> reorders columns or remove columns - do the indices then adjust themselves?
>
> java:
> TableColumn c = new TableColumn("Name");
> c.setUserdata("namecol");
>
> css:
>
> .table-cell:namecol {
>  -fx-background-color: green;
> }
>
>
> I also think when it comes to highlighting cells it would be much we
> could use property testers
>
> /* assumeing TableCell has a userdata attribute */
> .table-cell[userdata~="error"] {
>  -fx-background-color: red;
> }
>
>
> Tom
>
> Am 07.03.12 22:12, schrieb Jonathan Giles:
> > I should quickly note that this is consistent with how the chart API
> > does things, where it exposes series and data nodes via CSS with a
> > counter value appended to the style class to represent each node
> > separately.
> >
> > Also, my gut feeling is that we count from zero to be consistent with
> > how columns and rows are represented in Java.
> >
> > -- Jonathan
> >
> > On Thursday, 8 March 2012 10:09:38 a.m., Jonathan Giles wrote:
> >
>
>
> --
> B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
> ------------------------------------------------------------------------
> tom schindl                 gesch?ftsf?hrer/CEO
> ------------------------------------------------------------------------
> eduard-bodem-gasse 5-7/1   A-6020 innsbruck     fax      ++43 512 935833
> http://www.BestSolution.at                      phone    ++43 512 935834
>
>
> End of openjfx-dev Digest, Vol 4, Issue 11
> ******************************************
>



-- 
Regards,
Sai Pradeep Dandem.


More information about the openjfx-dev mailing list