JFXtras / jfxtras

A supporting library for JavaFX, containing helper classes, extended layouts, controls and other interesting widgets.

Home Page:http://jfxtras.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Few Questions

dhofstetter opened this issue · comments

Hello everybody,
I really like the agenda control. It's very useful. But there are a few things I'm not sure how to achieve.

  • I don't want to render a day from 00:00 until 23:59, because I want to allow appointments only between 07:00 and 20:00 o'clock. So is there any possibility to do something like that?
  • I'm also interested in rendering not the whole week from Monday to Sunday, but Monday to Friday? Possible anyhow?
  • The last thing is, that I want to know if it's possible to drag and drop appointments into the agenda from Outside. E.g. I have a button and if it gets dragged, the user can place a appointment right where he drops the button. Is there a chance to do something like that?

BR Daniel

Edit:

  • I was now able to use some hacking with overriding the WeekSkin and changing the number of displayed dates from 7 to 5. But I guess some similiar thing won't work for the the TimeLine as there is no way to change the TimeScale24Hour Class without changing your sourcecode.
  1. I have not implemented this behavior, so as it stands no. And right now my focus needs to go to migration to Java 9. But you can ofcourse file a change request.
  2. There is the AgendaDaysFromDisplayedSkin, which allows for some dynamic days. Maybe that could fit?
  3. Again, not a feature that was implemented as such. I'm thinking that you could monitor the drag externally and use the convertClickInSceneToDateTime to automatically generate an appointment.

All three seem like reasonable requests, but this is a free and open source control, so it is a matter of time and effort. Sorry.

Finally I was able to implement the first two things!

I had to copy a lot of classes to get it working. So actually for extending the ordinary weekskin, I had to copy it and make the changes (also to all classes in there). I'm not sure if the changes are, hmm are from good quality. But If you want, I can take some time during holidays and try to make a pull request with the changes.

So now I'm left with the last part, let's see if I can use your hint as good as for the other two points :) 👍

Well, rendering only part of a day is a good change, so I'm curious on how you implemented it. And if all the tests still pass. So yes, please make a PR to give me something to bitch over ;-)
Thanks for considering committing your enhancements!

I have to say I was a bit frustrated, because yesterday I was simply not finding all parts of code, that arrange the appointments. And today I finally found some places where the appointments get moved to the coordinates. Then I was finally able to modify this parts to be dependent on an "offset" also and things get better.
Ok well after I did some things for the project I will need it to, I try to make the pr :)

p.s. can you give me a hint maybe. I'm experimenting with the drag and drop stuff from outside. And so I thought, lets copy some of the code used for dragging appointments. Which means, I create the "dragRectangle" too. But within agenda the dragRectangle has no background and a dashed border. If I use the same code outside, the rectangle is simply totally black. Is there some css code included anywhere? Because I can't find anything about that.
Edit: Sorry Now I found it. (Still no Idea where it get's included, but I found the corresponding css now :) )

BR Daniel

There actually is some logic in how it is setup, but having to deal with all these different types of rendering can be confusing. Agenda is not a simple control.

CSS is included in the control (getUserAgentStylesheet)

Closed due to inactivity