File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Colors for Relationships Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Colors for Relationships" Watch "Colors for Relationships" New topic
Author

Colors for Relationships

Vignesh Murali Natarajan
Ranch Hand

Joined: Jul 24, 2006
Posts: 65

Hi,
In my class diagram, I have a lot of relationships running in every which direction. I am using random colors to distinguish one relationship(and its stereotypes) from another? I know UML has standard colors set aside for stereotypes. Is this wrong? Should I resort to just using black? (If I should not be using other colors why on earth do most UML tools provide the ability to change colors )


ThanQ,
Vignesh Murali N
www.vigneshmurali.com
SCJP(95%), SCWCD(92%), SCBCD(97%), SCDJWS(97%), SCBCD5(100%), OCMJEA
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1088
    
  10

your question is not clear to me...why do you want to distinguigsh relationships with colors?
I mean, generalization/realization/association(composition/aggregation)/usage dependancy all have different arrowheads and line styles. That itself is sufficient, right?


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
Vignesh Murali Natarajan
Ranch Hand

Joined: Jul 24, 2006
Posts: 65

Ranganathan Kaliyur Mannar wrote:your question is not clear to me...why do you want to distinguigsh relationships with colors?
I mean, generalization/realization/association(composition/aggregation)/usage dependancy all have different arrowheads and line styles. That itself is sufficient, right?


Ranganathan,
I did not mean distinguishing between different relationships like dependency, realization association etc. What I meant was that I was using random colors to distinguish relationships of one class from another. For Instance, all relationships(and their corresponding stereotypes) arising from a single class will have the same color. This was done because there were many class linked together and hence to improve readability. Hope I am making my point clear
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1088
    
  10

still not clear...I understand that you obviously cannot paste the diagram. suppose class A has (composition) class B, class C, then you how the relationship with say green color. Another unrelated class D has class E (composition). Are you showing this in different color? I don't think its a good idea. btw, how many classes do you have?
Vignesh Murali Natarajan
Ranch Hand

Joined: Jul 24, 2006
Posts: 65

Ranganathan Kaliyur Mannar wrote:still not clear...I understand that you obviously cannot paste the diagram. suppose class A has (composition) class B, class C, then you how the relationship with say green color. Another unrelated class D has class E (composition). Are you showing this in different color? I don't think its a good idea. btw, how many classes do you have?


I had close to 60 classes. Lets say Class A has relationships with Class B & C(association and dependency). Both are shown in green color. Similarly lets say Class B has relationship with Class D & E (be it any relationship), these both are shown in orange color. The colors are not picked based on the type of relationships, but just random colors have been used.
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1088
    
  10

hmm...I don't think its a good idea to use different colors for relationship 'lines' of different classes...maybe you can use the same color for the same 'type' of relationship. Also, when we use color for a class or note its huge and visible. When you use color for a line it may not be clearly visible. That is again a negative point for us. In Sheil's chapter 9, he says that we have to provide 'legend' if we are using colors. If you are using random colors, again you have a problem.

As for UML tools providing options for colors:
I have myself used colors in my designs where I show classes in 'yellow' and notes in 'pink' - but not for the relationship lines - and I am not using any colors for the exam...
Vignesh Murali Natarajan
Ranch Hand

Joined: Jul 24, 2006
Posts: 65

Ranganathan Kaliyur Mannar wrote:hmm...I don't think its a good idea to use different colors for relationship 'lines' of different classes...maybe you can use the same color for the same 'type' of relationship. Also, when we use color for a class or note its huge and visible. When you use color for a line it may not be clearly visible. That is again a negative point for us. In Sheil's chapter 9, he says that we have to provide 'legend' if we are using colors. If you are using random colors, again you have a problem.

As for UML tools providing options for colors:
I have myself used colors in my designs where I show classes in 'yellow' and notes in 'pink' - but not for the relationship lines - and I am not using any colors for the exam...



OK. Thanks for sharing your thoughts
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Colors for Relationships