|
Re: [Zest/Draw2d] Custom figure button event [message #247297 is a reply to message #247248] |
Fri, 13 February 2009 16:53 |
Eclipse User |
|
|
|
Originally posted by: irbull.cs.uvic.ca
It is likely a layout issue. Can you force the size of the StepFigures
to be really big.
Can you post a snippet showing the problem?
cheers,
ian
Bianca wrote:
> Hello everybody,
>
> I have a Zest graph to which a custom figure can be added. The simplest
> graph looks like this:
>
> --------------
> | Step 2 | + | <- StepFigure extends IFigure
> --------------
> | Document | <- DocumentFigure extends IFigure
> --------------
> ^
> |
> |
> --------------
> | Step 1 | + | <- StepFigure extends IFigure
> --------------
> <- DocumentFigures aren't displayed...
>
> Via the plus button document figures can be added to the step figure.
> This works perfectly - but only for the last step figure added to the
> graph (in this case Step 2). A document figure can be added to any other
> step figure (here Step 1) but it isn't displayed. I've tried calling
> revalidate and repaint on the step figure in question but that didn't
> help. Does anybody know what I'll have to do to force Step 1 to display
> the document figures added?
>
> Kind regards,
> Bianca
|
|
|
|
Re: [Zest/Draw2d] Custom figure button event [message #247453 is a reply to message #247312] |
Fri, 20 February 2009 15:41 |
Bianca Thelen Messages: 26 Registered: July 2009 |
Junior Member |
|
|
>> It is likely a layout issue.
I've had some more time to debug and found the following.
AbstractLayout#getPreferredSize returns the preferredSize of the figure
to which other figures can be added with no problem. So when I set the
preferredSize to null while debugging this code was run:
Thread [main] (Suspended (breakpoint at line 164 in ToolbarLayout))
ToolbarLayout.calculatePreferredSize(IFigure, int, int) line: 164
ToolbarLayout(AbstractLayout).getPreferredSize(IFigure, int, int) line: 96
ToolbarLayout(AbstractHintLayout).getPreferredSize(IFigure, int, int)
line: 87
StepContainerFigure(Figure).getPreferredSize(int, int) line: 735
FreeformLayout(XYLayout).layout(IFigure) line: 103
Figure$LayoutNotifier.layout(IFigure) line: 1812
ZestRootLayer(Figure).layout() line: 1029
ZestRootLayer(Figure).validate() line: 1739
ScalableFreeformLayeredPane(Figure).validate() line: 1741
FreeformViewport$FreeformViewportLayout.calculatePreferredSi ze(IFigure,
int, int) line: 28
FreeformViewport$FreeformViewportLayout(AbstractLayout).getP referredSize(IFigure,
int, int) line: 93
FreeformViewport$FreeformViewportLayout(AbstractHintLayout). getPreferredSize(IFigure,
int, int) line: 85
FreeformViewport(Figure).getPreferredSize(int, int) line: 735
ScrollPaneSolver.solve(Rectangle, Viewport, int, int, int, int) line: 75
Graph(FigureCanvas).layoutViewport() line: 297
FigureCanvas.access$4(FigureCanvas) line: 295
FigureCanvas$3.notifyValidating() line: 260
DeferredUpdateManager(UpdateManager).fireValidating() line: 123
DeferredUpdateManager.performValidation() line: 203
DeferredUpdateManager.performUpdate() line: 179
DeferredUpdateManager$UpdateRequest.run() line: 48
RunnableLock.run() line: 35
Synchronizer.runAsyncMessages(boolean) line: 133
Display.runAsyncMessages(boolean) line: 3800
Display.readAndDispatch() line: 3425
GraphTest.main(String[]) line: 85
The thing that differs now from the other figure that does resize when a
figure is added to it is this code. But I have no idea where that might
be triggered...
Thread [main] (Suspended (breakpoint at line 164 in ToolbarLayout))
ToolbarLayout.calculatePreferredSize(IFigure, int, int) line: 164
ToolbarLayout(AbstractLayout).getPreferredSize(IFigure, int, int) line: 96
ToolbarLayout(AbstractHintLayout).getPreferredSize(IFigure, int, int)
line: 87
StepContainerFigure(Figure).getPreferredSize(int, int) line: 735
FreeformLayout(XYLayout).layout(IFigure) line: 103
Figure$LayoutNotifier.layout(IFigure) line: 1812
ZestRootLayer(Figure).layout() line: 1029
ZestRootLayer(Figure).validate() line: 1739
ScalableFreeformLayeredPane(Figure).validate() line: 1741
FreeformViewport(Figure).validate() line: 1741
FreeformViewport(Viewport).validate() line: 363
LightweightSystem$RootFigure(Figure).validate() line: 1741
DeferredUpdateManager.performValidation() line: 207
DeferredUpdateManager.performUpdate() line: 179
DeferredUpdateManager$UpdateRequest.run() line: 48
RunnableLock.run() line: 35
Synchronizer.runAsyncMessages(boolean) line: 133
Display.runAsyncMessages(boolean) line: 3800
Display.readAndDispatch() line: 3425
GraphTest.main(String[]) line: 85
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02179 seconds