Search in sources :

Example 1 with ITableLayoutBuilder

use of org.jowidgets.api.layout.tablelayout.ITableLayoutBuilder in project jo-client-platform by jo-source.

the class BeanGraphAttributeListImpl method buildAttributeList.

public void buildAttributeList(final Map<String, Boolean> filterMap, final FilterType type) {
    final ITableLayoutBuilder builder = Toolkit.getLayoutFactoryProvider().tableLayoutBuilder();
    builder.columnCount(2);
    builder.gap(15);
    builder.verticalGap(4);
    builder.alignment(1, Alignment.CENTER);
    builder.fixedColumnWidth(0, 200);
    builder.fixedColumnWidth(1, 50);
    this.attributeLayoutManager = builder.build();
    attributeLayoutManager.beginLayout();
    this.setLayout(new MigLayoutDescriptor("hidemode 2", "[grow, 0::]", "[grow,0::]0[grow,0::]"));
    final IBluePrintFactory bpf = Toolkit.getBluePrintFactory();
    new AttributeHeaderComposite(add(bpf.composite(), "grow, wrap"));
    initializeGroups(this, filterMap, bpf, type);
    attributeLayoutManager.endLayout();
    attributeLayoutManager.validate();
    final Dimension prefSize = super.getPreferredSize();
    setPreferredSize(new Dimension(prefSize.getWidth(), prefSize.getHeight()));
}
Also used : ITableLayoutBuilder(org.jowidgets.api.layout.tablelayout.ITableLayoutBuilder) IBluePrintFactory(org.jowidgets.api.widgets.blueprint.factory.IBluePrintFactory) Dimension(org.jowidgets.common.types.Dimension) MigLayoutDescriptor(org.jowidgets.common.widgets.layout.MigLayoutDescriptor)

Aggregations

ITableLayoutBuilder (org.jowidgets.api.layout.tablelayout.ITableLayoutBuilder)1 IBluePrintFactory (org.jowidgets.api.widgets.blueprint.factory.IBluePrintFactory)1 Dimension (org.jowidgets.common.types.Dimension)1 MigLayoutDescriptor (org.jowidgets.common.widgets.layout.MigLayoutDescriptor)1