|
|
|
|
Page 1 of 1
|
[ 6 posts ] |
|
Activity appeareance on categories
| Author |
Message |
|
fabio.silva
Joined: Thu Oct 25, 2007 3:33 am Posts: 4
|
 Activity appeareance on categories
Is there a way to make an activity to appear differently depending on the category (row) it is displayed on?
Regards,
Fábio Silva.
Attachments:
File comment: For instance, how to access the visual properties of the activity 'Meeting 4' on the 'Person7' category?
ischeduler.png [ 125.18 KiB | Viewed 4341 times ]
|
| Sun Nov 04, 2007 10:17 pm |
|
 |
|
MiG Support
Site Admin
Joined: Mon Dec 06, 2004 4:24 pm Posts: 2485 Location: Sweden
|
 Re: Activity appeareance on categories
Hello, You can always do a normal override with any code you'd like deciding on anything in the activity AShape. Code: ActivityInteractor.setStaticOverride(AShapeUtil.DEFAULT_BACKGROUND_SHAPE_NAME, AShape.A_PAINT, new OverrideFilter() { public Object getOverride(Object subject, Object defaultObject) { ActivityView av = (ActivityView) subject;
for/if (av.getModel().getCategoryIDs() equals something) return Color.RED;
return defaultObject; } });
|
| Sun Nov 04, 2007 10:29 pm |
|
 |
|
fabio.silva
Joined: Thu Oct 25, 2007 3:33 am Posts: 4
|
 Re: Activity appeareance on categories
Hm... yes, but, in this case, I would like to have the red color for this activity only on a specific category, not for the "whole" activity.
Regards,
Fábio Silva.
Attachments:
ischeduler2.png [ 37.96 KiB | Viewed 4330 times ]
|
| Sun Nov 04, 2007 10:37 pm |
|
 |
|
MiG Support
Site Admin
Joined: Mon Dec 06, 2004 4:24 pm Posts: 2485 Location: Sweden
|
 Re: Activity appeareance on categories
Ah, yes.
You can get the bounds of the activity view and ask the DateGrid of the DefaultDateArea which row it hits. Then check that row's filter for a CategoryFilter and ask it for which categories which it filters (only one in your case I guess) and return a color based on that.
Should work.
The ActivityView does not know that it is only for one category, which is why there is not a more direct way.
|
| Sun Nov 04, 2007 10:45 pm |
|
 |
|
fabio.silva
Joined: Thu Oct 25, 2007 3:33 am Posts: 4
|
 Re: Activity appeareance on categories
The problem is that, in my case, the activities are attached to more than one category (one for each attendee)...
Regards,
Fábio.
|
| Wed Nov 07, 2007 1:16 am |
|
 |
|
MiG Support
Site Admin
Joined: Mon Dec 06, 2004 4:24 pm Posts: 2485 Location: Sweden
|
 Re: Activity appeareance on categories
Yes, bu there is one ActivityView for each category. Only one Activity though.
Thanks,
|
| Mon Jul 05, 2010 1:06 am |
|
|
|
Page 1 of 1
|
[ 6 posts ] |
|
|
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 post attachments in this forum
|
|