A
download ClassAppearenceGuiConf.java
Language: Java
License: LGPL
Copyright: (C) 2001-2003 Renaud Pawlak ,
LOC: 43
Project Info
Java Aspect Components(jac)
Server: ObjectWeb Forge
Type: cvs
...\objectweb\jac\aspects\gui\
   ...CollectionItemView.java
   AbstractNode.java
   Actions.java
   AddEvent.java
   BehaviorGuiConf.java
   Border.java
   Callback.java
   ...sAppearenceGuiConf.java
   ClassChooser.java
   CollectionEvent.java
   CollectionItemView.java
   CollectionModel.java
   CollectionPosition.java
   CollectionUpdate.java
   CollectionView.java
   CollectionWrapper.java
   ComboBoxModel.java
   CommitException.java
   CompositeView.java
   Constants.java
   Currency.java
   CustomizedDisplay.java
   CustomizedGUI.java
   CustomizedView.java
   DateFormat.java
   DateHourFormat.java
   DialogView.java
   DisplayContext.java
   EditorContainer.java
   Event.java
   EventHandler.java
   ExpressionListener.java
   ExprWatcher.java
   ExprWatcherParser.java
   ExtendedTableModel.java
   ...dAppearenceGuiConf.java
   FieldEditor.java
   FieldItemView.java
   FieldUpdate.java
   FieldView.java
   FileEditorConfig.java
   FilterCriteria.java
   FloatFormat.java
   Format.java
   GenericFactory.java
   gui.acc
   GuiAC.java
   GuiConf.java
   HandlerResult.java
   ...tCanceledException.java
   InputSequence.java
   InputWrapper.java
   IntFormat.java
   InvokeEvent.java
   InvokeThread.java
   Length.java
   LessAbstractListModel.java
   LinkGenerator.java
   ListModel.java
   MatrixUtils.java
   MemberItemView.java
   Menu.java
   MenuView.java
   ...dAppearenceGuiConf.java
   MethodItemView.java
   MethodUpdate.java
   MethodView.java
   Model.java
   NumberFormat.java
   ObjectChooserModel.java
   ObjectNode.java
   ObjectUpdate.java
   ObjectView.java
   package.html
   PanelContent.java
   PanelView.java
   PercentFormat.java
   PointFormat.java
   ReferenceEditor.java
   RelationNode.java
   RemoveEvent.java
   Reports.java
   ResourceManager.java
   RootNode.java
   SortCriteria.java
   StatusView.java
   SubstanceEvent.java
   TableCellViewer.java
   TableFilter.java
   TableMap.java
   TableModel.java
   TableSorter.java
   TabsView.java
   Target.java
   Template.java
   TemplateReader.java
   TimeoutException.java
   Transfer.java
   TreeListener.java
   TreeModel.java
   TreeView.java
   Unit.java
   Utils.java
   View.java
   ViewControlWrapper.java
   ViewFactory.java
   ViewIdentity.java
   Views.java
   WaitWrapper.java
   WindowView.java
   WrappableList.java
   WrappableMap.java

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
/*
  Copyright (C) 2001-2003 Renaud Pawlak <renaud@aopsys.com>, 
                          Laurent Martelli <laurent@aopsys.com>

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

package org.objectweb.jac.aspects.gui;

import org.objectweb.jac.core.rtti.*;

/**
 * This configuration interface of the Gui aspect defines all the
 * methods that handle the appearence of the classes in the GUI.
 *
 * @see GuiAC
 * @see View
 *
 * @author <a href="mailto:renaud@cnam.fr">Renaud Pawlak</a>
 * @author <a href="mailto:laurent@aopsys.com">Laurent Martelli</a> */

public interface ClassAppearenceGuiConf {

    /**
     * Defines the string representation of the instances of the class.
     *
     * @param classItem the class
     * @param formatExpression a string that contains field references
     * of the form <code>%field_name%</code>. All the field references
     * are replaced by their value when a string representation of the
     * instance is needed. When you need to print out a <code>%</code>,
     * then you must double it (<code>%%</code>). 
     *
     * @see #setToString(ClassItem,MemberItem,String)
     * @see #setToolTipText(ClassItem,MemberItem,String)
     * @see #setToolTipText(ClassItem,ClassItem,String)
     * @see #setTitleString(ClassItem,String)
     */
    void setToString(ClassItem classItem, String formatExpression);

    /**
     * Defines a contextual string representation of the instances of
     * the class that will override the default one in some cases,
     * depending on the selector parameter.
     *
     * @param classItem the class
     * @param selector tells when the formatExpression should be
     * applied. 
     * @param formatExpression a string that contains field references
     * of the form <code>%field_name%</code>. All the field references
     * are replaced by their value when a string representation of the
     * instance is needed. When you need to print out a <code>%</code>,
     * then you must double it (<code>%%</code>).  
     *
     * @see #setToString(ClassItem,String)
     * @see #setToString(ClassItem,MemberItem,String)
     * @see #setToolTipText(ClassItem,MemberItem,String)
     * @see #setToolTipText(ClassItem,ClassItem,String)
     * @see #setTitleString(ClassItem,String)
     */
    void setToString(ClassItem classItem, MemberItem selector,
                     String formatExpression);

