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