Questions about Logic Editor Example in GEF [message #20281] |
Tue, 24 September 2002 11:28  |
Eclipse User |
|
|
|
Hi,
I have the following questions in Logic Editor Example:
1. The LED component has popup menu commands ("Increment", "Decremenet"),
can you tell me where in the code adds those command to the LED component?
The OR, XOR,... gate does NOT have those commands.
2. Where in the code draws the line for the Connection? If I want to change
the line style (e.g. make it a dash line, or an arrow line), where should I
look?
3. If I put components (e.g. XOR gate, OR gate) om Flow Container, it layout
in a flow layout. Can I change it so that it keeps the co-ordinates (the
ones tha user draw)?
Thank you for your help.
Sam
|
|
|
Re: Questions about Logic Editor Example in GEF [message #20299 is a reply to message #20281] |
Tue, 24 September 2002 13:07   |
Eclipse User |
|
|
|
Originally posted by: hudsonr.us.eye-bee-em.com
"Sam Cheung" <scheung@novarra.com> wrote in message
news:ampv7u$3e2$1@rogue.oti.com...
> Hi,
>
> I have the following questions in Logic Editor Example:
> 1. The LED component has popup menu commands ("Increment", "Decremenet"),
> can you tell me where in the code adds those command to the LED component?
> The OR, XOR,... gate does NOT have those commands.
The LogicContextMenuProvider is adding these to the menu.
>
> 2. Where in the code draws the line for the Connection? If I want to
change
> the line style (e.g. make it a dash line, or an arrow line), where should
I
> look?
WireEditPart.createFigure()
>
> 3. If I put components (e.g. XOR gate, OR gate) om Flow Container, it
layout
> in a flow layout. Can I change it so that it keeps the co-ordinates (the
> ones tha user draw)?
Not in the example.
>
> Thank you for your help.
> Sam
>
>
|
|
|
|
Re: Questions about Logic Editor Example in GEF [message #20335 is a reply to message #20299] |
Tue, 24 September 2002 17:39   |
Eclipse User |
|
|
|
And who can I support "Drag-and-Drop" components? In current example, I need
to click on the palette menu to select the components, and I click again on
the diagram to draw it. How can I change the example to do drag-and-drop? I
drag a component and when I drop it, it will place the component on the
location of where I release the mouse.
p.s. I am trying to learn the GEF by understanding /changing the logic
editor example. Thanks for any help.
"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:amq50p$6s8$1@rogue.oti.com...
>
> "Sam Cheung" <scheung@novarra.com> wrote in message
> news:ampv7u$3e2$1@rogue.oti.com...
> > Hi,
> >
> > I have the following questions in Logic Editor Example:
> > 1. The LED component has popup menu commands ("Increment",
"Decremenet"),
> > can you tell me where in the code adds those command to the LED
component?
> > The OR, XOR,... gate does NOT have those commands.
>
> The LogicContextMenuProvider is adding these to the menu.
>
> >
> > 2. Where in the code draws the line for the Connection? If I want to
> change
> > the line style (e.g. make it a dash line, or an arrow line), where
should
> I
> > look?
>
> WireEditPart.createFigure()
> >
> > 3. If I put components (e.g. XOR gate, OR gate) om Flow Container, it
> layout
> > in a flow layout. Can I change it so that it keeps the co-ordinates (the
> > ones tha user draw)?
>
> Not in the example.
>
> >
> > Thank you for your help.
> > Sam
> >
> >
>
>
|
|
|
|
Re: Questions about Logic Editor Example in GEF [message #20365 is a reply to message #20325] |
Tue, 24 September 2002 18:59  |
Eclipse User |
|
|
|
Originally posted by: hudsonr.us.eye-bee-em.com
> But the LogicFlowContainer is a subclass of LogicDiagram, and logicDiagram
> keeps the co-ordinate of each components in the diagram, could you please
> tell me why the Flow Container does not?
This is an example. We have a "flow" container not because it makes sense,
but to demonstrate the FlowLayout and the EditPolicy for it. Ignore the
details of the model ;-)
|
|
|
Powered by
FUDForum. Page generated in 0.03955 seconds