    /**
     * Defines a contextual string representation of the instances of
     * the class that will override the default one in some cases,
     * depending on the selector parameter.
     *
     * @param classItem the class
     * @param selector tells when the formatExpression should be
     * applied. 
     * @param formatExpression a string that contains field references
     * of the form <code>%field_name%</code>. All the field references
     * are replaced by their value when a string representation of the
     * instance is needed. When you need to print out a <code>%</code>,
     * then you must double it (<code>%%</code>).  
     *
     * @see #setToString(ClassItem,String)
     * @see #setToString(ClassItem,MemberItem,String)
     * @see #setToolTipText(ClassItem,MemberItem,String)
     * @see #setToolTipText(ClassItem,ClassItem,String)
     * @see #setTitleString(ClassItem,String)
     */
    void setToString(ClassItem classItem, ClassItem selector,
                     String formatExpression);

    /**
     * Sets the format string to use as the title of a view for
     * instances of a class. 
     *
     * <p>It is used as the window title when a view is opened in it's
     * own window for instance.
     *
     * @param classItem the class to configure
     * @param formatExpression a format string. The formatting rules
     * are same as for setToString(String)
     *
     * @see #setToString(ClassItem,String)
     */
    void setTitleString(ClassItem classItem, String formatExpression);

    /**
     * This configuration method attaches an icon to a given class so
     * that the iconized instances of this class will be represented by
     * this icon (for instance in a treeview).
     *
     * @param cli the class
     * @param name the icon's resource name 
     *
     * @see #setDynamicIcon(ClassItem,MethodItem)
     */   
    void setIcon(ClassItem cli, String name);

    /**
     * Defines a method to dynamically compute the icon for a class.
     *
     * @param cli a class
     * @param iconMethod a static method which must take an object as
     * parameter and return a String or null. It will be invoked with
     * the object for which an icon must be determined.
     *
     * @see #setIcon(ClassItem,String) 
     */
    void setDynamicIcon(ClassItem cli, MethodItem iconMethod);

    /**
     * Defines a contextual string tooltip for the instances of a class.
     *    
     * @param classItem the class
     * @param formatExpression a string that contains field references
     * of the form <code>%field_name%</code>. All the field references
     * are replaced by their value when a string representation of the
     * instance is needed. When you need to print out a <code>%</code>,
     * then you must double it (<code>%%</code>).  
     *
     * @see #setToolTipText(ClassItem,ClassItem,String)
     * @see #setToolTipText(ClassItem,MemberItem,String)
     */
    void setToolTipText(ClassItem classItem, String formatExpression);

    /**
     * Defines a contextual string tooltip for the instances of the
     * class that will override the default one in some cases,
     * depending on the selector parameter.
     *
     * @param classItem the class
     * @param selector tells when the formatExpression should be
     * applied. 
     * @param formatExpression a string that contains field references
     * of the form <code>%field_name%</code>. All the field references
     * are replaced by their value when a string representation of the
     * instance is needed. When you need to print out a <code>%</code>,
     * then you must double it (<code>%%</code>).  
     *
     * @see #setToolTipText(ClassItem,String) 
     * @see #setToolTipText(ClassItem,ClassItem,String) 
     */
    void setToolTipText(ClassItem classItem, MemberItem selector, 
                        String formatExpression);


    /**
     * Defines a contextual string tooltip for the instances of the
     * class that will override the default one in some cases,
     * depending on the selector parameter.
     *
     * @param classItem the class
     * @param selector tells when the formatExpression should be
     * applied. 
     * @param formatExpression a string that contains field references
     * of the form <code>%field_name%</code>. All the field references
     * are replaced by their value when a string representation of the
     * instance is needed. When you need to print out a <code>%</code>,
     * then you must double it (<code>%%</code>).  
     *
     * @see #setToolTipText(ClassItem,String) 
     * @see #setToolTipText(ClassItem,MemberItem,String) 
     */
    void setToolTipText(ClassItem classItem, ClassItem selector, 
                        String formatExpression);

    /**
     * This configuration method attaches a contextual menu to a given
     * class so that the instances of this class will show the menu
     * when the user performs a right click on it (by default the menu
     * shows all the methods).
     *
     * @param classItem the class
     * @param menu an array containing the names of the methods that
     * form the menu (must be declared in the class item), if an
     * element is an empty string, then a menu item separator is added
     */   
    void setMenu(ClassItem classItem, String[] menu);

    /**
     * This configuration method sets some categories for a class.
     *
     * <p>The GUI will interpret this categories to split the views
     * of this class instances to be separated into several subviews.
     * For instance, the Swing GUI will show the object in
     * several parts placed into several tabs.
     *
     * <p>When this method has been called, each meta-item of the class
     * must be categorized with one of the categories by using the
     * <code>setCategory</code> method.
     *
     * @param cl the class item
     * @param categories the categories for this class
     * @see FieldAppearenceGuiConf#setCategory(MemberItem,String) 
     */
    void setCategories(ClassItem cl, String[] categories);


    /**
     * This configuration method sets categories icons for a class.
     *
     * Each icon is associated with a category, so there must be
     * the right number of icons (one by category)
     *
     * @param cli the class
     * @param icons the icons for the categories
     * @see ClassAppearenceGuiConf#setCategories(ClassItem,String[]) 
     */
    void setCategoriesIcons(ClassItem cli, String[] icons);

    /**
     * This configuration method sets categories labels for a class.
     *
     * Each label is associated with a category, so there must be
     * the right number of labels (one by category)
     *
     * @param cli the class 
     * @param labels the labels for the categories
     * @see ClassAppearenceGuiConf#setCategories(ClassItem,String[]) 
     */
    void setCategoriesLabels(ClassItem cli, String[] labels);

    /**
     * This configuration method allows the programmer to tell that the
     * given class should be viewed with a given customized view when
     * it is opened in a desktop panel.
     *
     * @param classItem the class of the viewed objects
     * @param type the class of the view component 
     */
    void setDesktopCustomizedView(ClassItem classItem, ClassItem type);

    /**
     * Sets the order in which the attributes of a class are to be
     * rendered.
     *
     * <p>Attributes not listed here will not be rendered. This order
     * is also used for tableView rendered collections if the
     * <code>setTableMembersOrder</code> method is not used.
     *
     * @param cl the class 
     * @param attributeNames the name of the attributes in the
     * rendering order
     *
     * @see #setAttributesOrder(ClassItem,String,String[])
     * @see #setTableMembersOrder(ClassItem,String[]) 
     * @see #setMethodsOrder(ClassItem,String[]) 
     * @see FieldAppearenceGuiConf#setMembersOrder(CollectionItem,ClassItem,String[])
     */
    void setAttributesOrder(ClassItem cl, String[] attributeNames);

    /**
     * Sets the order in which the attributes of a class are to be
     * rendered for a given view.
     *
     * <p>Attributes not listed here will not be rendered. This order
     * is also used for tableView rendered collections if the
     * <code>setTableMembersOrder</code> method is not used.
     *
     * @param cl the class 
     * @param viewName the name of the view
     * @param attributeNames the name of the attributes in the
     * rendering order
     *
     * @see #setAttributesOrder(ClassItem,String[])
     * @see #setTableMembersOrder(ClassItem,String[]) 
     * @see FieldAppearenceGuiConf#setMembersOrder(CollectionItem,ClassItem,String[])
     */
    void setAttributesOrder(ClassItem cl, String viewName, String[] attributeNames);

    /**
     * Sets the attributes to be displayed for editable default values in tables
     *
     * @param cl the class
     * @param attributeNames the name of the attributes
     * @see BehaviorGuiConf#setEditableDefaultValues(CollectionItem,boolean)
     */
    void setDefaultsAttributesOrder(ClassItem cl, String[] attributeNames);

    /**
     * Defines which fields should start on a new line. By default,
     * every fields start on a new line.
     *
     * @param cli the class
     * @param fields the names fields which should start on a
     * new line.  
     */
    void setLineBreaks(ClassItem cli, String[] fields);

    /**
     * Sets the order in which the methods of a class are to be
     * rendered for the default view.
     *
     * <p>Methods not listed here will not be rendered.
     *
     * @param cl the class name 
     * @param methodNames the name of the methods in the
     * rendering order 
     * 
     * @see #setMethodsOrder(ClassItem,String,String[])
     */
    void setMethodsOrder(ClassItem cl, String[] methodNames);

    /**
     * Sets the order in which the methods of a class are to be
     * rendered for a view.
     *
     * <p>Methods not listed here will not be rendered.
     *
     * @param cl the class name 
     * @param viewName the view for which to set the methods order
     * @param methodNames the name of the methods in the
     * rendering order 
     * 
     * @see #setMethodsOrder(ClassItem,String[])
     * @see #setAttributesOrder(ClassItem,String,String[])
     */
    void setMethodsOrder(ClassItem cl, String viewName, String[] methodNames);

    /**
     * Sets the order in which the attributes of a class are to be
     * rendered when an instance is created.
     *
     * @param cl the class name 
     * @param attributeNames the name of the attributes in the
     * rendering order
     * @see #setAttributesOrder(ClassItem,String[]) */

    void setCreationAttributesOrder(ClassItem cl, String[] attributeNames);

    /**
     * Sets the order in which the attributes of a class are to be
     * rendered when their instance are placed within a table of the a
     * default view.
     *
     * <p>Attributes not listed here will not be rendered.
     *
     * @param cl the class name
     * @param memberNames the name of the member in the
     * rendering order
     *
     * @see #setTableMembersOrder(ClassItem,String,String[])
     * @see #setAttributesOrder(ClassItem,String[])
     * @see FieldAppearenceGuiConf#setMembersOrder(CollectionItem,ClassItem,String[]) 
     */
    void setTableMembersOrder(ClassItem cl, String[] memberNames);

    /**
     * Sets the order in which the attributes of a class are to be
     * rendered when their instance are placed within a table of a
     * given view.
     *
     * <p>Attributes not listed here will not be rendered.
     *
     * @param cl the class name
     * @param viewName the name of the view
     * @param memberNames the name of the member in the
     * rendering order
     *
     * @see #setTableMembersOrder(ClassItem,String[])
     * @see FieldAppearenceGuiConf#setMembersOrder(CollectionItem,ClassItem,String[]) 
     */
    void setTableMembersOrder(ClassItem cl, String viewName, String[] memberNames);

    /**
     * Sets the order in which the attributes of a class are to be
     * rendered when their instance are placed within a tree.
     *
     * <p>Attributes not listed here will not be rendered.
     *
     * @param cl the class name 
     * @param attributeNames the name of the attributes in the
     * rendering order
     * @see #setAttributesOrder(ClassItem,String[])
     * @see FieldAppearenceGuiConf#setMembersOrder(CollectionItem,ClassItem,String[])
     */
    void setTreeAttributesOrder(ClassItem cl, String[] attributeNames);

    /**
     * Sets a default sorted column for a class.
     *
     * @param cl the class
     * @param column the column used to sort (it is a fieldItem, watch
     * out for case). You may preprend a '-' to use the reverse order
     * of that column.
     */
    void setDefaultSortedColumn(ClassItem cl, String column);

    /**
     * Sets the description of a class.
     * @param cl the class
     * @param description the description of the class
     */
    void setDescription(ClassItem cl, String description);

    /**
     * Sets the label of a class.
     * @param cl the class
     * @param label the label of the class
     */
    void setLabel(ClassItem cl, String label);

    /**
     * Wether to display a label containing the name of the field in views.
     *
     * @param virtualClass the name of the class
     * @param value boolean indicating wether to display the label or not
     */
    void setDisplayLabel(String virtualClass, boolean value);

    /**
     * Sets the display format of a class.
     */
    void setFormat(String className, String format);

    /**
     * Tells the gui to use a primary key field to select instances of
     * a class, instead of a combobox. This is usefull when there are
     * two many instances of the class.
     *
     * @param cl the class whose instance to select
     * @param collection the collection whose indexed field to use 
     * @param repositoryName name of the object holding the collection
     *
     * @see org.objectweb.jac.core.rtti.RttiAC#setIndexedField(CollectionItem,FieldItem) 
     */
    void selectWithIndexedField(ClassItem cl, CollectionItem collection, String repositoryName);

    /**
     * Set the style for a class
     *
     * @param cli the class
     * @param style the CSS style
     *
     * @see FieldAppearenceGuiConf#setStyle(FieldItem,String)
     * @see GuiConf#addStyleSheetURL(String)
     * @see GuiConf#addStyleSheetURL(String,String)
     */
    void setStyle(ClassItem cli, String style);

    void setReadOnly(ClassItem cli, String viewName, boolean readOnly);

    /**
     * Defines a method that returns instances of a class that should
     * be displayed in comboboxes.
     *
     * @param className the class to configure (ClassItem or VirtualClassItem)
     * @param targetMethod the static method that returns instances of
     * the class. It should take a ClassItem as a parameter and return
     * a Collection
     *
     * @see FieldAppearenceGuiConf#setDynamicFieldChoice(FieldItem,Boolean,MethodItem) 
     */
    void setDynamicClassChoice(String className, MethodItem targetMethod);

    /**
     * Defines preferred mnemonics for class.
     * @param cli
     * @param mnemonics the mnemonics
     */
    void setMnemonics(ClassItem cli, String mnemonics);

    /**
     * Sets the width to use for table columns
     *
     * @param cl the class to configure
     * @param preferred the preferred width of the column,
     * @param min the minimum width of the column
     * @param max the maximum width of the column
     *
     * @see FieldAppearenceGuiConf#setColumnWidth(MemberItem,Length,Length,Length)
     */
    void setColumnWidth(ClassItem cl, Length preferred, Length min, Length max);
}

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us