Bug 24892 - [TTV] number-columns aren't right-aligned
[TTV] number-columns aren't right-aligned
Status: NEW
Product: platform
Classification: Unclassified
Component: Outline&TreeTable
3.x
All All
: P3 (vote)
: 7.4
Assigned To: Martin Entlicher
issues@platform
: UI
Depends on:
Blocks: 33281
  Show dependency treegraph
 
Reported: 2002-06-17 20:27 UTC by Torbjorn Norbye
Modified: 2013-01-17 15:26 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torbjorn Norbye 2002-06-17 20:27:24 UTC
Some of my columns are integers (Integer.TYPE), 
yet the labels in the treetable view are not 
right-aligned.

This usually works correctly with JTable;
here's a fragment from JTable.java:

    /**
     * Default Renderers
     **/
    static class NumberRenderer extends
DefaultTableCellRenderer {
        public NumberRenderer() {
            super();
            setHorizontalAlignment(JLabel.RIGHT);
        }
    }

I'm guessing TreeTable does something special
with cell renderers (to use NetBeans' property
editors perhaps?).
Comment 1 _ ttran 2002-06-18 06:45:49 UTC
akemr is responsible for TreeTableView.
Comment 2 akemr 2002-06-18 09:34:57 UTC
Yes, TreeTableView uses property editor. It will be nice, if
SheetButton can be right-aligned for numbers IMO.
Reassign to Jirka.
Comment 3 Jiri Rechtacek 2002-06-18 18:07:08 UTC
PropertySheet uses IntergerEditor for numbers, this editor doesn't
render value in SheetButton, some extra functionality should be added.
For me it looks as enhancement with UI impact because change a layout
of property sheet. It should be allow for next release. I reassigning
to Jano Rojcek to discuss it on nbui firstly.
If I'm wrong set type and assign back.
Comment 4 Torbjorn Norbye 2002-09-25 00:31:01 UTC
"I'm reassigning to Jano Rojcek to discuss it on nbui firstly" : I
haven't seen anything on nbui; should I raise it there to get
agreement?
Comment 5 jrojcek 2002-09-25 16:22:25 UTC
Well, it is correct to right align values in number columns in table
or tree table. It should be done also when editing such value. Move to
nbui if further discussion is needed.

David-John, I hope it works for you in debugger.
Comment 6 David-john Burrowes 2002-09-25 16:49:46 UTC
Yes, that seems fine to me.
To recap: We are saying when a column in the treetable will only contain integer values, 
then the contents of those values will be right aligned.  By the JLF guide, the titles of the 
columns should remain centered [ick. <- personal opinion. :-)]
We ought to be doing something similar with floating point values, though this probalby 
should align the values around the marker between the integer and fractional parts.  

See also:
http://java.sun.com/products/jlf/ed2/book/HIG.Misc2.html
http://java.sun.com/products/jlf/at/book/Idioms4.html#996727


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo