[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[ve-dev] Implementing BoxLayoutPane
|
Hello,
Need your help with implementing ULCBoxLayoutPane:
In ULC, we have ULCBoxLayoutPane whose constructor takes the axis as arg.
Axis cannot be set using a setter:
The code pattern:
ULCBoxLayoutPane box = new ULCBoxLayoutPane(ULCBoxLayoutPane.Y_AXIS):
box.add(getULCButton(), null);
We would like to put ULCBoxLayoutPane on the palette. we would like to have
2 entries in the palette, one for ULCBoxLayout_X and one for ULCBoxLayout_y.
Question:
1. How do we instantiate a class that has an arg in the constructor?
2. How do we specify the palette xmi or override file which constructor to
generate in case the user picks Box_X or Box_Y?
3. Could you please give a solution to implement such a thingincluding what
to do in codegen.
-------------------------
I looked up your implementation of Swing BoxLayout:
1. In LayoutManager.override you specify the Box_X and Box_y as combo
entries for layout struct feature.
2. You specify artificial classes javax.swing.BoxLayout_X and
javax.Swing.BoxLayout_Y
3. Then in layoutmanger.override you specify the BoxLayoutPolicyFactory
4. BoxLayoutPolicyFactory.getLayoutManagerInstance constructs the right
JavaObjectInstance
with appropriate arg in constructor for Box_X or Box_Y
----------------
How do I achieve similar thing but from the palette?
Quick help will be appreciated.
Thanks and regards,
Janak