Agenda Control questions

414 views
Skip to first unread message

Sebastian Gutierrez

unread,
Aug 5, 2013, 4:20:54 PM8/5/13
to jfxtra...@googlegroups.com
Hi,


I have some questions about the Agenda Control:

1) How can I set the initial hour and final hour that I want to see in the agenda? or I have to see from 00:00 to 23:00
2) Same as before for days (example not to use weekends)
3) How can I scroll to different places in the agenda?
4) When I move an appointment I cant find an event that tells me that the time and date was modified, is there any method to do this?? I tryied the edit one but is never call when dragging and dropping the appointment to other place.


Best regards

Thanks!

Tom

unread,
Aug 6, 2013, 3:24:04 AM8/6/13
to jfxtra...@googlegroups.com
Good questions:

1) There is no such feature (yet), the Agenda at the moment always shows 00:00 to 23:59. But I'm not sure it is a feature I would consider high priority. I can imagine that having the view window preset to 8:00 to 18:00 would be valuable.

2) Also not available yet. But this is something that makes sense to me; only showing certain days per week down to one. But I figure that will be a skin feature, not the control.

3) I do not understand the question. What places do you mean?

4) Changes made to appointments are communicated to the corresponding appointments, so in your case the appropriate setters are called.

Tom
> --
> You received this message because you are subscribed to the Google Groups "JFXtras Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jfxtras-user...@googlegroups.com.
> To post to this group, send email to jfxtra...@googlegroups.com.
> Visit this group at http://groups.google.com/group/jfxtras-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Sebastian Gutierrez

unread,
Aug 7, 2013, 1:02:30 PM8/7/13
to jfxtra...@googlegroups.com
1) ok, this is what  I mean with 3) how to scroll in the view window as you say for example 8 to 18.
2) ok, these could be usefull at least be able to not include weekends or sunday at least so you have more space to view the agenda.
3) scrool on the view of the agenda
4) I still cant find wich method is used when I move the appointment doing drag and drop, can you point me the method that is called upon drag and drop of the appointment?

thanks!

I tested some incluidng this:

 agenda.setCreateAppointmentCallback(new Callback<Agenda.CalendarRange, Agenda.Appointment>() {
            @Override
            public Agenda.Appointment call(Agenda.CalendarRange calendarRange) {
              int i = 0;
                return null;
            }
        });

Tom

unread,
Aug 7, 2013, 1:25:21 PM8/7/13
to jfxtra...@googlegroups.com
1) There is a vertical scrollpane around the days, as soon as the control's height is reduced to a certain minimum, the scrollbar will appear. The minimum height being 24 * 2 * the height of an "X" in the default font + 10. This is something that should become configurable. But it should be done together with the whole default viewport location.

4) The setter on the appointment that is was moved, let go of the idea that the control will tell you somthing, focus on the appointment; just add a print statement in the setStartTime (or if you use the provided implementation register a change listener to the startTime() property) and you'll see. It works like this: the Agenda visualizes the appointments you've provided, it uses their start- and endtimes to render them. If you drag an appointment, these start- and endtimes are updated directly on the appointment, and the agenda simply is redrawn using the changed times in the appointments.

Sebastian Gutierrez

unread,
Aug 7, 2013, 2:07:53 PM8/7/13
to jfxtra...@googlegroups.com
Ok number 4 is resolved with a ChangeListener.

1 Im still trying to figure out where the scrool is, I supposed we could have something like:

agenda.scrollTo(X);

but I cant find anything like that, basically I would like to be able at the start to set the calendar at the middle or maybe better focus on the actual time that is when you open it, (focus the red line that marks the current time)

Tom

unread,
Aug 7, 2013, 2:38:52 PM8/7/13
to jfxtra...@googlegroups.com
As said the the first mail: there is no scroll implemented at this time.

tbeernot

unread,
Jul 29, 2015, 11:56:30 AM7/29/15
to quir...@gmail.com, JFXtras Users
Not for point 1 and 2.

Concerning 3; I will not expose skin features in the control, but recently I did modify displayedLocalDateTime to include scrolling to the appropriate time. So setting that property is as close as scrollTo as it can get.

Tom


On 29-7-2015 17:50, quir...@gmail.com wrote:
Hi Tom, 

Are that features available now please?


Thank you for your help
Best Regards

tbeernot

unread,
Jul 29, 2015, 2:09:42 PM7/29/15
to Quirino Lo Russo, JFXtras Users
1) You can observe the appointments observable list.
http://jfxtras.org/doc/8.0/jfxtras-agenda/jfxtras/scene/control/agenda/Agenda.html

2) An appointment has an appointment group which again has a style class. You can use that to style it.
https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-agenda/src/main/resources/jfxtras/internal/scene/control/skin/agenda/Agenda.css

3) There is an editAppointmentCallback which allows you do to implement your own editing of appointments. The current popup is just a basic version.
http://jfxtras.org/doc/8.0/jfxtras-agenda/jfxtras/scene/control/agenda/Agenda.html


On 29-7-2015 18:23, Quirino Lo Russo wrote:
Ok Tom, 

I really want to thank you for your help!
I have just few more questions about agenda control please.

1) Is it possible to have a callback when an appointment has been deleted from the agenda? 
2) Is it possible to change the color of an appointment by code? 
3) Is it possible to customize the popup panel and the skin of the appointments in the agenda?


Thank you again 
Best Regards

tbeernot

unread,
Jul 29, 2015, 2:14:15 PM7/29/15
to Quirino Lo Russo, JFXtras Users
4) I do not understand what you mean with that first question.
As for the second: right now there is a week and day skin, I have not gotten around to writing a month skin. A month skin is quite different from the 24 hour based day or week skin that is available now, it is not something that is easily made by simply reconfiguring using some CSS skin properties. A complete new skin needs to be written. You are of course welcome to contribute one.

There is a new AgendaSkinSwitcher control, which allows easy switching between the available skins (being 2 at the moment).
    somepane.getChildren().add(new AgendaSkinSwitcher(agenda));

Tom


On 29-7-2015 18:30, Quirino Lo Russo wrote:
just the last one please, I swear : D 
4) Could you send me a link with examples that are using skins properties please? In order to have also a monthly view of the agenda? 

Kind Regards

2015-07-29 18:23 GMT+02:00 Quirino Lo Russo <quir...@gmail.com>:
Ok Tom, 

I really want to thank you for your help!
I have just few more questions about agenda control please.

1) Is it possible to have a callback when an appointment has been deleted from the agenda? 
2) Is it possible to change the color of an appointment by code? 
3) Is it possible to customize the popup panel and the skin of the appointments in the agenda?


Thank you again 
Best Regards
2015-07-29 17:56 GMT+02:00 tbeernot <tbee...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages