Grid in Container [message #204402] |
Fri, 02 December 2005 09:57 |
Eclipse User |
|
|
|
Originally posted by: fangrey.mail.ru
I want add grid to the container. I found
<a href=http://www.eclipsezone.com/eclipse/forums/m91933047.html>this topic</a> and try inherit my figure from LayeredPane and add two layers - GRID_LAYER and PRIMARY_LAYER as in below posted snippet. But after that my print layer contains grid. What way is right for container grid support implementation? Any ideas?
public ContainerFigure() {
setBorder(new ContainerBorder());
ScrollPane scrollpane = new ScrollPane();
pane = new FreeformLayeredPane();
pane.setLayoutManager(new FreeformLayout());
setLayoutManager(new StackLayout());
add(scrollpane);
scrollpane.setViewport(new FreeformViewport());
scrollpane.setContents(pane);
GridLayer grid = new GridLayer();
grid.setSpacing(new Dimension(10, 10));
add(grid, LayerConstants.GRID_LAYER);
add(pane, LayerConstants.PRIMARY_LAYER);
setBackgroundColor(ColorConstants.listBackground);
setOpaque(true);
}
|
|
|
Powered by
FUDForum. Page generated in 0.02964 seconds