[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
[ve-dev] Read/Write of complex LayoutManager values
 | 
Thanks for the excellent help... FormLayoutSwitcher is essentially
done.
Now working on a simple FormLayoutPolicyEdit -- I see how to read/write
simple bean properties to the layoutmanager using INumberBeanProxy and
IStringBeanProxy.  However, I need to be able to access a property
with a more complex type:
- public int[][] getColumnGroups()
 
and
- public ColumnSpec getColumnSpec(int columnIndex)
 
So the first question is: is there an IObjectBeanProxy or some
equivalent?  If not, how do I extract existing layoutmanager
constructor arguments (which is what defines the form of the layout
format)?
FormLayout layout = new FormLayout(
- "right:pref, 6dlu, 50dlu, 4dlu",  // 4 columns 
- "pref, 3dlu, pref, 3dlu, pref");  // 5 rows
  
---------------
Second question is: is there a way to invoke a non-bean (is/get/set)
based method on the layoutmanager?  Not essential, but it would be
helpful to be able to use layoutmanager methods of the form:
- public void insertColumn(int columnIndex, ColumnSpec columnSpec)
 
and
- public void removeColumn(int columnIndex) 
 
----------------
The final question involves working with existing constraint objects -- I
will need to enumerate the components in the container and then inspect
the fields of the corresponding constraint object to extract the current
constraint values.  Something like:
...
List cclist = ...  // accumulator for constraint values 
while
(childs.hasNext()) { // where childs is an interator over the List
of container components 
- EObject constraintComponent =
InverseMaintenanceAdapter.getIntermediateReference((EObject) 
- getContainerBean(), sfComponents, sfConstraintComponent, (EObject)
childs.next());
 
  
// this is the unknown part vvvvvv 
CellConstraints constraint = ????(constraintComponent); 
cclist.add(constraint.gridX); 
cclist.add(constraint.gridY); 
cclist.add(constraint.gridWidth); 
cclist.add(constraint.gridHeight); 
}
Explanations and/or pointers to exemplary source in the project would be
appreciated.
Gerald