How to use fragments of source code in Java

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
alex
Newbie
Newbie
Posts: 3
Joined: Fri Sep 07, 2012 12:00 am

How to use fragments of source code in Java

Post by alex » Mon Sep 10, 2012 8:08 pm

Hi,
We are using TeeChart Android Lib and I have the source code. According to your FAQ, We can integrate part of the source code into our application instead of the whole library. How can I do that? Is there any examples here? BTW, we currently only use the Pie Chart in our application.

Thanks,

Alex

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: How to use fragments of source code in Java

Post by Narcís » Wed Sep 12, 2012 10:47 am

Hi Alex,

Instead of referencing a compiled library you need to set a source code library reference in your project. We don't have a public demo available but that's how we work with the sources most of the time.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

alex
Newbie
Newbie
Posts: 3
Joined: Fri Sep 07, 2012 12:00 am

Re: How to use fragments of source code in Java

Post by alex » Wed Sep 12, 2012 3:03 pm

Hi Narcís,

Thanks for the reply. We will try to used library reference in stead of the apk file. Our main goal is to trim down the package size(it is over 1M). As I mentioned above, we only use the Pie Chart in our application. Could you provide some directions on how to trim the unnecessary code?

Thanks,

alex

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

Re: How to use fragments of source code in Java

Post by Yeray » Thu Sep 13, 2012 8:54 am

Hi,

You can start removing the files in the "styles" folder that correspond to the classes you are not using. For the Pie series you only need Pie*.java, Circular.java, and some general classes like Series.java, SeriesCollection.java, SeriesMarks.java,...
And you can probably remove everything in the "functions" folder, "editors", "exports", "themes", "tools",...
To get the "as little as possible", I'd remove everything but Pie.java. And then, looking at the errors you get, I'd start adding the missing classes.
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

alex
Newbie
Newbie
Posts: 3
Joined: Fri Sep 07, 2012 12:00 am

Re: How to use fragments of source code in Java

Post by alex » Thu Sep 13, 2012 9:53 pm

Thank you very much for the detailed instruction. Really appreciate it. I will do as you suggested.

Thanks,

Alex

Post Reply