Inconsistency in colors

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
patronas
Newbie
Newbie
Posts: 24
Joined: Fri Mar 01, 2019 12:00 am

Inconsistency in colors

Post by patronas » Thu Mar 07, 2019 11:51 am

We have noticed, that TChart.background uses SWT colors while the rest uses your own color class. Is there a reason behind that?

Marc
Site Admin
Site Admin
Posts: 920
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Inconsistency in colors

Post by Marc » Tue Mar 19, 2019 2:33 pm

Hello,

Yes, not sure why it is the way it is. Internally it calls the TeeChart Color class.

ie.

Code: Select all

public void setBackground(Color value) {
	chart.getPanel().setColor(new com.steema.teechart.drawing.Color(value.getRed(), value.getGreen(), value.getBlue()));
}
Perhaps when the SWT version was being designed originally there was a need for SWT color to be set and simply it wasn't changed to the TeeChart colour once code had consolidated.

Regards,
Marc
Steema Support

Yeray
Site Admin
Site Admin
Posts: 8704
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Inconsistency in colors

Post by Yeray » Wed Mar 20, 2019 8:10 am

Just to add a note.
TChart class in TeeChart Java SWT inherits from Composite which inherits getBackground and setBackground from Control.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply