-
Notifications
You must be signed in to change notification settings - Fork 7
/
GxColumns.bbj
2306 lines (2240 loc) · 81.8 KB
/
GxColumns.bbj
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
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
rem /**
rem * The package exports all the required classes to create new columns and column groups
rem */
rem package GxColumns
rem /**
rem * This file is part of the BBjGridExWidget plugin.
rem * (c) Basis Europe <eu@basis.cloud>
rem *
rem * For the full copyright and license information, please view the LICENSE
rem * file that was distributed with this source code.
rem */
use java.util.Arrays
use java.util.ArrayList
use java.util.HashMap
use java.util.TreeMap
use java.util.LinkedHashMap
use java.util.HashSet
use java.sql.Types
use com.google.gson.Gson
use com.google.gson.JsonObject
use com.google.gson.JsonArray
use com.google.gson.JsonParser
use com.basiscomponents.db.DataField
use ::BBjGridExWidget/BBjGridExWidget.bbj::BBjGridExWidget
use ::BBjGridExWidget/GxLogger.bbj::GxLogger
rem GxFilters
rem =========================
use ::BBjGridExWidget/GxFilters.bbj::GxFilterInterface
use ::BBjGridExWidget/GxFilters.bbj::GxFilterText
use ::BBjGridExWidget/GxFilters.bbj::GxFilterNumber
use ::BBjGridExWidget/GxFilters.bbj::GxFilterBasicBoolean
use ::BBjGridExWidget/GxFilters.bbj::GxFilterBasicDate
use ::BBjGridExWidget/GxFilters.bbj::GxFilterBasicTime
use ::BBjGridExWidget/GxFilters.bbj::GxFilterBasicTimestamp
rem GxExpressions
rem ==========================
use ::BBjGridExWidget/GxExpressions.bbj::GxExpressionInterface
use ::BBjGridExWidget/GxExpressions.bbj::GxExpression
use ::BBjGridExWidget/GxExpressions.bbj::GxExpressionNumbersFormatter
use ::BBjGridExWidget/GxExpressions.bbj::GxExpressionStringsFormatter
use ::BBjGridExWidget/GxExpressions.bbj::GxExpressionDateTimesFormatter
rem GxRenderers
rem =========================
use ::BBjGridExWidget/GxRenderers.bbj::GxRendererInterface
use ::BBjGridExWidget/GxRenderers.bbj::GxRendererBoolean
use ::BBjGridExWidget/GxRenderers.bbj::GxRendererGroupCellRenderer
rem GxCellEditors
rem ==========================
use ::BBjGridExWidget/GxCellEditors.bbj::GxCellEditorInterface
use ::BBjGridExWidget/GxCellEditors.bbj::GxCellEditorBasicText
use ::BBjGridExWidget/GxCellEditors.bbj::GxCellEditorLargeText
use ::BBjGridExWidget/GxCellEditors.bbj::GxCellEditorBasicBoolean
use ::BBjGridExWidget/GxCellEditors.bbj::GxCellEditorBasicNumber
use ::BBjGridExWidget/GxCellEditors.bbj::GxCellEditorBasicDate
use ::BBjGridExWidget/GxCellEditors.bbj::GxCellEditorBasicTime
use ::BBjGridExWidget/GxCellEditors.bbj::GxCellEditorBasicTimestamp
REM /**
REM * The class holds the common props between column and column groups.
rem * Every property and method has one or more tag attached.
rem *
rem * The following is the meaning for each tag :<br><br>
rem *
rem *
rem * <table border="1" cellpadding="10">
rem * <tbody>
rem * <tr>
rem * <td><strong> Enterprise</strong></td>
rem * <td>The property/method is used only with the enterprise version. using it without having a valid license will<br />be ignored.</td>
rem * </tr>
rem * <tr>
rem * <td> <strong>Configuration</strong></td>
rem * <td>Properties and methods which are tagged with this tag are used to configure the grid before it is rendered on the client.<br />Changing these properties or calling these methods won't affect the grid which is displayed on the client.<br />In order to reflect your changes on the client, you need to re-render the whole grid <br />or re-render the column definition once again.</td>
rem * </tr>
rem * <tr>
rem * <td> <strong>API</strong></td>
rem * <td>Methods/properties tagged with this tag can be called before or after the grid is rendered on the client and they don't require a refresh.</td>
rem * </tr>
rem * <tr>
rem * <td><strong> ColumnsRenderer</strong></td>
rem * <td>Changing this property or calling this method after the first render require columns re-render using <i>updateColumns()</i> method</td>
rem * </tr>
rem * <tr>
rem * <td><strong> GridRenderer</strong></td>
rem * <td>Changing this property or calling this method after the first render require full re-render using <i>render()</i> method</td>
rem * </tr>
rem * </tbody>
rem * </table>
rem *
REM * @author Hyyan Abo Fakher
REM */
class public GxColumnDefinition
rem /**
rem * The name to render in the column header.
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjString Label! = null()
rem /**
rem * Whether to show the column when the group is open / closed.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem *
rem * @see COLUMN_GROUP_CLOSED()
rem * @see COLUMN_GROUP_OPENED()
rem */
field public BBjString ColumnGroupShow! = null()
rem /**
rem * CSS class(es) to use for the header cell.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public ArrayList HeaderClass! = new ArrayList()
rem /**
rem * CSS class(es) to use for the tool panel cell.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public ArrayList ToolPanelClass! = new ArrayList()
rem /**
rem * Tooltip for the column header
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjString HeaderTooltip! = null()
rem /**
rem * Set to true if you do not want this column or group to appear in the tool panel.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber SuppressToolPanel! = null()
rem /**
rem * Set to true if you do not want this column (filter) or group (filter group) to appear in the Filters Tool Panel.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber SuppressFiltersToolPanel! = null()
rem /**
rem * A constant which defines the group state as opened
rem *
rem * @return BBjString <b>opened</b>
rem */
method public static BBjString COLUMN_GROUP_OPENED()
methodret "open"
methodend
rem /**
rem * A constant which defines the group state as opened
rem *
rem * @return BBjString <b>opened</b>
rem */
method public static BBjString COLUMN_GROUP_CLOSED()
methodret "closed"
methodend
rem /**
rem * Convert the definition to Json Object
rem */
method public JsonObject getAsJsonObject()
declare JsonObject json!
json! = new JsonObject()
json!.addProperty("headerName" , #getLabel(),err=*next)
json!.addProperty("columnGroupShow" , #getColumnGroupShow() ,err=*next)
json!.addProperty("headerClass" , iff(#getHeaderClass().size() <> 0 ,new Gson().toJson(#getHeaderClass()), listIsEmpty!) ,err=*next)
json!.addProperty("toolPanelClass" , iff(#getToolPanelClass().size() <> 0 ,new Gson().toJson(#getToolPanelClass()) ,listIsEmpty!) ,err=*next)
json!.addProperty("suppressColumnsToolPanel" , #getSuppressToolPanel().booleanValue() ,err=*next)
json!.addProperty("suppressFiltersToolPanel" , #getSuppressFiltersToolPanel().booleanValue() ,err=*next)
json!.addProperty("headerTooltip",#getHeaderTooltip(),err=*next)
methodret json!
methodend
classend
rem /**
rem * The class represents the default column definition which the grid will use.
rem *
REM * @author Hyyan Abo Fakher
rem */
class public GxDefaultColumnDefinition extends GxColumnDefinition
rem /**
rem * The Field Type.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem *
rem * <b>Note :</b> Not all sql types are supported, for example it does not make sense to declare a colum type as STRUCT.
rem *
rem * @see https://docs.oracle.com/javase/8/docs/api/java/sql/Types.html
rem */
field public BBjNumber Type! = 12
rem /**
rem * Initial width in pixels
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem * <br><br>
rem * <b>Note:</b> setting the width to zero will not hide the column, use <b>setHidden()</b> instead. And if the width is null()
rem * this means the grid will auto set the width for this column
rem *
rem * @see setHidden()
rem */
field public BBjNumber Width! = null()
rem /**
rem * Initial min width in pixels
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber MinWidth! = null()
rem /**
rem * Initial max width in pixels
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber MaxWidth! = null()
rem /**
rem * The filter component to use for this column
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public GxFilterInterface Filter! = new GxFilterText()
rem /**
rem * When true the filter is enabled, disabled otherwise
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber EnableFilter! = 1
rem /**
rem * When true enable the floating filter on this column , false otherwise
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber FloatingFilter! = null()
rem /**
rem * Set to true to make a column hidden by default.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber Hidden! = 0
rem /**
rem * Set to 'left' or 'right' to pin.
rem *
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem *
rem * @see PINNED_LEFT()
rem * @see PINNED_RIGHT()
rem */
field public BBjString Pinned! = null()
rem /**
rem * Set to true to always have column displayed first.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber LockPosition! = null()
rem /**
rem * Set to true block making column visible / hidden via the UI (API will still work).
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber LockVisible! = null()
rem /**
rem * Set to true block pinning column via the UI (API will still work).
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber LockPinned! = null()
rem /**
rem * Set to true to allow sorting on this column.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber Sortable! = 1
rem /**
rem * Set to 'asc' or 'desc' to sort by this column by default.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem *
rem * @see SORT_DESC()
rem * @see SORT_ASC()
rem */
field public BBjString Sort! = null()
rem /**
rem * Set to true to allow column to be resized.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber Resizable! = 1
rem /**
rem * Set to true to render a selection checkbox in the column.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber CheckboxSelection! = null()
rem /**
rem * Set to true to render a selection checkbox in the column's header.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber HeaderCheckboxSelection! = null()
rem /**
rem * When true , The checkbox will select only filtered rows when checked and un-select only filtered rows when unchecked. The checkbox will update its state based only on filtered rows.
rem * When false The checkbox will select all rows when checked, and un-select all rows when unchecked. The checkbox will update its state based on all rows.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber HeaderCheckboxSelectionFilteredOnly! = 1
rem /**
rem * CSS class(es) to use for the cell.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public ArrayList CellClass! = new ArrayList()
rem /**
rem * A map of css values.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public JsonObject CellStyle! = new JsonObject()
rem /**
rem * Set to true if the column is editable, otherwise false.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber Editable! = 0
rem /**
rem * An expression which determines whether the column is editable
rem * or not. when this config is different than null , then the column
rem * configuration `Editable` will be ignored
rem */
field public GxExpressionInterface EditableExpression! = null()
rem /**
rem * A cellRenderer to use for this column
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public GxRendererInterface CellRenderer! = null()
rem /**
rem * A cellRenderer for pinned rows.
rem *
rem * Use to give pinned row cell a different CellRenderer to the other cells.
rem * If both CellRenderer and PinnedRowCellRenderer are provided,
rem * pinned rows will use PinnedRowCellRenderer over CellRenderer.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem *
rem * @deprecated since v1.7.0, Setting this value won't affect the rendering. Please use the `CellRenderer` instead.
rem */
field public GxRendererInterface PinnedRowCellRenderer! = null()
rem /**
rem * CellEditor to use for this column
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public GxCellEditorInterface CellEditor! = new GxCellEditorBasicText()
rem /**
rem * Name of function to use for aggregation. One of [sum,min,max,first,last].
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjString AggFunc! = null()
rem /**
rem * Aggregation functions allowed on this column eg ['sum','avg'].
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public HashSet AllowedAggFuncs! = new HashSet()
rem /**
rem * Set this in columns you want to group by. If only grouping by one column, set this to any number (eg 0). If grouping by multiple columns, set this to where you want this column to be in the group (eg 0 for first, 1 for second, and so on).
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber RowGroupIndex! = null()
rem /**
rem * Set this in columns you want to pivot by. If only pivoting by one column, set this to any number (eg 0). If pivoting by multiple columns, set this to where you want this column to be in the order of pivots (eg 0 for first, 1 for second, and so on).
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber PivotIndex! = null()
rem /**
rem * Set to true if you want the unsorted icon to be shown when no sort is applied to this column.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber UnSortIcon! = 0
rem /**
rem * Set to true if you want to be able to row group by this column via the UI.
rem *
rem * <br><b><small>#Enterprise</small></b>
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber EnableRowGroup! = 1
rem /**
rem * Set to true To group rows by this column
rem *
rem * <br><b><small>#Enterprise</small></b>
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem *
rem * @see Gx.Columns.EnableRowGroup!
rem */
field public BBjNumber RowGroup! = 0
rem /**
rem * Set to true if you want to be able to pivot by this column via the UI.
rem *
rem * <br><b><small>#Enterprise</small></b>
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber EnablePivot! = 1
rem /**
rem * Set to true if you want to be able to aggregate by this column via the UI.
rem *
rem * <br><b><small>#Enterprise</small></b>
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber EnableValue! = 1
rem /**
rem * Set to true if no menu should be shown for this column header.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber SuppressMenu! = 0
rem /**
rem * Set to true if you want this columns width to be fixed during 'size to fit' operation.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber SuppressSizeToFit! = 0
rem /**
rem * Set to true if you do not want this column to be movable via dragging.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber SuppressMovable! = 0
rem /**
rem * Set to true if this col is not navigable (ie cannot be tabbed into), otherwise false.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber SuppressNavigable! = 0
rem /**
rem * Set to true to have the grid calculate height of row based on contents of this column.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber AutoHeight! = 0
rem /**
rem * Rules which can be applied to include certain CSS classes. These rules are provided as a map
rem * where the keys are the class names and the values are expressions that if evaluated to true, the class gets used.
rem * An expression is evaluated by the grid by executing the string as if it were a Javascript expression.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>.
rem * <br><br>
rem * The expression has the following attributes available to it. <br><br>
rem * <table border="1" cellpadding="10">
rem * <tbody>
rem * <tr>
rem * <td><strong> x</strong></td>
rem * <td> Mapped from cell value</td>
rem * </tr>
rem * <tr>
rem * <td><strong> rowIndex</strong></td>
rem * <td> Maps the current row index</td>
rem * </tr>
rem * <tr>
rem * <td> <strong>data</strong></td>
rem * <td> Mapped from the DataRow</td>
rem * </tr>
rem * <tr>
rem * <td> <strong>ctx</strong></td>
rem * <td> The grid client context</td>
rem * </tr>
rem * </tbody>
rem * </table>
rem */
field public JsonObject CellClassRules! = new JsonObject()
rem /**
rem * An Ag Grid expression which can be executed before getting the value from your data for display
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>.
rem *
rem * @see Gx.Expression.GxExpression
rem */
field public GxExpressionInterface ValueGetterExpression! = null()
rem /**
rem * An Ag Grid expression which can be executed to format the value for display.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>.
rem *
rem * @see Gx.Expression.GxExpression
rem */
field public GxExpressionInterface ValueFormatterExpression! = null()
rem /**
rem * An Ag Grid expression which can be executed to get the value for filtering purposes.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>.
rem *
rem * @see Gx.Expression.GxExpression
rem */
field public GxExpressionInterface FilterValueGetterExpression! = null()
rem /**
rem * An Ag Grid expression which can be executed before setting the value into your data for saving.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>.
rem *
rem * @see Gx.Expression.GxExpression
rem */
field public GxExpressionInterface ValueSetterExpression! = null()
rem /**
rem * An Ag Grid expression which can be executed to parse the value for saving.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>.
rem *
rem * @see Gx.Expression.GxExpression
rem */
field public GxExpressionInterface ValueParserExpression! = null()
rem /**
rem * The default column mask
rem */
field public BBjString Mask! = null()
rem /**
rem * The default numbers mask to use. by default null()
rem * @deprecated - Use Mask instead
rem */
field public BBjString DefaultNumbersMask! = null()
rem /**
rem * The default strings mask to use. by default null()
rem * @deprecated - Use Mask instead
rem */
field public BBjString DefaultStringsMask! = null()
rem /**
rem * The default dates mask to use. by default <b>%Dz.%Mz.%Yd</b>
rem * @deprecated - Use Mask instead
rem */
field public BBjString DefaultDatesMask! = "%Yd-%Mz-%Dz"
rem /**
rem * The default dates mask to use. by default <b>%Dz.%Hz:%mz:%sz</b>
rem * @deprecated - Use Mask instead
rem */
field public BBjString DefaultTimesMask! = "%Hz:%mz:%sz"
rem /**
rem * The default timestamps mask to use. by default <b>%Dz.%Mz.%Yl %Hz:%mz:%sz</b>
rem * @deprecated - Use Mask instead
rem */
field public BBjString DefaultTimestampsMask! = "%Yd-%Mz-%Dz %Hz:%mz:%sz"
rem /**
rem * Icons to use inside the column instead of the grid's default icons.
rem *
rem * The icons can either be set on the grid options (all icons) or on the column definition (all except group).
rem * If defined in both the grid options and column definitions, the column definition will get used.
rem * This allows you to specify defaults in the grid options to fall back on, and then provide individual icons for
rem * specific columns. This is handy if, for example, you want to include 'A..Z' as string sort icons
rem * and just the simple arrow for other columns.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>.
rem *
rem * The icons are set as follows:
rem * <pre>
rem * <code>
rem * // column header items
rem * menu
rem * filter
rem * columns
rem * sortAscending
rem * sortDescending
rem * sortUnSort
rem *
rem * // row checkbox selection and tool panel column selection
rem * checkboxChecked
rem * checkboxUnchecked
rem * checkboxIndeterminate
rem *
rem * // tool panel column selection, when read only (ie disabled checkboxes)
rem * checkboxCheckedReadOnly
rem * checkboxUncheckedReadOnly
rem * checkboxIndeterminateReadOnly
rem *
rem * // when moving columns
rem * columnMovePin // when column is to the left, before it gets pinned
rem * columnMoveAdd // when adding a column
rem * columnMoveHide // when removing a column
rem * columnMoveMove // when moving a column
rem * columnMoveLeft // when moving and scrolling left
rem * columnMoveRight // when moving and scrolling right
rem * columnMoveGroup // when about to drop into group panel
rem * columnMoveValue // when about to drop into value panel
rem * columnMovePivot // when about to drop into pivot panel
rem * dropNotAllowed // when trying to drop column into group/value/pivot panel and column doesn't support it
rem *
rem * // menu
rem * menuPin // beside the column pin menu item
rem * menuValue // beside the column value menu item
rem * menuAddRowGroup // beside the column row group menu item
rem * menuRemoveRowGroup // beside the column row group menu item
rem * clipboardCopy // beside the copy to clipboard menu item
rem * clipboardPaste // beside the paste from clipboard menu item
rem *
rem * // column drop panels
rem * pivotPanel // beside where to drop columns for pivot
rem * valuePanel // beside where to drop columns for value
rem * </code>
rem * </pre>
rem */
field public JsonObject Icons! = new JsonObject()
rem /**
rem * Defines the chart data type that should be used for a column.
rem * There are two types of charting ranges; a category range that is highlighted in green and a series range that is
rem * highlighted in blue.
rem * A category range can only contain cells from a single column, whereas a series range can contain
rem * values from many columns.
rem * Columns can be explicitly configured or left for the grid to infer the type based on the data contained in the cells
rem * where columns containing string values will map to 'categories' and columns containing number values will map to 'series'
rem * charting columns.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>.
rem */
field public BBjString ChartType! = null()
rem /**
rem * The field of the tooltip to apply to the cell.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjString TooltipField! = null()
rem /**
rem * A Grid expression which can be executed to return the tooltip value
rem * to display for each cell.
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>.
rem *
rem * @see GxExpressions.GxExpression
rem */
field public GxExpressionInterface TooltipValueGetterExpression! = null()
rem /**
rem * A grid expression which can be executed to perform row spanning.
rem *
rem * The expression must return the number of rows to span , if no spanning should be applied , then
rem * return `1` instead (ex: "data.SHOW ? 4 : 1")
rem *
rem * By default, each cell will take up the height of one row.
rem * You can change this behaviour to allow cells to span multiple rows.
rem * This feature is similar to 'cell merging' in Excel or 'row spanning' in HTML tables.
rem *
rem * To allow row spanning, the grid must have options `SuppressRowTransform=true`
rem * To have a cell span more than one row, return how many rows to span in the RowSpanExpression.
rem *
rem * The option `SuppressRowTransform=true` is used to stop the grid positioning rows using CSS transform
rem * and instead the grid will use CSS top.
rem * The reason row span will not work with CSS transform is that CSS transform creates a stacking context
rem * which constrains CSS z-index from placing cells on top of other cells in another row.
rem * Having cells extend into other rows is necessary for row span which means it will not
rem * work when using CSS transform.
rem * The downside to not using transform is performance; row animation (after sort or filter) will be slower.
rem *
rem * <strong>Constraints with Row Spanning :<strong>
rem *
rem * Row Spanning breaks out of the row / cell calculations that a lot of features in the grid
rem * are based on. If using Row Spanning, be aware of the following:
rem *
rem * <ol>
rem * <li>
rem * Responsibility is with the developer to not span past the last row.
rem * This is especially true if sorting and filtering
rem * (e.g. a cell may span outside the grid after the data is sorted and the cell's row ends up at the bottom of the grid).
rem * </li>
rem *
rem * <li>
rem * Responsibility is with the developer to apply a background style to spanning
rem * cells so that overwritten cells cannot be seen.
rem * </li>
rem *
rem * <li>
rem * Overwritten cells will still exist, but will not be visible.
rem * This means cell navigation will go to the other cells - e.g. if a row spanned
rem * cell has focus, and the user hits the 'arrow down' key, the focus will go to a hidden cell.
rem * </li>
rem *
rem * <li>
rem * Row span does not work with dynamic row height or auto-height.
rem * The row span assumes default row height is used when calculating how high the cell should be.
rem * </li>
rem *
rem * <li>
rem * Sorting and filtering will provide strange results when row spanning.
rem * For example a cell may span 4 rows, however applying a filter or a sort will probably
rem * change the requirements of what rows should be spanned.
rem * </li>
rem *
rem * <li>
rem * Range Selection will not work correctly when spanning cells.
rem * This is because it is not possible to cover all scenarios, as a range is no longer a perfect rectangle.
rem * </li>
rem *
rem * </ol>
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>.
rem *
rem * @see GxExpression
rem */
field public GxExpressionInterface RowSpanExpression! = null()
rem /**
rem * A grid expression which can be executed to perform column spanning.
rem *
rem * The expression must return the number of columns to span , if no spanning should be applied , then
rem * return `1` instead (ex: "data.Section === 'quarters'")
rem *
rem * By default, each cell will take up the width of one column.
rem * You can change this behaviour to allow cells to span multiple columns.
rem * This feature is similar to 'cell merging' in Excel or 'column spanning' in HTML tables.
rem *
rem * <strong>Constraints with Column Spanning :<strong>
rem *
rem * Column Spanning breaks out of the row / cell calculations that a lot of features in the grid are based on.
rem * If using Column Spanning, be aware of the following:
rem *
rem * <ol>
rem * <li>
rem * Range Selection will not work correctly when spanning cells.
rem * This is because it is not possible to cover all scenarios, as a range is no
rem * longer a perfect rectangle.
rem * </li>
rem * </ol>
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>.
rem *
rem * @see GxExpression
rem */
field public GxExpressionInterface ColumnSpanExpression! = null()
rem /**
rem * Set to an array containing zero, one or many of the pre built men tabs.
rem * This is used to figure out which menu tabs are present and in which order the tabs are shown.
rem *
rem * @see GxColumn.MENU_TAB_FILTER()
rem * @see GxColumn.MENU_TAB_GENERAL()
rem * @see GxColumn.MENU_TAB_COLUMNS()
rem */
field public ArrayList MenuTabs! = new ArrayList()
field private HashMap CellEditorMap! = new HashMap()
field private String CellEditorSelectorExp! = null()
rem /**
REM * Set a cell editor selector to use for this column.
REM *
REM * @param expression! Javascript expression to use to select the cell editor
REM * @param editors! A set of possible cell editors to use
REM */
method public void setCellEditorSelector(BBjString expression!, HashMap editors!)
#CellEditorMap! = editors!
#CellEditorSelectorExp! = expression!
methodend
rem /**
rem * Get pinned left constant
rem *
rem * @return BBjString <b>left</b>
rem */
method public static BBjString PINNED_LEFT()
methodret "left"
methodend
rem /**
rem * Get pinned right constant
rem *
rem * @return BBjString <b>right</b>
rem */
method public static BBjString PINNED_RIGHT()
methodret "right"
methodend
rem /**
rem * Get sort direction constant
rem *
rem * @return BBjString <b>desc</b>
rem */
method public static BBjString SORT_DESC()
methodret "desc"
methodend
rem /**
rem * Get sort direction constant
rem *
rem * @return BBjString <b>asc</b>
rem */
method public static BBjString SORT_ASC()
methodret "asc"
methodend
rem /**
rem * A constant which defines the group state as opened
rem *
rem * @return BBjString <b>opened</b>
rem */
method public static BBjString COLUMN_GROUP_OPENED()
methodret "open"
methodend
rem /**
rem * A constant which defines the group state as opened
rem *
rem * @return BBjString <b>opened</b>
rem */
method public static BBjString COLUMN_GROUP_CLOSED()
methodret "closed"
methodend
rem /**
rem * A constant which defines column chart category
rem *
rem * @return BBjString <b>category</b>
rem */
method public static BBjString CHART_TYPE_CATEGORY()
methodret "category"
methodend
rem /**
rem * A constant which defines column chart series
rem *
rem * @return BBjString <b>series</b>
rem */
method public static BBjString CHART_TYPE_SERIES()
methodret "series"
methodend
rem /**
rem * A constant which defines column chart excluded, columns which set chart type to excluded will be excluded from charts
rem *
rem * @return BBjString <b>excluded</b>
rem */
method public static BBjString CHART_TYPE_EXCLUDED()
methodret "excluded"
methodend
rem /**
rem * Create a GxExpression from string and set it as value getter
rem *
rem * @param BBjString expression! Javascript expression
rem */
method public void setValueGetterExpression(BBjString expression!)
#ValueGetterExpression! = new GxExpression(expression!)
methodend
rem /**
rem * Create a GxExpression from string and set it as value setter
rem *
rem * @param BBjString expression! Javascript expression
rem */
method public void setValueSetterExpression(BBjString expression!)
#ValueSetterExpression! = new GxExpression(expression!)
methodend
rem /**
rem * Create a GxExpression from string and set it as value formatter
rem *
rem * @param BBjString expression! Javascript expression
rem */
method public void setValueFormatterExpression(BBjString expression!)
#ValueFormatterExpression! = new GxExpression(expression!)
methodend
rem /**
rem * Create a GxExpression from string and set it as value parser
rem *
rem * @param BBjString expression! Javascript expression
rem */
method public void setValueParserExpression(BBjString expression!)
#ValueParserExpression! = new GxExpression(expression!)
methodend
rem /**
rem * Create a GxExpression from string and set it as tooltip value getter
rem *
rem * @param BBjString expression! Javascript expression
rem */
method public void setTooltipValueGetterExpression(BBjString expression!)
#TooltipValueGetterExpression! = new GxExpression(expression!)
methodend
rem /**
rem * Create a GxExpression from string and set it as editable expression
rem *
rem * @param BBjString expression! Javascript expression
rem */
method public void setEditableExpression(BBjString expression!)
#EditableExpression! = new GxExpression(expression!)
methodend
rem /**
rem * Create a GxExpression from string and set it as row span expression
rem *
rem * @param BBjString expression! Javascript expression
rem */
method public void setRowSpanExpression(BBjString expression!)
#RowSpanExpression! = new GxExpression(expression!)
methodend
rem /**
rem * Create a GxExpression from string and set it as column span expression
rem *
rem * @param BBjString expression! Javascript expression
rem */
method public void setColumnSpanExpression(BBjString expression!)
#ColumnSpanExpression! = new GxExpression(expression!)
methodend
rem /**
rem * Set the allowed aggregation functions allowed on this column
rem *
rem * @param BBjString funcs! comma separated functions
rem */
method public void setAllowedAggFuncs(BBjString funcs!)
#AllowedAggFuncs!.addAll(Arrays.asList(funcs!.replaceAll(" ","").split(",")))
methodend
rem /**
rem * Sets the foreground color for a column
rem *
rem * @param BBjColor color! the color for the column
rem */
method public void setForeColor(BBjColor color!)
#getCellStyle().addProperty("color" , BBjGridExWidget.makeHexColor(color!))
methodend
rem /**
rem * Sets the foreground color for a column
rem *
rem * @param BBjString color$ Valid CSS color
rem *
rem * @see https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
rem */
method public void setForeColor(BBjString color!)
#getCellStyle().addProperty("color" , color!)
methodend
rem /**
rem * Sets the background color of a column
rem *
rem * @param BBjColor color! The color for the column
rem */
method public void setBackColor(BBjColor color!)
#getCellStyle().addProperty("background-color" , BBjGridExWidget.makeHexColor(color!))
methodend
rem /**
rem * Sets the background color of a column
rem *
rem * @param BBjColor color$ Valid CSS color
rem *
rem * @see https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
rem */
method public void setBackColor(BBjString color!)
#getCellStyle().addProperty("background-color" , color!)
methodend
rem /**
rem * Sets the default alignment for a column
rem *
rem * @param BBjNumber align! The column alignment
rem * @param BBjNumber alignHeader! when true the column's header will use the same alignment
rem *
rem * valid alignments:
rem *
rem * @see BBjGridExWidget.GRID_ALIGN_LEFT()
rem * @see BBjGridExWidget.GRID_ALIGN_CENTER()
rem * @see BBjGridExWidget.GRID_ALIGN_RIGHT()
rem */
method public void setAlignment(BBjNumber align! , BBjNumber alignHeader!)
switch align!
case BBjGridExWidget.GRID_ALIGN_LEFT()
#getCellClass().remove("gw-alignment-cell-left")
if alignHeader! = 1
#setHeaderAlignment(align!)
FI
break
case BBjGridExWidget.GRID_ALIGN_CENTER()