|
|
Re: Examples for Polyline/PolylineDecoration [message #6389 is a reply to message #6370] |
Fri, 31 May 2002 11:38 |
Eclipse User |
|
|
|
Originally posted by: g.wagenknecht.intershop.de
Hi!
"Alex Selkov" <as@empproject.com> schrieb im Newsbeitrag
news:ad7le2$330$1@rogue.oti.com...
> Looks strange that you want to rotate decorations. Can you explain what
you
> try to achieve?
First of all I'm looking for a quick guide on howto work with polylines. I
want to draw customized figures which are more complicated than the provided
once. In a second step, I want to rotate these figures in 90
|
|
|
|
Polylines ignored by FLowLayout? [message #6423 is a reply to message #6407] |
Fri, 31 May 2002 12:39 |
Eclipse User |
|
|
|
Originally posted by: g.wagenknecht.intershop.de
Hi!
Thanks for your information. I tried a poor sample but it's not working the
way I thought it would be. Look at the following source. I have a figure
with FlowLayout and add 2 polylines to it but the polylines aren't arranged
in FlowLayout. Both polylines are pushed into the first flow element. Any
ideas why?
-----------------------------------------
public static void main(String args[])
{
Shell shell = new Shell();
shell.open();
shell.setText("draw2d Figures");
LightweightSystem lws = new LightweightSystem(shell);
IFigure panel = new Figure();
panel.setLayoutManager( new FlowLayout(FlowLayout.HORIZONTAL) );
lws.setContents(panel);
Polyline polyline = new Polyline();
polyline.setStart(new Point( 5, 5));
polyline.addPoint(new Point( 5, 45));
polyline.addPoint(new Point( 45, 45));
polyline.addPoint(new Point( 45, 5));
panel.add(polyline);
Polyline polyline2 = new Polyline();
polyline2.setStart(new Point( 5, 5));
polyline2.addPoint(new Point( 45, 45));
panel.add(polyline2);
Display display = Display.getDefault();
while( !shell.isDisposed() )
{
if( !display.readAndDispatch() )
display.sleep();
}
}
-----------------------------------------
Cu, Gunnar
|
|
|
Re: Examples for Polyline/PolylineDecoration [message #6518 is a reply to message #6389] |
Thu, 30 May 2002 23:26 |
Eclipse User |
|
|
|
Originally posted by: none.ibm.com
It sounds like you want a more general purpose Figure in which you can
define a Path (like in Java2D), and then a transformation.
PolygonDecoration is not meant for this, although it might work if you
re-implement primTranslate().
What are you trying to do? Maybe try using Graphics.drawPolyline(PointList)
from your own Figure class. Or create a class that manages mulitple
templates, a polyline/gon for each, and a transformation.
"Gunnar Wagenknecht" <g.wagenknecht@intershop.de> wrote in message
news:ad7mdq$3fi$1@rogue.oti.com...
> Hi!
>
> "Alex Selkov" <as@empproject.com> schrieb im Newsbeitrag
> news:ad7le2$330$1@rogue.oti.com...
>
> > Looks strange that you want to rotate decorations. Can you explain what
> you
> > try to achieve?
>
> First of all I'm looking for a quick guide on howto work with polylines. I
> want to draw customized figures which are more complicated than the
provided
> once. In a second step, I want to rotate these figures in 90
|
|
|
Re: Examples for Polyline/PolylineDecoration [message #6647 is a reply to message #6518] |
Sat, 01 June 2002 07:11 |
Eclipse User |
|
|
|
Originally posted by: g.wagenknecht.planet-wagenknecht.de
Hi!
"Randy Hudson" <none@ibm.com> schrieb im Newsbeitrag
news:ad832o$ah9$1@rogue.oti.com...
> It sounds like you want a more general purpose Figure in which you can
> define a Path (like in Java2D), and then a transformation.
I'm not sure, because this is a totaly new area for me. I haven't written
any Java2D code, yet. I started evaluating GEF and draw2d and now I want to
draw figures, which are just more than a rectangle or a ellipse. But later
these figures should be used in the GEF so the should be sizeable and
rotatable. I thought I could use Polylines to build these figures.
Cu, Gunnar
|
|
|
Re: Examples for Polyline/PolylineDecoration [message #6664 is a reply to message #6647] |
Sat, 01 June 2002 22:29 |
Eclipse User |
|
|
|
Originally posted by: none.ibm.com
> "Randy Hudson" <none@ibm.com> schrieb im Newsbeitrag
> news:ad832o$ah9$1@rogue.oti.com...
> > It sounds like you want a more general purpose Figure in which you can
> > define a Path (like in Java2D), and then a transformation.
>
> I'm not sure, because this is a totaly new area for me. I haven't written
> any Java2D code, yet. I started evaluating GEF and draw2d and now I want
to
> draw figures, which are just more than a rectangle or a ellipse. But later
> these figures should be used in the GEF so the should be sizeable and
> rotatable. I thought I could use Polylines to build these figures.
It's a good point. You could probably fix our polygon is a subclass.
Notice that I didn't close your bug. We will look at supporting this, but
right now we are in code freeze just like Eclpise is.
> Cu, Gunnar
|
|
|
Re: Examples for Polyline/PolylineDecoration [message #6869 is a reply to message #6664] |
Sun, 02 June 2002 17:28 |
Eclipse User |
|
|
|
Originally posted by: g.wagenknecht.planet-wagenknecht.de
Hi!
"Randy Hudson" <none@ibm.com> schrieb im Newsbeitrag
news:adbgur$gs1$1@rogue.oti.com...
> It's a good point. You could probably fix our polygon is a subclass.
You mean draw2d Polygon class has the same limits? I didn't try with this
class yet, but I will have a look at it next.
> Notice that I didn't close your bug. We will look at supporting this, but
> right now we are in code freeze just like Eclpise is.
Yes, but is there already a branch in CVS for 2.1 development? BTW, CVS
trees for GEF are still empty. I would like to see GEF/draw2d source in
Eclipse CVS.
Cu, Gunnar
|
|
|
|
Re: Examples for Polyline/PolylineDecoration [message #7781 is a reply to message #7719] |
Wed, 05 June 2002 12:44 |
Eclipse User |
|
|
|
Originally posted by: none.ibm.com
> Now I want to add several types of arrows, diamond shapes, multiplicty
> indications (e.g. a \'*\' label) on both ends of the connection.
> Is this what PolyLineDecoration is for, and how is it used?
Yes
> I also noticed that routers can be \"chained\". In fact, if you call
> route(),
> it first looks for a next() router and first claas route on the next
> router in the chain. As far as I can remember from the Decorator pattern
> in GoF book, this type of chaining is related to Decorator.
The purpose of chaining routers is so that the first router can handle
conditions not avoided by the "next" router. For example, the next router
just applies manual bendpoints. But, the first router handles cases like 2
connections overlapping in exactly the same place, in which case it adds
*automatic* bends into the connection so the 2 overlapping connections can
be distinguished.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03533 seconds