forked from extnet/Ext.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAbstractPanelConfig.cs
More file actions
825 lines (725 loc) · 20.3 KB
/
AbstractPanelConfig.cs
File metadata and controls
825 lines (725 loc) · 20.3 KB
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
/********
* @version : 2.1.1 - Ext.NET Pro License
* @author : Ext.NET, Inc. http://www.ext.net/
* @date : 2012-12-10
* @copyright : Copyright (c) 2007-2012, Ext.NET, Inc. (http://www.ext.net/). All rights reserved.
* @license : See license.txt and http://www.ext.net/license/.
********/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Ext.Net
{
/// <summary>
///
/// </summary>
public abstract partial class AbstractPanel
{
/// <summary>
///
/// </summary>
new public abstract partial class Config : AbstractContainer.Config
{
/* ConfigOptions
-----------------------------------------------------------------------------------------------*/
private Button tabConfig = null;
/// <summary>
/// A standard Ext.button.Button config object.
/// </summary>
public Button TabConfig
{
get
{
if (this.tabConfig == null)
{
this.tabConfig = new Button();
}
return this.tabConfig;
}
}
private string bodyCls = "";
/// <summary>
/// Additional css class selector to be applied to the body element
/// </summary>
[DefaultValue("")]
public virtual string BodyCls
{
get
{
return this.bodyCls;
}
set
{
this.bodyCls = value;
}
}
private string bodyStyle = "";
/// <summary>
/// Custom CSS styles to be applied to the body element.
/// </summary>
[DefaultValue("")]
public virtual string BodyStyle
{
get
{
return this.bodyStyle;
}
set
{
this.bodyStyle = value;
}
}
private bool animCollapse = true;
/// <summary>
/// True to animate the transition when the panel is collapsed, false to skip the animation (defaults to true if the Ext.Fx class is available, otherwise false).
/// </summary>
[DefaultValue(true)]
public virtual bool AnimCollapse
{
get
{
return this.animCollapse;
}
set
{
this.animCollapse = value;
}
}
private int animCollapseDuration = 0;
/// <summary>
/// True to animate the transition when the panel is collapsed, false to skip the animation (defaults to true if the Ext.fx.Anim class is available, otherwise false). May also be specified as the animation duration in milliseconds
/// </summary>
[DefaultValue(0)]
public virtual int AnimCollapseDuration
{
get
{
return this.animCollapseDuration;
}
set
{
this.animCollapseDuration = value;
}
}
private int? bodyBorder = null;
/// <summary>
/// A shortcut to add or remove the border on the body of a panel. This only applies to a panel which has the frame configuration set to true. Defaults to undefined.
/// </summary>
[DefaultValue(null)]
public virtual int? BodyBorder
{
get
{
return this.bodyBorder;
}
set
{
this.bodyBorder = value;
}
}
private int? bodyPadding = null;
/// <summary>
/// A shortcut for setting a padding style on the body element. The value can either be a number to be applied to all sides, or a normal css string describing padding. Defaults to undefined.
/// </summary>
[DefaultValue(null)]
public virtual int? BodyPadding
{
get
{
return this.bodyPadding;
}
set
{
this.bodyPadding = value;
}
}
private string bodyPaddingSummary = null;
/// <summary>
/// A shortcut for setting a padding style on the body element. The value can either be a number to be applied to all sides, or a normal css string describing padding. Defaults to undefined.
/// </summary>
[DefaultValue(null)]
public virtual string BodyPaddingSummary
{
get
{
return this.bodyPaddingSummary;
}
set
{
this.bodyPaddingSummary = value;
}
}
private ToolbarCollection bottomBar = null;
/// <summary>
/// The bottom toolbar of the panel. This can be a Ext.Toolbar object, a toolbar config, or an array of buttons/button configs to be added to the toolbar.
/// </summary>
public ToolbarCollection BottomBar
{
get
{
if (this.bottomBar == null)
{
this.bottomBar = new ToolbarCollection();
}
return this.bottomBar;
}
}
private Alignment buttonAlign = Alignment.Right;
/// <summary>
/// The alignment of any buttons added to this panel. Valid values are 'right', 'left' and 'center' (defaults to 'right' for buttons/fbar, 'left' for other toolbar types).
/// </summary>
[DefaultValue(Alignment.Right)]
public virtual Alignment ButtonAlign
{
get
{
return this.buttonAlign;
}
set
{
this.buttonAlign = value;
}
}
private bool closable = false;
/// <summary>
/// True to display the 'close' tool button and allow the user to close the window, false to hide the button and disallow closing the window (defaults to false).
/// </summary>
[DefaultValue(false)]
public virtual bool Closable
{
get
{
return this.closable;
}
set
{
this.closable = value;
}
}
private CloseAction closeAction = CloseAction.Destroy;
/// <summary>
/// The action to take when the Panel is closed. The default action is 'close' which will actually remove the Panel from the DOM and destroy it. The other valid option is 'hide' which will simply hide the Panel by setting visibility to hidden and applying negative offsets, keeping the Panel available to be redisplayed via the show method.
/// </summary>
[DefaultValue(CloseAction.Destroy)]
public virtual CloseAction CloseAction
{
get
{
return this.closeAction;
}
set
{
this.closeAction = value;
}
}
private Direction collapseDirection = Direction.None;
/// <summary>
/// The direction to collapse the Panel when the toggle button is clicked.
/// </summary>
[DefaultValue(Direction.None)]
public virtual Direction CollapseDirection
{
get
{
return this.collapseDirection;
}
set
{
this.collapseDirection = value;
}
}
private bool collapseFirst = true;
/// <summary>
/// true to make sure the collapse/expand toggle button always renders first (to the left of) any other tools in the panel's title bar, false to render it last (defaults to true).
/// </summary>
[DefaultValue(true)]
public virtual bool CollapseFirst
{
get
{
return this.collapseFirst;
}
set
{
this.collapseFirst = value;
}
}
private CollapseMode collapseMode = CollapseMode.Default;
/// <summary>
/// When not a direct child item of a border layout, then the Panel's header remains visible, and the body is collapsed to zero dimensions. If the Panel has no header, then a new header (orientated correctly depending on the collapseDirection) will be inserted to show a the title and a re-expand tool.
/// </summary>
[DefaultValue(CollapseMode.Default)]
public virtual CollapseMode CollapseMode
{
get
{
return this.collapseMode;
}
set
{
this.collapseMode = value;
}
}
private bool collapsed = false;
/// <summary>
/// True to render the panel collapsed, false to render it expanded (defaults to false).
/// </summary>
[DefaultValue(false)]
public virtual bool Collapsed
{
get
{
return this.collapsed;
}
set
{
this.collapsed = value;
}
}
private string collapsedCls = "";
/// <summary>
/// A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-collapsed').
/// </summary>
[DefaultValue("")]
public virtual string CollapsedCls
{
get
{
return this.collapsedCls;
}
set
{
this.collapsedCls = value;
}
}
private bool collapsible = false;
/// <summary>
/// True to make the panel collapsible and have an expand/collapse toggle Tool added into the header tool button area. False to keep the panel sized either statically, or by an owning layout manager, with no toggle Tool (defaults to false).
/// </summary>
[DefaultValue(false)]
public virtual bool Collapsible
{
get
{
return this.collapsible;
}
set
{
this.collapsible = value;
}
}
private ItemsCollection<AbstractComponent> dockedItems = null;
/// <summary>
/// A component or series of components to be added as docked items to this panel. The docked items can be docked to either the top, right, left or bottom of a panel.
/// </summary>
public ItemsCollection<AbstractComponent> DockedItems
{
get
{
if (this.dockedItems == null)
{
this.dockedItems = new ItemsCollection<AbstractComponent>();
}
return this.dockedItems;
}
}
private ToolbarCollection footerBar = null;
/// <summary>
/// Convenience method used for adding items to the bottom right of the panel.
/// </summary>
public ToolbarCollection FooterBar
{
get
{
if (this.footerBar == null)
{
this.footerBar = new ToolbarCollection();
}
return this.footerBar;
}
}
private ToolbarCollection leftBar = null;
/// <summary>
/// Convenience method. Short for 'Left Bar' (left-docked, vertical toolbar).
/// </summary>
public ToolbarCollection LeftBar
{
get
{
if (this.leftBar == null)
{
this.leftBar = new ToolbarCollection();
}
return this.leftBar;
}
}
private ToolbarCollection rightBar = null;
/// <summary>
/// Convenience method. Short for 'Right Bar' (right-docked, vertical toolbar).
/// </summary>
public ToolbarCollection RightBar
{
get
{
if (this.rightBar == null)
{
this.rightBar = new ToolbarCollection();
}
return this.rightBar;
}
}
private bool floatable = true;
/// <summary>
/// True to allow clicking a collapsed Panel's placeHolder to display the Panel floated above the layout, false to force the user to fully expand a collapsed region by clicking the expand button to see it again (defaults to true).
/// </summary>
[DefaultValue(true)]
public virtual bool Floatable
{
get
{
return this.floatable;
}
set
{
this.floatable = value;
}
}
private bool frameHeader = true;
/// <summary>
/// True to apply a frame to the panel panels header (if 'frame' is true).
/// </summary>
[DefaultValue(true)]
public virtual bool FrameHeader
{
get
{
return this.frameHeader;
}
set
{
this.frameHeader = value;
}
}
private bool header = true;
/// <summary>
/// Pass as false to prevent a Header from being created and shown.
/// </summary>
[DefaultValue(true)]
public virtual bool Header
{
get
{
return this.header;
}
set
{
this.header = value;
}
}
private PanelHeader headerConfig = null;
/// <summary>
/// Pass as a config object (optionally containing an xtype) to custom-configure this Panel's header.
/// </summary>
[DefaultValue(null)]
public virtual PanelHeader HeaderConfig
{
get
{
return this.headerConfig;
}
set
{
this.headerConfig = value;
}
}
private Direction headerPosition = Direction.Top;
/// <summary>
/// Specify as 'top', 'bottom', 'left' or 'right'. Defaults to 'top'.
/// </summary>
[DefaultValue(Direction.Top)]
public virtual Direction HeaderPosition
{
get
{
return this.headerPosition;
}
set
{
this.headerPosition = value;
}
}
private string headerTextCls = "";
/// <summary>
/// A CSS class to add to the panel's header text.
/// </summary>
[DefaultValue("")]
public virtual string HeaderTextCls
{
get
{
return this.headerTextCls;
}
set
{
this.headerTextCls = value;
}
}
private bool hideCollapseTool = false;
/// <summary>
/// True to hide the expand/collapse toggle button when collapsible == true, false to display it (defaults to false).
/// </summary>
[DefaultValue(false)]
public virtual bool HideCollapseTool
{
get
{
return this.hideCollapseTool;
}
set
{
this.hideCollapseTool = value;
}
}
private bool manageHeight = true;
/// <summary>
/// When true, the dock component layout writes height information to the panel's DOM elements based on its shrink wrap height calculation. This ensures that the browser respects the calculated height. When false, the dock component layout will not write heights on the panel or its body element. In some simple layout cases, not writing the heights to the DOM may be desired because this allows the browser to respond to direct DOM manipulations (like animations).
/// </summary>
[DefaultValue(true)]
public virtual bool ManageHeight
{
get
{
return this.manageHeight;
}
set
{
this.manageHeight = value;
}
}
private int minButtonWidth = 75;
/// <summary>
/// Minimum width of all footer toolbar buttons in pixels (defaults to undefined). If set, this will be used as the default value for the Ext.button.Button-minWidth config of each Button added to the footer toolbar. Will be ignored for buttons that have this value configured some other way, e.g. in their own config object or via the defaults of their parent container
/// </summary>
[DefaultValue(75)]
public virtual int MinButtonWidth
{
get
{
return this.minButtonWidth;
}
set
{
this.minButtonWidth = value;
}
}
private bool? overlapHeader = null;
/// <summary>
/// True to overlap the header in a panel over the framing of the panel itself. This is needed when frame:true (and is done automatically for you). Otherwise it is undefined. If you manually add rounded corners to a panel header which does not have frame:true, this will need to be set to true.
/// </summary>
[DefaultValue(null)]
public virtual bool? OverlapHeader
{
get
{
return this.overlapHeader;
}
set
{
this.overlapHeader = value;
}
}
private ItemsCollection<AbstractComponent> placeHolder = null;
/// <summary>
/// A Component (or config object for a Component) to show in place of this Panel when this Panel is collapsed by a border layout. Defaults to a generated Header containing a Tool to re-expand the Panel.
/// </summary>
public ItemsCollection<AbstractComponent> PlaceHolder
{
get
{
if (this.placeHolder == null)
{
this.placeHolder = new ItemsCollection<AbstractComponent>();
}
return this.placeHolder;
}
}
private ToolbarCollection topBar = null;
/// <summary>
/// Convenience method used for adding items to the top of the panel.
/// </summary>
public ToolbarCollection TopBar
{
get
{
if (this.topBar == null)
{
this.topBar = new ToolbarCollection();
}
return this.topBar;
}
}
private string title = "";
/// <summary>
/// The title text to display in the panel header (defaults to ''). When a title is specified the header element will automatically be created and displayed unless header is explicitly set to false. If you don't want to specify a title at config time, but you may want one later, you must either specify a non-empty title (a blank space ' ' will do) or header:true so that the content Container element will get created.
/// </summary>
[DefaultValue("")]
public virtual string Title
{
get
{
return this.title;
}
set
{
this.title = value;
}
}
private TitleAlign titleAlign = TitleAlign.Default;
/// <summary>
/// May be \"left\", \"right\" or \"center\". The alignment of the title text within the available space between the icon and the tools. Defaults to: \"left\"
/// </summary>
[DefaultValue(TitleAlign.Default)]
public virtual TitleAlign TitleAlign
{
get
{
return this.titleAlign;
}
set
{
this.titleAlign = value;
}
}
private bool titleCollapse = false;
/// <summary>
/// true to allow expanding and collapsing the panel (when collapsible = true) by clicking anywhere in the header bar, false) to allow it only by clicking to tool button (defaults to false)).
/// </summary>
[DefaultValue(false)]
public virtual bool TitleCollapse
{
get
{
return this.titleCollapse;
}
set
{
this.titleCollapse = value;
}
}
private DragSource draggablePanelConfig = null;
/// <summary>
/// Drag config object.
/// </summary>
[DefaultValue(null)]
public virtual DragSource DraggablePanelConfig
{
get
{
return this.draggablePanelConfig;
}
set
{
this.draggablePanelConfig = value;
}
}
private string defaultDockWeights = null;
/// <summary>
/// This object holds the default weights applied to dockedItems that have no weight. These start with a weight of 1, to allow negative weights to insert before top items and are odd numbers so that even weights can be used to get between different dock orders. Defaults to: {top: 1, left: 3, right: 5, bottom: 7}. A string must be the four numbers separated by space symbols. The first number is a top dock weight, the second one - left, the third one - right, the fourth one - bottom.
/// </summary>
[DefaultValue(null)]
public virtual string DefaultDockWeights
{
get
{
return this.defaultDockWeights;
}
set
{
this.defaultDockWeights = value;
}
}
private Icon icon = Icon.None;
/// <summary>
/// The icon to use in the Title bar. See also, IconCls to set an icon with a custom Css class.
/// </summary>
[DefaultValue(Icon.None)]
public virtual Icon Icon
{
get
{
return this.icon;
}
set
{
this.icon = value;
}
}
private string iconCls = "";
/// <summary>
/// A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
/// </summary>
[DefaultValue("")]
public virtual string IconCls
{
get
{
return this.iconCls;
}
set
{
this.iconCls = value;
}
}
private string iconPath = "";
/// <summary>
/// A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
/// </summary>
[DefaultValue("")]
public virtual string IconPath
{
get
{
return this.iconPath;
}
set
{
this.iconPath = value;
}
}
private ToolsCollection tools = null;
/// <summary>
/// An array of tool button configs to be added to the header tool area. When rendered, each tool is stored as an Element referenced by a public property called tools.
/// </summary>
public ToolsCollection Tools
{
get
{
if (this.tools == null)
{
this.tools = new ToolsCollection();
}
return this.tools;
}
}
private bool unstyled = false;
/// <summary>
/// Overrides the baseCls setting to baseCls = 'x-plain' which renders the panel unstyled except for required attributes for Ext layouts to function (e.g. overflow:hidden).
/// </summary>
[DefaultValue(false)]
public virtual bool Unstyled
{
get
{
return this.unstyled;
}
set
{
this.unstyled = value;
}
}
}
}
}