View unanswered posts | View active topics It is currently Fri May 26, 2017 6:00 pm



Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
 I don't know how to put this question 
Author Message

Joined: Sun Mar 19, 2006 5:02 am
Posts: 50
Post I don't know how to put this question
I have used the demo code to create a application.
I have used the theme Editor to edit the themes, witch is awesome.

Now I have started to work on the CATEGORIES ( I have 4 at this stage)

What I need to now know is how to add a new activity to a specific ID.

The Demo in this code sets the activity to CATEGORIES[0]
Code:
      private void handle(MouseEvent e) {
        if (e.isPopupTrigger()) {
          JPopupMenu pop = new JPopupMenu();
          final Point p = e.getPoint();

          pop.add("Add new...").addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              String summary = JOptionPane.showInputDialog(Frame3.this,
                  "Please enter a summary");
              if (summary != null) {
                MutableDateRange dr = dateArea.getDateRangeForPoint(p, false, true, true);
                ImmutableDateRange iDR = new ImmutableDateRange(dr.
                    getStartMillis(), DateRangeI.RANGE_TYPE_MINUTE, 30, null, null);
                Activity act = new DefaultActivity(iDR,
                    new Long( (long) (Math.random() * Long.MAX_VALUE)));
                act.setSummary(summary);
                act.setCategoryIDs(new Object[] {CATEGORIES[0]});
                ActivityDepository.getInstance().addBrokedActivity(act, this,
                    TimeSpanListEvent.ADDED_CREATED);
              }
            }
          });

          pop.show(dateArea, p.x, p.y);
        }
      }


So how do I set a variable that when I click on the ID name in the tree I can then add a activity for that ID

Thanks

Craig

p.s. I hope I have explained myself correctly :-)


Sun Apr 23, 2006 2:15 am
Profile WWW
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post 
Hello Craig,

In the demo code I have some CategoryIDs stored in the CATEGORIES array and I'm just using the first one. You should just use the category ID that you want to associate with the activity instead on CATEGORIES [0].

Or are you wondering how to get the "active" category ID from the category tree?

Cheers,


Sun Apr 23, 2006 11:28 am
Profile WWW

Joined: Sun Mar 19, 2006 5:02 am
Posts: 50
Post 
Well I want to be able to add activity for the other calendars in the tree

can you give me an example of this ??

i.e get the category ID from the category tree and add a new activity

thanks
Craig


Sun Apr 23, 2006 12:47 pm
Profile WWW
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post 
The IDs are stored in the array, so to add for another categoryID try
Code:
act.setCategoryIDs(new Object[] {CATEGORIES[1]});

Instead.

Cheers,


Sun Apr 23, 2006 1:01 pm
Profile WWW

Joined: Sun Mar 19, 2006 5:02 am
Posts: 50
Post 
OK

I want to set a variable that can be set when I click on the category tree

I can not see where I can set it thou

Craig


Sun Apr 23, 2006 1:12 pm
Profile WWW
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post 
The category tree is just a part of the demo. It will be supported for 6.0 as is specified in the JavaDocs for it. You may use it but it's unsupported.

Cheers,


Sun Apr 23, 2006 1:14 pm
Profile WWW

Joined: Sun Mar 19, 2006 5:02 am
Posts: 50
Post 
OH Ok I did not see that

Well can you help me then I want to set up calendars for my staff.
I don't need to have Categories really. What is the easiest way of doing this?


By the way when is Version 6 coming out?

I want to by this in the next month or so will the License work for 6 if I get version 5 with in that time frame

thanks
Craig


Sun Apr 23, 2006 1:22 pm
Profile WWW
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post 
Have you tried the JavaBeans? Take a look at the flash demo on the left site on our site. You can use netBeans for instance to build your app "visually". It is the preferred way if you want to add something fast and easily.

You should also read the guides as they explain how to do things.

The timeframe for 6.0 is "the summer 2006", not more precise than that. Unfortunately 5.0 licenses will not work for 6.0 but there will be an upgrade option of course (about 50%).

Cheers,


Sun Apr 23, 2006 1:27 pm
Profile WWW

Joined: Sun Mar 19, 2006 5:02 am
Posts: 50
Post 
I am in Australia so your Summer is what 3 months away?

is that right ??

if so then I should wait then or is there a cross over period?

Can Java Beans and Theme Editor work together?
As I have built everything with Theme Editor


Craig


Sun Apr 23, 2006 1:38 pm
Profile WWW
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post 
Craig,

Yes, about three months away. So I would say two to four months until release, but I make no promises.

We haven't decided on a cross over period yet, but there will probably be a month or something that you will get 6.0 for free. It might be announced ahead of time or not. Not decided.

Unfortunately you can't mix ThemeEditor and JavaBeans. But it shouldn't be too hard to convert, though you'd have to do it manually. JavaBeans is the "way to go" for the future and they are more versitile.

Cheers,


Sun Apr 23, 2006 1:44 pm
Profile WWW

Joined: Sun Mar 19, 2006 5:02 am
Posts: 50
Post 
Thanks

I am so keen on your product, You have done it so well.
I thinks some friends are going to use it once I have this one running


I have download some of the PDF doc's but can not find out how to add new Calendars

can you point me in the right direction ?


Craig


Sun Apr 23, 2006 1:49 pm
Profile WWW
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post 
Thanks Craig,

You should read the "MiG Calendar Tutorial", "Getting Started" and if you are using the JavaBeans also the JavaBean guide. They should contain everything you need to get started.

They are installed in the start menu if you install the evaluation. Make sure you are using the latest version as well, which is the one on our site.

Cheers,


Sun Apr 23, 2006 1:55 pm
Profile WWW

Joined: Sun Mar 19, 2006 5:02 am
Posts: 50
Post 
I am on a MAC :-D

I have installed the Java beans into jBuilder X and jBuilder 2005.
I know that java beans will not work on 2005.


As soon as you can let me know when I can buy a version that will allow me to get version 6 I will buy it

I don't understand this. I have been though the getting started PDF I week or 2 ago, but I did not see where you can have 1 or more calendars
i.e. Craig, Shelley etc

Craig


Sun Apr 23, 2006 2:05 pm
Profile WWW
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post 
Ahh, a MAC..

Have you tried netBeans 5.0? It's what I use for JavaBean. Or try JFormDesigner it is the best for JavaBeans (it's only a designer though), but it have plugins for the main IDEs in beta.

By adding calendars I didn't understand you meant different calendars for different people. I just though you wanted to add a "calendar"..

You can have different calendars by using categories. You can set filters on the date areas to only show activites for certain categories. How you choose the categories are up to you, you can for instance us a dropdown.

We made a category tree in the demo app. Since it is toggling categories on and off as well as showing them different columns you can use that code as a reference. The category tree can't currently directly be used though so you have to make your own way of selecting categories.

Cheers,


Sun Apr 23, 2006 2:15 pm
Profile WWW

Joined: Sun Mar 19, 2006 5:02 am
Posts: 50
Post 
I have tried net-beans but I have been using jBuilder for so long now it is hard to change, if you know what I mean

How can I send a screen shot to you ?

Craig


Sun Apr 23, 2006 2:23 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 20 posts ]  Go to page 1, 2  Next

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.