src/java/isac/useractions/IUIElement.java
author jloinig
Thu, 25 Aug 2005 06:54:31 +0200
changeset 2937 a2fc6c45df76
parent 2936 d527ceb6c10d
child 2948 ad622def817a
permissions -rw-r--r--
reimplementing tests for MiniBrowser
wneuper@2770
     1
/*
wneuper@2770
     2
 * @author Alan Krempler
wneuper@2770
     3
 * Created on Dec 12, 2003
wneuper@2770
     4
 */
wneuper@2770
     5
package isac.useractions;
wneuper@2770
     6
wneuper@2770
     7
/**
wneuper@2770
     8
 * @author Alan Krempler
wneuper@2770
     9
 * 
wneuper@2815
    10
 * Constants describing interactions or request from the user TOOODO.AK? rename
wneuper@2815
    11
 * to IUInteractions ???
wneuper@2770
    12
 */
wneuper@2770
    13
public interface IUIElement {
wneuper@2770
    14
wneuper@2815
    15
    /** ***************** NOTIFICATIONS: SPECIFYING PHASE ********************** */
wneuper@2770
    16
wneuper@2815
    17
    public static final int UI_DUMMY_FIRST_SPECIFY = 1;
wneuper@2815
    18
wneuper@2815
    19
    /**
wneuper@2815
    20
     * During the specifying phase, change the view on the CalcHead. WN050804
wneuper@2815
    21
     * how to use ? which view ?
wneuper@2815
    22
     */
wneuper@2815
    23
    public static final int UI_SPECIFY_CHANGE_VIEW = 3;
wneuper@2815
    24
wneuper@2815
    25
    /**
wneuper@2847
    26
     * During the specifying phase, have the Model of the problem (or the guard
wneuper@2847
    27
     * of the method) completed by the math engine.
wneuper@2847
    28
     */
wneuper@2847
    29
    public static final int UI_SPECIFY_COMPLETE_MODEL = 4;
wneuper@2847
    30
wneuper@2847
    31
    /**
wneuper@2815
    32
     * During the specifying phase, have the CalcHead completed by the math
wneuper@2815
    33
     * engine.
wneuper@2815
    34
     */
wneuper@2847
    35
    public static final int UI_SPECIFY_COMPLETE_CALCHEAD = 5;
wneuper@2815
    36
wneuper@2815
    37
    /**
wneuper@2815
    38
     * During the specifying phase, have the Method field of the CalcHead
wneuper@2815
    39
     * completed by the math engine.
wneuper@2815
    40
     */
wneuper@2815
    41
    public static final int UI_SPECIFY_METHOD = 6;
wneuper@2815
    42
wneuper@2815
    43
    /**
wneuper@2815
    44
     * During the specifying phase, have the Theory field of the CalcHead
wneuper@2815
    45
     * completed by the math engine.
wneuper@2815
    46
     */
wneuper@2815
    47
    public static final int UI_SPECIFY_THEORY = 7;
wneuper@2815
    48
wneuper@2815
    49
    /**
wneuper@2815
    50
     * During the specifying phase, have the Problem field of the CalcHead
wneuper@2815
    51
     * completed by the math engine.
wneuper@2815
    52
     */
wneuper@2815
    53
    public static final int UI_SPECIFY_PROBLEM = 8;
wneuper@2815
    54
wneuper@2815
    55
    /**
wneuper@2815
    56
     * During the specifying phase, have the Given field of the CalcHead
wneuper@2815
    57
     * completed by the math engine.
wneuper@2815
    58
     */
wneuper@2815
    59
    public static final int UI_SPECIFY_COMPLETE_GIVEN = 9;
wneuper@2815
    60
wneuper@2815
    61
    /**
wneuper@2815
    62
     * During the specifying phase, have the Find field of the CalcHead
wneuper@2815
    63
     * completed by the math engine.
wneuper@2815
    64
     */
wneuper@2815
    65
    public static final int UI_SPECIFY_COMPLETE_FIND = 10;
wneuper@2815
    66
wneuper@2815
    67
    /**
wneuper@2815
    68
     * During the specifying phase, have the Relate field of the CalcHead
wneuper@2815
    69
     * completed by the math engine.
wneuper@2815
    70
     */
wneuper@2815
    71
    public static final int UI_SPECIFY_COMPLETE_RELATE = 11;
wneuper@2815
    72
wneuper@2815
    73
    /**
wneuper@2815
    74
     * During the specifying phase, have the CalcHead checked for completeness
wneuper@2815
    75
     * and consistency.
wneuper@2815
    76
     */
wneuper@2815
    77
    public static final int UI_SPECIFY_CHECK_CALCHEAD = 12;
wneuper@2815
    78
wneuper@2815
    79
    /**
wneuper@2815
    80
     * Leave the specifying phase, enter the solving phase and calculate until a
wneuper@2815
    81
     * final result is reached.
wneuper@2815
    82
     */
wneuper@2847
    83
    public static final int UI_SPECIFY_CALCULATE_ALL = 13;
wneuper@2815
    84
wneuper@2815
    85
    /**
wneuper@2815
    86
     * clear the (possibly messed) contents of the CalcHeadPanel such that a
wneuper@2815
    87
     * UI_SPECIFY_COMPLETE_CALCHEAD or a UI_SPECIFY_CALCULATE_ALL can succeed.
wneuper@2815
    88
     */
wneuper@2847
    89
    public static final int UI_SPECIFY_RESET = 14;
wneuper@2815
    90
wneuper@2815
    91
    /**
wneuper@2827
    92
     * open the CalcHeadPanel and start the specify-phase, if the CalcHead is
wneuper@2827
    93
     * not 'complete'
wneuper@2815
    94
     */
wneuper@2847
    95
    public static final int UI_SPECIFY_OPEN_CALCHEAD = 15;
wneuper@2815
    96
wneuper@2815
    97
    /**
wneuper@2847
    98
     * Leave the specifying phase, enter the solving phase and calculate the
wneuper@2847
    99
     * first step of the method. A UserAction only.
wneuper@2847
   100
     * 
wneuper@2847
   101
     * @see UI_SPECIFY_CLOSE_CALCHEAD the closely related UIAction
wneuper@2847
   102
     */
wneuper@2847
   103
    public static final int UI_SPECIFY_TO_SOLVE = 16;
wneuper@2847
   104
wneuper@2847
   105
    /**
wneuper@2847
   106
     * close the CalcHeadPanel (i.e. a UIAction only)
wneuper@2847
   107
     * 
wneuper@2847
   108
     * @see UI_SPECIFY_TO_SOLVE the closely related UserAction
wneuper@2815
   109
     */
wneuper@2828
   110
    public static final int UI_SPECIFY_CLOSE_CALCHEAD = 17;
wneuper@2815
   111
wneuper@2815
   112
    /**
wneuper@2815
   113
     * fill calchead elementwise
wneuper@2815
   114
     */
wneuper@2815
   115
    public static final int UI_SPECIFY_COMPLETE_STEPWISE = 18;
wneuper@2770
   116
wneuper@2827
   117
    /**
wneuper@2840
   118
     * Show the guard of the method (already specified in the CalcHead). The
wneuper@2840
   119
     * guard of the method has the same structure as the Model of a problem;
wneuper@2840
   120
     * thus the guard is inserted into the CalcHead at the place of the problems
wneuper@2840
   121
     * Model.
wneuper@2840
   122
     * 
wneuper@2840
   123
     * @see UI_SPECIFY_SWITCH_TO_MODEL switch to the other part of a
wneuper@2840
   124
     *      toggle-mode.
wneuper@2840
   125
     */
wneuper@2847
   126
    public static final int UI_SPECIFY_SWITCH_TO_GUARD = 19;
wneuper@2840
   127
wneuper@2840
   128
    /**
wneuper@2840
   129
     * Switch back from having the guard of a method to having the Model of the
wneuper@2840
   130
     * problem (already specified in the CalcHead).
wneuper@2840
   131
     * 
wneuper@2840
   132
     * @see UI_SPECIFY_SWITCH_TO_GUARD switch to the other part of a
wneuper@2840
   133
     *      toggle-mode.
wneuper@2840
   134
     */
wneuper@2847
   135
    public static final int UI_SPECIFY_SWITCH_TO_MODEL = 20;
mkoschuc@2894
   136
    
mkoschuc@2924
   137
    public static final int UI_SPECIFY_EDIT_ACTIVE_FORMULA_COMPLETE = 21;
wneuper@2770
   138
wneuper@2840
   139
    public static final int UI_DUMMY_LAST_SPECIFY = 22;
wneuper@2770
   140
wneuper@2815
   141
    /** ***************** NOTIFICATIONS: SOLVING PHASE ********************** */
wneuper@2770
   142
wneuper@2815
   143
    public static final int UI_DUMMY_FIRST_SOLVE = 121;
wneuper@2770
   144
wneuper@2815
   145
    /**
wneuper@2815
   146
     * During the solving phase, calculate one more step.
wneuper@2815
   147
     */
wneuper@2815
   148
    public static final int UI_SOLVE_CALCULATE_1 = 121;
wneuper@2770
   149
wneuper@2815
   150
    /**
wneuper@2815
   151
     * During the solving phase, calculate until a final result is reached.
wneuper@2815
   152
     */
wneuper@2815
   153
    public static final int UI_SOLVE_CALCULATE_ALL = 122;
wneuper@2770
   154
wneuper@2815
   155
    /**
wneuper@2815
   156
     * During the solving phase, calculate until the current subproblem is
wneuper@2815
   157
     * solved.
wneuper@2815
   158
     */
wneuper@2815
   159
    public static final int UI_SOLVE_CALCULATE_SUBPROBLEM = 123;
wneuper@2770
   160
wneuper@2815
   161
    /**
wneuper@2815
   162
     * During the solving phase, request editing the currently active formula.
wneuper@2815
   163
     * 
wneuper@2815
   164
     * WN0412 If request is conceded, do
wneuper@2815
   165
     * 
wneuper@2815
   166
     * @see UI_SOLVE_EDIT_ACTIVE_FORMULA_COMPLETE
wneuper@2815
   167
     */
wneuper@2815
   168
    public static final int UI_SOLVE_EDIT_ACTIVE_FORMULA = 124;
wneuper@2770
   169
wneuper@2815
   170
    /**
wneuper@2815
   171
     * During the solving phase, notify that editing the currently active
wneuper@2815
   172
     * formula is finished. This implies a request for updating the CalcTree.
wneuper@2815
   173
     */
wneuper@2815
   174
    public static final int UI_SOLVE_EDIT_ACTIVE_FORMULA_COMPLETE = 125;
wneuper@2770
   175
wneuper@2815
   176
    /**
wneuper@2815
   177
     * During the solving phase, request inserting a new formula _after_ the
wneuper@2815
   178
     * currently active formula, making the new formula the currently active
wneuper@2815
   179
     * formula. At present, this does not imply editing the formula and must be
wneuper@2815
   180
     * requested in a separate step. WN0412: ...??? is this right interpreted by
wneuper@2815
   181
     * ... WN0412 If request is conceded, do
wneuper@2815
   182
     * 
wneuper@2815
   183
     * @see UI_SOLVE_EDIT_ACTIVE_FORMULA_COMPLETE
wneuper@2815
   184
     */
wneuper@2815
   185
    public static final int UI_SOLVE_APPEND_USER_FORMULA = 126;
wneuper@2770
   186
wneuper@2815
   187
    /**
wneuper@2815
   188
     * During the solving phase, request making the referened formula the
wneuper@2815
   189
     * currently active formula.
wneuper@2815
   190
     */
wneuper@2815
   191
    public static final int UI_SOLVE_MOVE_ACTIVE_FORMULA = 127;
wneuper@2770
   192
wneuper@2815
   193
    /**
wneuper@2815
   194
     * During the solving phase, ask for the tactic the math engine would apply
wneuper@2815
   195
     * to the current formula.
wneuper@2815
   196
     */
wneuper@2815
   197
    public static final int UI_SOLVE_GET_PROPOSED_TACTIC = 130;
wneuper@2770
   198
wneuper@2815
   199
    /**
wneuper@2815
   200
     * During the solving phase, ask for a list of tactics to the current
wneuper@2815
   201
     * formula.
wneuper@2815
   202
     */
wneuper@2815
   203
    public static final int UI_SOLVE_GET_APPLICABLE_TACTICS = 131;
wneuper@2770
   204
wneuper@2815
   205
    /**
wneuper@2815
   206
     * During the solving phase, set the tactic to be applied to the current
wneuper@2815
   207
     * formula.
wneuper@2815
   208
     */
wneuper@2815
   209
    public static final int UI_SOLVE_SET_NEXT_TACTIC = 132;
wneuper@2770
   210
wneuper@2815
   211
    /**
wneuper@2815
   212
     * When entering a formula during the solving phase, request help on
wneuper@2815
   213
     * entering the formula.
wneuper@2815
   214
     */
wneuper@2815
   215
    public static final int UI_SOLVE_HELP_ENTERING_FORMULA = 133;
wneuper@2770
   216
wneuper@2815
   217
    /**
wneuper@2815
   218
     * During the solving phase, show which assumptions hold at the current
wneuper@2815
   219
     * point of calculation.
wneuper@2815
   220
     */
wneuper@2815
   221
    public static final int UI_SOLVE_SHOW_ASSUMPTIONS = 140;
wneuper@2770
   222
wneuper@2815
   223
    /**
wneuper@2815
   224
     * Show which tactic has been applied to get this formula
wneuper@2815
   225
     */
wneuper@2815
   226
    public static final int UI_SOLVE_TACTIC_APPLIED = 141;
wneuper@2770
   227
wneuper@2815
   228
    /**
wneuper@2815
   229
     * show CalcHeadPanel; if CalcHead "complete" no interactiveElements if not,
wneuper@2815
   230
     * startSpecifying
wneuper@2815
   231
     */
wneuper@2815
   232
    public static final int UI_SOLVE_SHOW_CALCHEAD = 142;
wneuper@2770
   233
wneuper@2815
   234
    /**
wneuper@2815
   235
     * During the solving phase, request more detail about the currently
wneuper@2815
   236
     * referenced element.
wneuper@2815
   237
     */
wneuper@2815
   238
    public static final int UI_SOLVE_SHOW_INTERMEDIATE_STEPS = 151;
wneuper@2770
   239
wneuper@2815
   240
    public static final int UI_DUMMY_LAST_SOLVE = 151;
wneuper@2770
   241
wneuper@2815
   242
    /** ***************** ACTIVE REQUESTS TO THE UI ********************** */
wneuper@2770
   243
wneuper@2815
   244
    /**
wneuper@2815
   245
     * Request editing the currently active formula. DG distinguishes between
wneuper@2815
   246
     * SPECIFY and SOLVE; thus could drop UI_SOLVE_EDIT_ACTIVE_FORMULA : int
wneuper@2815
   247
     * 
wneuper@2815
   248
     * LK050711 start editing implicit somewhere in tree, thus unused
wneuper@2815
   249
     */
wneuper@2815
   250
    public static final int UI_DO_EDIT_FORMULA = 229;
wneuper@2770
   251
wneuper@2815
   252
    /**
wneuper@2815
   253
     * Request appending a new, empty formula.
wneuper@2815
   254
     */
wneuper@2815
   255
    public static final int UI_DO_APPEND_FORMULA = 230;
wneuper@2770
   256
wneuper@2815
   257
    /**
wneuper@2815
   258
     * Activate an UI element.
wneuper@2815
   259
     */
wneuper@2815
   260
    public static final int UI_DO_ACTIVATE = 231;
wneuper@2770
   261
wneuper@2815
   262
    /**
wneuper@2815
   263
     * Deactivate an UI element.
wneuper@2815
   264
     */
wneuper@2815
   265
    public static final int UI_DO_DEACTIVATE = 232;
wneuper@2770
   266
wneuper@2815
   267
    /**
wneuper@2815
   268
     * The Dialog Guide has detached the listener and will not send any more
wneuper@2815
   269
     * control requests. If registered as a Data Change Listener, update
wneuper@2815
   270
     * notifications will still arrive!
wneuper@2815
   271
     */
wneuper@2815
   272
    public static final int UI_DO_DETACH = 233;
wneuper@2770
   273
wneuper@2815
   274
    /**
wneuper@2815
   275
     * to transmit the problem from the problem browser to the worksheet
wneuper@2815
   276
     */
wneuper@2815
   277
    public static final int UI_PROBLEMBROWSER_PROBLEM_TO_WORKSHEET = 234;
wneuper@2770
   278
wneuper@2815
   279
    /**
wneuper@2815
   280
     * to turn the auto match mode on
wneuper@2815
   281
     */
wneuper@2815
   282
    public static final int UI_PROBLEMBROWSER_AUTO_MATCH_ON = 235;
wneuper@2770
   283
wneuper@2815
   284
    /**
wneuper@2815
   285
     * to turn the auto match mode off
wneuper@2815
   286
     */
wneuper@2815
   287
    public static final int UI_PROBLEMBROWSER_AUTO_MATCH_OFF = 236;
wneuper@2770
   288
wneuper@2815
   289
    /**
wneuper@2815
   290
     * to open the problem browser window
wneuper@2815
   291
     */
wneuper@2815
   292
    public static final int UI_PROBLEMBROWSER_OPEN = 237;
wneuper@2770
   293
wneuper@2815
   294
    /**
wneuper@2815
   295
     * to tell the proble browser dialog that the selection in the problem
wneuper@2815
   296
     * browser has changed
wneuper@2815
   297
     */
wneuper@2815
   298
    public static final int UI_PROBLEMBROWSER_SELECTION_CHANGED = 238;
wneuper@2770
   299
wneuper@2815
   300
    /**
wneuper@2815
   301
     * search for a more appropriate problem
wneuper@2815
   302
     */
wneuper@2815
   303
    public static final int UI_PROBLEMBROWSER_REFINE = 239;
wneuper@2779
   304
wneuper@2827
   305
    /**
wneuper@2827
   306
     * no 'UserAction', but but included here for simplicity reasons: to send a
wneuper@2827
   307
     * request fot the selected problem
wneuper@2827
   308
     */
jloinig@2823
   309
    public static final int UI_PROBLEMBROWSER_SELECTED_ID = 240;
jloinig@2823
   310
wneuper@2827
   311
    /**
wneuper@2827
   312
     * no 'UserAction', but but included here for simplicity reasons: to send a
wneuper@2827
   313
     * request fot the active worksheet
wneuper@2827
   314
     */
wneuper@2827
   315
    public static final int UI_PROBLEMBROWSER_ACTIVE_WORKSHEET = 241;
jloinig@2936
   316
    
jloinig@2936
   317
    /**
jloinig@2936
   318
     * To send a request for the hierarchy
jloinig@2936
   319
     */
jloinig@2936
   320
    public static final int UI_REQUEST_FOR_HIERARCHY = 242;
jloinig@2936
   321
    
jloinig@2937
   322
    /** MiniBrowser reports/gets a link **/
jloinig@2937
   323
    public static final int UI_MINIBROWSER_LINK = 243;
jloinig@2937
   324
    
jloinig@2937
   325
    /** to report that the link was set **/
jloinig@2937
   326
    public static final int UI_MINIBROWSER_LINK_SET = 244;
jloinig@2937
   327
    
jloinig@2823
   328
wneuper@2770
   329
}