In GWT 我需要一个类似于Eclipse View的组合。
观点组合包含其他纵向组合。
first row is a View toolbar with multiple PushButton. User clicks them to execute some action. Toolbar has to be aligned to right side of the view composite.
composites placed in second and subsequent rows are used to display some values. These are to be aligned to left side of the view composite.
With following code snippet i am able to align the toolbar to right and place rest of composites on left
CaptionPanel view = new CaptionPanel("Eclipse like view");
VerticalPanel vPanel = new VerticalPanel();
view.setContentWidget(vPanel);
ViewToolbar toolbar = new ViewToolbar(); // custom composite
vPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
vPanel.add(toolbar);
ViewContent viewContent = new ViewContent(); // custom composite
vPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
vPanel.add(viewContent);
这符合要求。 但我不知道,像这一样,横向协调是否是一个好的想法。
Is there any better way to align some composites to the right side and others to left side of the panel.