Search in sources :

Example 1 with IScrollCompositeBluePrint

use of org.jowidgets.api.widgets.blueprint.IScrollCompositeBluePrint in project jo-client-platform by jo-source.

the class DefaultSecureControlCreatorImpl method create.

@Override
public IControl create(final ICustomWidgetFactory widgetFactory, final String label, final IImageConstant icon) {
    final IScrollCompositeBluePrint compositeBp = BPF.scrollComposite();
    if (border) {
        compositeBp.setBorder();
    }
    final IComposite composite = widgetFactory.create(compositeBp);
    composite.setLayout(MigLayoutFactory.growingCellLayout());
    final IComposite labelComposite = composite.add(BPF.composite(), "alignx c, aligny c");
    labelComposite.setLayout(new MigLayoutDescriptor("0[grow, 0::]0", "0[grow, 0::][grow, 0::]0"));
    labelComposite.add(BPF.icon(icon), "alignx c, wrap");
    labelComposite.add(BPF.textLabel(label), "alignx c");
    return composite;
}
Also used : IComposite(org.jowidgets.api.widgets.IComposite) IScrollCompositeBluePrint(org.jowidgets.api.widgets.blueprint.IScrollCompositeBluePrint) MigLayoutDescriptor(org.jowidgets.common.widgets.layout.MigLayoutDescriptor)

Aggregations

IComposite (org.jowidgets.api.widgets.IComposite)1 IScrollCompositeBluePrint (org.jowidgets.api.widgets.blueprint.IScrollCompositeBluePrint)1 MigLayoutDescriptor (org.jowidgets.common.widgets.layout.MigLayoutDescriptor)1