View unanswered posts | View active topics It is currently Sun Mar 26, 2017 4:02 pm



This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
 Activity appeareance on categories 
Author Message

Joined: Thu Oct 25, 2007 3:33 am
Posts: 4
Post 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
ischeduler.png [ 125.18 KiB | Viewed 11524 times ]
Sun Nov 04, 2007 10:17 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post 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
Profile WWW

Joined: Thu Oct 25, 2007 3:33 am
Posts: 4
Post 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
ischeduler2.png [ 37.96 KiB | Viewed 11513 times ]
Sun Nov 04, 2007 10:37 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post 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
Profile WWW

Joined: Thu Oct 25, 2007 3:33 am
Posts: 4
Post 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
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post 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
Profile WWW
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.