 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Thomas B. Guest
|
Posted: Wed May 24, 2006 2:07 pm Post subject: SWT: Why are scales inverted by default? |
|
|
Hi,
I try to use some scales to create a configuration gui for a hardware
simulator. Eclipse/SWT is used as gui api. This is the code for one
example:
Scale scalewidth;
...
scalewidth = new Scale(selscomposite, SWT.VERTICAL);
scalewidth.setBounds(scalerectangle);
scalewidth.setMaximum(50);
scalewidth.setMinimum(0);
scalewidth.setIncrement(1);
scalewidth.setPageIncrement(3);
scalewidth.setSelection(scalewidth.getMinimum());
I am used to scales having their minimum at the bottom and their
maximum at the top of the scale. The SWT scales are right the opposite.
The minimum is at the top of the scale and vice versa.
Why is this implemented like this, because that's not what an ordinary
user would expect?
It's easy to do a workaround by inverting the scaleoutput in the case
of an event, but I really would like to understand why this is made so
not intuitive? |
|
| Back to top |
|
 |
ducnbyu Guest
|
Posted: Thu May 25, 2006 5:07 pm Post subject: Re: SWT: Why are scales inverted by default? |
|
|
In the 32 years since my first computer class, it has always been my
experience that the default origin is upper left corner. The standard
comes from text terminal days (and before that paper) when you had text
lines and columns. Think of a sheet of paper feeding through a
printer. Where is line 1? Same with a spreadsheet.
For things like mathematical plots you have to invert like you are
doing. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|