|
@@ -9,8 +9,7 @@ |
9 |
9 |
|
|
10 |
10 |
|
public class RelSubFormRowInstanceComponentHandlerImpl |
11 |
11 |
|
extends AbstractFormInstanceComponentHandlerWithAttributes |
12 |
|
- |
implements RelSubFormRowInstanceComponentHandler |
13 |
|
- |
{ |
|
12 |
+ |
implements RelSubFormRowInstanceComponentHandler { |
14 |
13 |
|
private RelSubFormInstanceComponentHandlerImpl mParent; |
15 |
14 |
|
private String mRowObjectKey; |
16 |
15 |
|
private int mRowIndex; |
|
@@ -18,59 +17,50 @@ |
18 |
17 |
|
private Widget mWidget = null; |
19 |
18 |
|
|
20 |
19 |
|
public RelSubFormRowInstanceComponentHandlerImpl( RelSubFormInstanceComponentHandlerImpl pParent, |
21 |
|
- |
String pRowObjectKey, int pRowIndex ) |
22 |
|
- |
{ |
|
20 |
+ |
String pRowObjectKey, int pRowIndex ) { |
23 |
21 |
|
Objects.assertNotNull( "Parent", mParent = pParent ); |
24 |
22 |
|
mRowObjectKey = Strings.assertNotNullNotEmpty( "RowObjectKey", pRowObjectKey ); |
25 |
23 |
|
mRowIndex = pRowIndex; |
26 |
24 |
|
mFormDataRowKey = new FormDataRowKey( getFormUniqueID(), mRowObjectKey ); |
27 |
25 |
|
} |
28 |
26 |
|
|
29 |
|
- |
public void init( Widget pWidget ) |
30 |
|
- |
{ |
|
27 |
+ |
public void init( Widget pWidget ) { |
31 |
28 |
|
Objects.assertNotNull( "Widget", mWidget = pWidget ); |
32 |
29 |
|
SubFormRowCarrier zRowContainer = mParent.getRowCarrier(); |
33 |
30 |
|
zRowContainer.insert( mWidget, mRowIndex ); |
34 |
31 |
|
zRowContainer.membershipChangesComplete(); |
35 |
32 |
|
} |
36 |
33 |
|
|
37 |
|
- |
public void createTabAttributeAdapter( AttributeMetaData pTabAttributeMetaData ) |
38 |
|
- |
{ |
|
34 |
+ |
public void createTabAttributeAdapter( AttributeMetaData pTabAttributeMetaData ) { |
39 |
35 |
|
SubFormRowCarrier zCarrier = mParent.getRowCarrier(); |
40 |
36 |
|
addAttributeAdapter( zCarrier.createTabAttributeAdapter( this, pTabAttributeMetaData, mWidget ) ); |
41 |
37 |
|
} |
42 |
38 |
|
|
43 |
39 |
|
public RelSubFormInstanceComponentHandler createRelSubFormInstanceComponentHandler( |
44 |
|
- |
UiRelSubFormDef pSubFormDef, FormMetaData pSubFormMetaData, SubFormRowCarrier pRowCarrier ) |
45 |
|
- |
{ |
|
40 |
+ |
UiRelSubFormDef pSubFormDef, FormMetaData pSubFormMetaData, SubFormRowCarrier pRowCarrier ) { |
46 |
41 |
|
RelSubFormTypeHelper zTypeHelper = |
47 |
42 |
|
mParent.getRelSubFormTypeHelperFor( pSubFormDef, pSubFormMetaData ); |
48 |
43 |
|
return new RelSubFormInstanceComponentHandlerImpl( this, zTypeHelper, pRowCarrier ); |
49 |
44 |
|
} |
50 |
45 |
|
|
51 |
|
- |
public UberFormInstanceComponentHandler getUberHandler() |
52 |
|
- |
{ |
|
46 |
+ |
public UberFormInstanceComponentHandler getUberHandler() { |
53 |
47 |
|
return mParent.getUberHandler(); |
54 |
48 |
|
} |
55 |
49 |
|
|
56 |
|
- |
public Integer getFormUniqueID() |
57 |
|
- |
{ |
|
50 |
+ |
public Integer getFormUniqueID() { |
58 |
51 |
|
return mParent.getFormUniqueID(); |
59 |
52 |
|
} |
60 |
53 |
|
|
61 |
|
- |
public FormDataRowKey getFormDataRowKey() |
62 |
|
- |
{ |
|
54 |
+ |
public FormDataRowKey getFormDataRowKey() { |
63 |
55 |
|
return mFormDataRowKey; |
64 |
56 |
|
} |
65 |
57 |
|
|
66 |
|
- |
public FormDataRowKey getParentFormDataRowKey() |
67 |
|
- |
{ |
|
58 |
+ |
public FormDataRowKey getParentFormDataRowKey() { |
68 |
59 |
|
return mParent.getFormDataRowKey(); |
69 |
60 |
|
} |
70 |
61 |
|
|
71 |
62 |
|
// Child Component Handler Management |
72 |
|
- |
protected void LLdispose( UberFormInstanceComponentHandler pUberHandler ) |
73 |
|
- |
{ |
|
63 |
+ |
protected void LLdispose( UberFormInstanceComponentHandler pUberHandler ) { |
74 |
64 |
|
super.LLdispose( pUberHandler ); |
75 |
65 |
|
|
76 |
66 |
|
SubFormRowCarrier zRowContainer = mParent.getRowCarrier(); |
|
@@ -82,35 +72,29 @@ |
82 |
72 |
|
mWidget = null; |
83 |
73 |
|
} |
84 |
74 |
|
|
85 |
|
- |
public String getRowObjectKey() |
86 |
|
- |
{ |
|
75 |
+ |
public String getRowObjectKey() { |
87 |
76 |
|
return mRowObjectKey; |
88 |
77 |
|
} |
89 |
78 |
|
|
90 |
|
- |
public int getRowIndex() |
91 |
|
- |
{ |
|
79 |
+ |
public int getRowIndex() { |
92 |
80 |
|
return mRowIndex; |
93 |
81 |
|
} |
94 |
82 |
|
|
95 |
|
- |
public void setRowIndex( int pRowIndex ) |
96 |
|
- |
{ |
|
83 |
+ |
public void setRowIndex( int pRowIndex ) { |
97 |
84 |
|
SubFormRowCarrier zRowContainer = mParent.getRowCarrier(); |
98 |
85 |
|
zRowContainer.insert( mWidget, mRowIndex = pRowIndex ); // auto removes from current parent |
99 |
86 |
|
zRowContainer.membershipChangesComplete(); |
100 |
87 |
|
} |
101 |
88 |
|
|
102 |
|
- |
public void decRowIndex() |
103 |
|
- |
{ |
|
89 |
+ |
public void decRowIndex() { |
104 |
90 |
|
mRowIndex--; |
105 |
91 |
|
} |
106 |
92 |
|
|
107 |
|
- |
public void incRowIndex() |
108 |
|
- |
{ |
|
93 |
+ |
public void incRowIndex() { |
109 |
94 |
|
mRowIndex++; |
110 |
95 |
|
} |
111 |
96 |
|
|
112 |
|
- |
public Widget getWidget() |
113 |
|
- |
{ |
|
97 |
+ |
public Widget getWidget() { |
114 |
98 |
|
return mWidget; |
115 |
99 |
|
} |
116 |
100 |
|
} |