Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ve-dev] Implementing BoxLayoutPane

Thanks Rich, It worked for me.
 
Is there a doc about this somewhere? A doc about palette xmi specs - what all can be specified there and what does it mean?
 
Thanks and regards,
 
Janak
 
-----Original Message-----
From: ve-dev-bounces@xxxxxxxxxxx [mailto:ve-dev-bounces@xxxxxxxxxxx]On Behalf Of Rich Kulp
Sent: Wednesday, June 22, 2005 7:44 PM
To: Discussions people developing code for the Visual Editor project
Subject: Re: [ve-dev] Implementing BoxLayoutPane


Hi Janak,

You would use a EMFPrototype entry in the palette. Take a look at org.eclipse.ve.swt/palette/swtpalette.xmi and look for the string
    ToolItem-Push.xmi

This entry shows how to create a prototype, and then the prototype is in the ToolItem-Push.xmi file in the same directory. Take a look in there.

This create a constructor of the form:

     new ToolItem(parent, org.eclipse.swt.SWT.PUSH)

Ignore and remove the {parentComposite} argument, you don't need it for yours.

Thanks,
Rich


"Janak Mulani" <janak.mulani@xxxxxxxxx>
Sent by: ve-dev-bounces@xxxxxxxxxxx

06/22/2005 04:30 PM

Please respond to
Discussions people developing code for the Visual Editor project

To
"ve-Dev@Eclipse. Org" <ve-dev@xxxxxxxxxxx>
cc
Subject
[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



_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev


Back to the top