Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeLabeler's MINUTEINTERVAL should be configurable #3

Closed
bendemboski opened this issue May 5, 2011 · 2 comments
Closed

TimeLabeler's MINUTEINTERVAL should be configurable #3

bendemboski opened this issue May 5, 2011 · 2 comments

Comments

@bendemboski
Copy link
Owner

We should figure out a way to make the MINUTEINTERVAL configurable for code, or better yet, from XML. However, since in XML labelers are only specified by their class names, this might have to be a generic property that could be set for any type of labeler.

@bendemboski
Copy link
Owner Author

Actually, I thought about this a little more, and it doesn't make sense to make this an attribute of the labeler or the ScrollLayout, because then you could specify it for more than one. What would it mean to have a slider with a date and a time, and you set the time interval to 15 minutes and the date interval to 7 days? That doesn't really make sense. This should really be a configurable parameter on the SliderContainer that specifies an interval in minutes.

This would be kind of funky if the interval were not an integer fraction of an hour, because then we would need to know when to anchor the intervals (do we make sure that the initial time is display, and then +- every multiple of the interval from there, or do we make sure that midnight is shown and +- every multiple from there, or something else?) Perhaps eventually we could make this configurable as well, but for now we could probably get away with a stern warning to only make the intervals integer fractions of an hour.

In the future we could also explore defining the interval in milliseconds, so that you could really specify any amount of time as the interval. But again, this is probably overkill right now.

@danielberndt
Copy link
Collaborator

The DateSlider class now takes an additional argument, namely the minuteInterval argument, which will be passed to all scrollLayouts and their labelers. Then it is up to the labeler to make something out of that. In fact, only the MinuteLabeler makes use of that as of now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants