1.1 --- a/src/java/isac/gui/WindowApplication.java Wed Feb 23 14:19:00 2005 +0100
1.2 +++ b/src/java/isac/gui/WindowApplication.java Wed Feb 23 16:45:02 2005 +0100
1.3 @@ -160,7 +160,7 @@
1.4 sdialog = InformationProcessor.getSDialog();
1.5 loginScreen.dispose();
1.6 this.show();
1.7 - //openNewWorksheet(DialogGuide.STARTFROM_EMPTY, CalcHead.VIEWSTYLE_FULL);
1.8 + //openNewWorksheet(DialogGuide.STARTFROM_EMPTY_WORKSHEET, CalcHead.VIEWSTYLE_FULL);
1.9 } else {
1.10 loginScreen.showErrorMsg();
1.11 }
1.12 @@ -537,7 +537,7 @@
1.13 logger.error("invalid source for ActionEvent");
1.14 }
1.15 // Formalization f = new Formalization();
1.16 - // openNewWorksheet(f, DialogGuide.STARTFROM_EMPTY,
1.17 + // openNewWorksheet(f, DialogGuide.STARTFROM_EMPTY_WORKSHEET,
1.18 // CalcHead.VIEWSTYLE_SIMPLE_SOLVE);
1.19 }
1.20
2.1 --- a/src/java/isac/wsdialog/DGuide.java Wed Feb 23 14:19:00 2005 +0100
2.2 +++ b/src/java/isac/wsdialog/DGuide.java Wed Feb 23 16:45:02 2005 +0100
2.3 @@ -34,7 +34,11 @@
2.4 /**
2.5 * To express that the user started a calculation from scratch
2.6 */
2.7 - public static final int STARTFROM_EMPTY = 0;
2.8 + public static final int STARTFROM_EMPTY_WORKSHEET = 0;
2.9 + /**
2.10 + * To express that the user started a calculation from scratch
2.11 + */
2.12 + public static final int STARTFROM_EMPTY_CALCHEAD = 0;
2.13 /**
2.14 * To express that the user started a calculation from the example collection
2.15 */
2.16 @@ -43,7 +47,7 @@
2.17 * To express that the user started a calculation from the hierarchy of problems
2.18 */
2.19 public static final int STARTFROM_PROBLEM = 2;
2.20 - public static final int STARTFROM_METHOD = 3; //WN040826
2.21 + public static final int STARTFROM_METHOD = 3;
2.22
2.23 /**
2.24 * The Dialog is not doing anything at the moment
2.25 @@ -69,7 +73,8 @@
2.26 *
2.27 * @param user_id The user
2.28 * @param f Formalization from the example collection or null
2.29 - * @param started_from STARTFROM_EMPTY, STARTFROM_EXAMPLE, STARTFROM_PROBLEMTYPE
2.30 + * @param started_from STARTFROM_EMPTY_WORKSHEET, STARTFROM_EMPTY_CALCHEAD, STARTFROM_EXAMPLE, STARTFROM_PROBLEM,
2.31 + * STARTFROM_METHOD
2.32 * @param requested_calchead_view
2.33 * @return
2.34 * @throws RemoteException
3.1 --- a/src/java/isac/wsdialog/DialogGuide.java Wed Feb 23 14:19:00 2005 +0100
3.2 +++ b/src/java/isac/wsdialog/DialogGuide.java Wed Feb 23 16:45:02 2005 +0100
3.3 @@ -43,7 +43,7 @@
3.4 private Vector datachange_listeners_;
3.5
3.6 private IToWorksheet ui_control_listener_;
3.7 -
3.8 +
3.9 protected UserSettings user_settings_;
3.10
3.11 /**
3.12 @@ -72,29 +72,29 @@
3.13 CalcHead startSpecifying(CalcHead calc_head) {
3.14 int calchead_view;
3.15 String setting_value;
3.16 -
3.17 +
3.18 // set viewstyle according to user settings
3.19 -
3.20 +
3.21 // dummy return of getValue() call until class is completed
3.22 // setting_value = user_settings_.getValue("DefaultCalcHeadView");
3.23 setting_value = null;
3.24 -
3.25 +
3.26 if (setting_value == null)
3.27 calchead_view = CalcHead.VIEWSTYLE_SINGLELINE;
3.28 else
3.29 - calchead_view = Integer.parseInt(setting_value);
3.30 + calchead_view = Integer.parseInt(setting_value);
3.31 calc_head.setViewStyle(calchead_view);
3.32 -
3.33 -
3.34 +
3.35 phase_ = DIALOGPHASE_SPECIFY;
3.36 -
3.37 +
3.38 // dummy return of getValue() call until class is completed
3.39 // if (user_settings_.getValue("SkipSpecifyingPhase").equals("1")) {
3.40 -
3.41 +
3.42 if (true) {
3.43 calc_tree_.completeCalcHead();
3.44 try {
3.45 - notifyUserAction(new UserAction(IUIElement.UI_SPECIFY_CALCULATE_1));
3.46 + notifyUserAction(new UserAction(
3.47 + IUIElement.UI_SPECIFY_CALCULATE_1));
3.48 } catch (RemoteException e) {
3.49 // TODO Auto-generated catch block
3.50 e.printStackTrace();
3.51 @@ -103,7 +103,7 @@
3.52 e.printStackTrace();
3.53 }
3.54 }
3.55 -
3.56 +
3.57 return calc_head; //WN040906 this is NOT completed !!!
3.58 // FIXME.WN040906 do NOT return calc_head, like Formula in solve-phase
3.59 }
3.60 @@ -113,7 +113,7 @@
3.61 int start_from, int requested_calchead_view) {
3.62
3.63 ICalcIterator temp_iterator;
3.64 -
3.65 +
3.66 calc_tree_ = math_engine_.startCalculation(f);
3.67 temp_iterator = calc_tree_.iterator();
3.68 try {
3.69 @@ -184,32 +184,34 @@
3.70 // not
3.71 // to be edited
3.72 // try {
3.73 -// while (!last_formula.isLast()) {
3.74 -// if (last_formula.getElement().getType() == ICalcElement.CALCEL_CALCHEAD) {
3.75 -// last_formula.getElement().setViewStyle(
3.76 -// CalcHead.VIEWSTYLE_IN_CALC);
3.77 -// }
3.78 -// last_formula.moveDown();
3.79 -// //TODO last_formula.moveDown.. WN040824 DG may limit the level
3.80 -// // down
3.81 -// }
3.82 -//
3.83 -// // for now, do not specify the CalcHead, just display it.
3.84 -// calc_elem = last_formula.getElement();
3.85 -//
3.86 -// if (calc_elem.getType() == ICalcElement.CALCEL_CALCHEAD) {
3.87 -// //WN040826 phase_ = DIALOGPHASE_SPECIFY; --->startSpecifying
3.88 -// //WN040826
3.89 -// // calc_elem.setViewStyle(CalcHead.VIEWSTYLE_SINGLELINE);--->startSpecifying
3.90 -//
3.91 -// //WN040826calc_head = startSpecifying((CalcHead) calc_elem);
3.92 -// // --->startSpecifying
3.93 -// startSpecifying((CalcHead) calc_elem);
3.94 -// //WN040826 math_engine_.completeCalcHead(calc_head);
3.95 -// // --->startSpecifying
3.96 -// } else {
3.97 -// phase_ = DIALOGPHASE_SOLVE;
3.98 -// }
3.99 + // while (!last_formula.isLast()) {
3.100 + // if (last_formula.getElement().getType() ==
3.101 + // ICalcElement.CALCEL_CALCHEAD) {
3.102 + // last_formula.getElement().setViewStyle(
3.103 + // CalcHead.VIEWSTYLE_IN_CALC);
3.104 + // }
3.105 + // last_formula.moveDown();
3.106 + // //TODO last_formula.moveDown.. WN040824 DG may limit the level
3.107 + // // down
3.108 + // }
3.109 + //
3.110 + // // for now, do not specify the CalcHead, just display it.
3.111 + // calc_elem = last_formula.getElement();
3.112 + //
3.113 + // if (calc_elem.getType() == ICalcElement.CALCEL_CALCHEAD) {
3.114 + // //WN040826 phase_ = DIALOGPHASE_SPECIFY; --->startSpecifying
3.115 + // //WN040826
3.116 + // //
3.117 + // calc_elem.setViewStyle(CalcHead.VIEWSTYLE_SINGLELINE);--->startSpecifying
3.118 + //
3.119 + // //WN040826calc_head = startSpecifying((CalcHead) calc_elem);
3.120 + // // --->startSpecifying
3.121 + // startSpecifying((CalcHead) calc_elem);
3.122 + // //WN040826 math_engine_.completeCalcHead(calc_head);
3.123 + // // --->startSpecifying
3.124 + // } else {
3.125 + // phase_ = DIALOGPHASE_SOLVE;
3.126 + // }
3.127 } catch (Exception e) {
3.128 e.printStackTrace();
3.129 }
3.130 @@ -353,7 +355,7 @@
3.131 request = UI_SOLVE_CALCULATE_1;
3.132 phase_ = DIALOGPHASE_SOLVE;
3.133 }
3.134 - break;
3.135 + break;
3.136 case (UI_CALCULATE_ALL):
3.137 if (getActiveFormula().onCalcHead()) {
3.138 request = UI_SPECIFY_CALCULATE_ALL;
3.139 @@ -363,7 +365,7 @@
3.140 phase_ = DIALOGPHASE_SOLVE;
3.141 }
3.142 }
3.143 -
3.144 +
3.145 // al other userActions belong to a certain dialogphase
3.146 switch (phase_) {
3.147 case DIALOGPHASE_IDLE:
3.148 @@ -446,12 +448,12 @@
3.149 //if (user_settings_.getValue(""))
3.150 calc_tree_.completeCalcHead();
3.151 //@@@@@@@WN050223
3.152 -
3.153 +
3.154 phase_ = DIALOGPHASE_SOLVE;
3.155 // fall through to calculate
3.156
3.157 case UI_SOLVE_CALCULATE_1:
3.158 - //why not at (*) here ?
3.159 + //why not at (*) here ?
3.160 case UI_SOLVE_CALCULATE_ALL:
3.161 switch (request) {
3.162 case UI_SPECIFY_CALCULATE_ALL:
3.163 @@ -459,7 +461,7 @@
3.164 autoCalculate(SCOPE_CALCULATION, 0);
3.165 break;
3.166 case UI_SPECIFY_CALCULATE_1://???
3.167 - // break;
3.168 + // break;
3.169 default:
3.170 autoCalculate(SCOPE_CALCULATION, 1);//why not at (*) above ?
3.171 break;