Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Locked Add Numerical Display to Spped Table
Sorry to be so long getting back to this topic.
I've made a couple of attempts at getting the digits to line up vertically, and there doesn't seem to be a clear-cut way to do it. Perhaps somebody else knows how and is willing to contribute that code. Instead, I've added boxes above the sliders and adjusted the font in them so that they fit. On some platforms, this results in quite small type (e.g. on Linux, you get 5 point characters); still readable, but small. You can type the numbers in there directly and the slider will adjust, or you can move the slider until the number is right. I'll put out a test version over the weekend. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957) |
Mark Gurries
How about this Bob,
How About a magnifying feature to work with the small point size. When one clicks on a slider adjustment or places the pointer on the small numerical box above it, the numerical box grows larger (even overlapping other adjacent boxes somewhat if necessary) such that the number become very visible and easy to change. When one clicks on another slider, numerical box, anywhere in a neutral window pane area or finishes typing in the number and hit return, the box that has grown will now shrink back to normal size showing the old or new value as required. Another Idea is to have a dedicated numerical box that has a very readable font size on the window pane some place above the speed table. When one clicks on any slider, the box is updated to reflect the value that correlates with that slider. When no slider is selected, the box goes blank. Data entry is also done with this box. As before when a slider is selected, the value in the box can be changed by clicking on the box, making you entry and hitting return. After hitting return, the box goes back to being just a display box. Of course sliding the slider will dynamically update both the small font box and the big box. The purpose of clicking on the box to perform data entry is to prevent accidental data changes. The changes must be deliberate. Of course your table graphical editing automation tools will work without clicking the box. Sorry to be so long getting back to this topic. Best Regards, Mark Gurries Linear Technology Power Supply & Battery charger Applications Engineer/Manager --------------------------------------------------------- Model Railroad Club and NMRA DCC presentations are at: -------------------------------------------------------- Audio Enthusiast (Love SAE equipment) ---------------------------------------------------------- |
Alex Shepherd
Hi Bob,
toggle quoted message
Show quoted text
I just did a CVS update and run to have a look at the value boxes on top of the sliders and yes the font is pretty small. Even when you set the value to 255 the text only fills about 2/3 of the box width. I had a play around with the box and font size by tweaking the following lines: a) In the DecVariableValue constructor I changed: _value = new JTextField("0",4); to _value = new JTextField("0",3); b) In SpeedTableVarValue.getRep I changed: float newSize = (v.getFont().getSize()+0.5f)/2.f; to float newSize = v.getFont().getSize() * 0.8f; This gives me a font size of about 10 and it makes a space between the sliders of about 1 mm so the page does not change much and makes the text quite readable. Looking at the code I'm not really sure what actually determines the width of the text box and what I tweaked may not have made a difference as with the above settings there is almost room for another character. Also I see you mention some buttons that set the curve to some preset shapes but they don't show up when I run the code. Maybe they are not checked-in yet... Alex ----- Original Message -----
From: "Bob Jacobsen" <Bob_Jacobsen@...> To: <jmriusers@...> Sent: Saturday, July 27, 2002 4:16 AM Subject: [jmriusers] Re: Add Numerical Display to Spped Table Sorry to be so long getting back to this topic. |
Hi Bob,That sounds like a big improvement over the way I left it. Could you commit those changes? Also I see you mention some buttons that set the curve to some preset shapesSorry, I was behind on checking in the source. I just committed a couple of things: a) The buttons on the speed table b) Convenience fixes to the roster menu filehandling so that it goes to a reasonable place when it opens the first time, and it remembers where you were later. c) A new "Speedometer" tool, available under the Development menu in the JmriDemo program. It times the interval between two input sensors going inactive or active and converts that to scale MPH. Still rudimentary, but I wanted to see how well it would actually work. Note that senors only work with LocoNet now; NCE/Lenz feedback is polled, and I don't have any code to do that. More to follow... Bob -- -------------- Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957) |
Alex Shepherd
That sounds like a big improvement over the way I left it. Could youDone, I hope changing the field width from 4 to 3 did not break something else... shapesAlso I see you mention some buttons that set the curve to some preset They work wellbut they don't show up when I run the code. Maybe they are not checked-in c) A new "Speedometer" tool, available under the Development menu inIs this the begginings of what I was talking about a while ago about automatically being able to calibrate your loco speed table so the the throttle indicates scale MPH? Alex |
At 4:27 PM +1200 7/27/02, Alex Shepherd wrote:
> That sounds like a big improvement over the way I left it. Could youThanks. I'll run that through the tests for this weekend's update.commit those changes?Done, I hope changing the field width from 4 to 3 did not break something It is, but really only the beginning.c) A new "Speedometer" tool, available under the Development menu inIs this the begginings of what I was talking about a while ago about I don't yet understand how people will actually use something like this while programming. Any kind of iterative procedure to find the value for all 28 speed steps would take a _long_ time, and I'm not sure it's worthwhile. For a single value it could work, though I'm not sure how linear the typical locomotive is. Mostly I'd like to play with it when I get some time on the layout, and encourage other people to do that too. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957) |
to navigate to use esc to dismiss