ThoranCheLadra / TP3

Team U TP3 Project: Algorithm Animator.
0 stars 0 forks source link

ChangeLabel.java #4

Closed CraWleRLT closed 11 years ago

CraWleRLT commented 11 years ago

So right now we have this method in it:

@Override
public void begin(Animator source) {
    // TODO Auto-generated method stub
    if (reference instanceof Rect) {
        ((Rect)reference).setLabel(labelTo);
    } else if (reference instanceof AnimatedArray) {
        AnimatedArray.setInfo(labelTo);
    }
    AnimatedArray.panel.repaint();
}

Which obviously fucks it up while using other data structures other than AnimatedArray. The only and easiest solution I can think of right now is just to make it link to Main.anim.panel.repaint(). But then it become quite a pain in the ass while testing other data structures. We basically need to run through all of your classes and fix similar bugs to these (which I am thinking of doing). Do you guys have nice suggestions for these kind of issues?

CraWleRLT commented 11 years ago

AnimatedLinkedLists for Andrew Gibson. There are quite a lot of inconsistencies and stuff, so we need to make our base code, especially GUI, consistent and usable for all data structures. But it works right now. You can further develop the AnimatedLinkedLists using these files, I guess. 1) I added swaps 2) In continuous animation, the newly added elements don't appear (something to do with different way of stepping forward (yes, exactly stepping forward) in continous animations (because it's different from the GUI next buttons)).

(Uploaded to Facebook)