Changeset 384

Show
Ignore:
Timestamp:
07/27/10 00:13:15 (2 years ago)
Author:
ke
Message:

Need to redisplay main views (i.e. set the new models on them) after loading a saved session.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • kahina/trunk/src/org/kahina/core/KahinaRunner.java

    r383 r384  
    77import org.kahina.core.event.KahinaEvent; 
    88import org.kahina.core.io.magazine.ObjectMagazine; 
    9 import org.kahina.lp.LogicProgrammingStep; 
    109 
    1110public class KahinaRunner 
  • kahina/trunk/src/org/kahina/core/data/tree/KahinaTree.java

    r315 r384  
    88public abstract class KahinaTree extends KahinaObject 
    99{ 
    10     /** 
    11      * Public just to be lightweight. Do not be tempted to directly access 
    12      * this field. 
    13      */ 
    14     public LayerDecider decider; 
     10    protected LayerDecider decider; 
    1511 
    16     /** 
    17      * Public just to be lightweight. Do not be tempted to directly access 
    18      * this field. 
    19      */ 
    20     public KahinaTree primaryModel; 
     12    private KahinaTree primaryModel; 
    2113 
    22     /** 
    23      * Only temporary meaning, does not need to be persisted. 
    24      */ 
    2514    private int referenceNode; 
    2615 
    27     /** 
    28      * Public just to be lightweight. Do not be tempted to directly access 
    29      * this field. 
    30      */ 
    31     public int rootID; 
    32  
    33     public KahinaTree() 
    34     { 
    35         // need no-arg constructor for lightweight subclasses 
    36     } 
     16    private int rootID; 
    3717 
    3818    public KahinaTree(LayerDecider decider) 
  • kahina/trunk/src/org/kahina/core/gui/KahinaGUI.java

    r383 r384  
    3838public class KahinaGUI implements KahinaListener 
    3939{ 
    40         private static final boolean verbose = false; 
     40        private static final boolean verbose = true; 
    4141 
    4242        protected KahinaInstance<?, ?, ?> kahina; 
     
    223223        private void processEvent(KahinaSelectionEvent e) 
    224224        { 
     225                displayMainViews(); 
    225226                if (e.getPanel() == null || livingViews.contains(e.getPanel().view)) 
    226227                { 
    227228            //ignore selections that would lead to an empty current node 
    228             if (e.getSelectedStep() != -1) 
     229                        int stepID = e.getSelectedStep(); 
     230            if (stepID != -1) 
    229231            { 
    230                 int selectedStep = e.getSelectedStep(); 
    231                 displayStepContent(selectedStep); 
    232                 KahinaRunner.processEvent(new KahinaUpdateEvent(selectedStep)); 
     232                if (verbose) 
     233                { 
     234                        System.err.println("Updating selection to step " + stepID); 
     235                } 
     236                displayStepContent(stepID); 
     237                KahinaRunner.processEvent(new KahinaUpdateEvent(stepID)); 
    233238                KahinaRunner.processEvent(new KahinaRedrawEvent()); 
    234239            } 
  • kahina/trunk/src/org/kahina/lp/LogicProgrammingState.java

    r381 r384  
    99import java.util.Set; 
    1010 
    11 import org.kahina.core.KahinaInstance; 
    1211import org.kahina.core.KahinaRunner; 
    1312import org.kahina.core.KahinaState; 
  • kahina/trunk/src/org/kahina/lp/gui/LogicProgrammingGUI.java

    r344 r384  
    5151                mainTreeView.setStatusColorEncoding(LogicProgrammingStepType.FAIL, new Color(183, 50, 50)); 
    5252                mainTreeView.setStatusColorEncoding(LogicProgrammingStepType.REDO, new Color(204, 102, 0)); 
    53                 mainTreeView.setStatusColorEncoding(LogicProgrammingStepType.PSEUDO_UNBLOCKED, Color.LIGHT_GRAY); 
    5453        } 
    5554