Search in sources :

Example 1 with IComposite

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

the class BeanLinkPanelFactory method create.

@Override
public IBeanLinkPanel<Object, Object> create(final Object parentUiReference, final IBeanLinkPanelBluePrint<Object, Object> bluePrint) {
    final ICompositeBluePrint compositeBp = BPF.composite();
    compositeBp.setSetup(bluePrint);
    final IComposite composite = Toolkit.getWidgetFactory().create(parentUiReference, compositeBp);
    return new BeanLinkPanelImpl<Object, Object>(composite, bluePrint);
}
Also used : ICompositeBluePrint(org.jowidgets.api.widgets.blueprint.ICompositeBluePrint) IComposite(org.jowidgets.api.widgets.IComposite)

Example 2 with IComposite

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

the class BeanSelectionFormFactory method create.

@Override
public IBeanSelectionForm create(final Object parentUiReference, final IBeanSelectionFormBluePrint bluePrint) {
    final IBluePrintFactory bpf = Toolkit.getBluePrintFactory();
    final IComposite composite = Toolkit.getWidgetFactory().create(parentUiReference, bpf.composite());
    return new BeanSelectionFormImpl(composite, bluePrint);
}
Also used : IBluePrintFactory(org.jowidgets.api.widgets.blueprint.factory.IBluePrintFactory) IComposite(org.jowidgets.api.widgets.IComposite)

Example 3 with IComposite

use of org.jowidgets.api.widgets.IComposite 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)

Example 4 with IComposite

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

the class BeanFormContentLayouter method layout.

@Override
public void layout(final IContainer container, final IBeanFormControlFactory controlFactory) {
    final Collection<ICustomWidgetCreator<? extends IControl>> buttons = controlFactory.createButtons();
    if (!buttons.isEmpty()) {
        container.setLayout(new MigLayoutDescriptor("0[grow, 0::]0", "0[0::]15[]0"));
        // add the form
        final IContainer formContainer = container.add(BPF.composite(), "growx, w 0::, wrap");
        layoutForm(formContainer, controlFactory);
        // add the button bar
        final IComposite buttonBar = container.add(BPF.composite(), "alignx r");
        buttonBar.setLayout(getButtonBarLayout(buttons));
        for (final ICustomWidgetCreator<? extends IControl> button : buttons) {
            buttonBar.add(button, "sg bg");
        }
    } else {
        layoutForm(container, controlFactory);
    }
}
Also used : IControl(org.jowidgets.api.widgets.IControl) ICustomWidgetCreator(org.jowidgets.common.widgets.factory.ICustomWidgetCreator) IComposite(org.jowidgets.api.widgets.IComposite) IContainer(org.jowidgets.api.widgets.IContainer) MigLayoutDescriptor(org.jowidgets.common.widgets.layout.MigLayoutDescriptor)

Example 5 with IComposite

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

the class BeanGraphSettingsDialog method initializeTabFolder.

private BeanGraphAttributeListImpl initializeTabFolder(final int filterTabIndex) {
    tabFolder = add(BPF.tabFolder().setTabsCloseable(false), MigLayoutFactory.GROWING_CELL_CONSTRAINTS);
    final ITabItem itemGroupFilter = tabFolder.addItem(BPF.tabItem());
    itemGroupFilter.setText("GroupFilter");
    itemGroupFilter.setLayout(MigLayoutFactory.growingInnerCellLayout());
    final IScrollComposite contentGroup = itemGroupFilter.add(BPF.scrollComposite(), MigLayoutFactory.GROWING_CELL_CONSTRAINTS);
    contentGroup.setLayout(MigLayoutFactory.growingInnerCellLayout());
    // final ITabItem itemRelationFilter = tabFolder.addItem(BPF.tabItem());
    // itemRelationFilter.setText("RelationFilter");
    // itemRelationFilter.setLayout(MigLayoutFactory.growingInnerCellLayout());
    // final IScrollComposite contentRelations = itemRelationFilter.add(
    // BPF.scrollComposite(),
    // MigLayoutFactory.GROWING_CELL_CONSTRAINTS);
    // contentRelations.setLayout(MigLayoutFactory.growingInnerCellLayout());
    // beanGraphAttributeListImplRelations = new BeanGraphAttributeListImpl(vis, contentRelations.add(
    // BPF.composite(),
    // "aligny top, growx,  w 0::, h 0::"), edgeVisibilityMap, FilterType.RELATIONS);
    final IComposite content = contentGroup.add(BPF.composite(), "aligny top, growx,  w 0::, h 0::");
    final BeanGraphAttributeListImpl beanGraphAttributeListImplGroup = new BeanGraphAttributeListImpl(vis, content, groupVisibilityMap, FilterType.GROUPS, groupColorMap);
    tabFolder.setSelectedItem((getFilterTabByIndex(filterTabIndex) != null) ? getFilterTabByIndex(filterTabIndex).getIndex() : 0);
    return beanGraphAttributeListImplGroup;
}
Also used : ITabItem(org.jowidgets.api.widgets.ITabItem) IComposite(org.jowidgets.api.widgets.IComposite) IScrollComposite(org.jowidgets.api.widgets.IScrollComposite)

Aggregations

IComposite (org.jowidgets.api.widgets.IComposite)10 IBluePrintFactory (org.jowidgets.api.widgets.blueprint.factory.IBluePrintFactory)3 MigLayoutDescriptor (org.jowidgets.common.widgets.layout.MigLayoutDescriptor)3 IContainer (org.jowidgets.api.widgets.IContainer)2 ICompositeBluePrint (org.jowidgets.api.widgets.blueprint.ICompositeBluePrint)2 ArrayList (java.util.ArrayList)1 IControl (org.jowidgets.api.widgets.IControl)1 IScrollComposite (org.jowidgets.api.widgets.IScrollComposite)1 ITabItem (org.jowidgets.api.widgets.ITabItem)1 IScrollCompositeBluePrint (org.jowidgets.api.widgets.blueprint.IScrollCompositeBluePrint)1 IOperator (org.jowidgets.cap.common.api.filter.IOperator)1 IFilterControl (org.jowidgets.cap.ui.api.filter.IFilterControl)1 BeanFormGroupRendering (org.jowidgets.cap.ui.api.form.BeanFormGroupRendering)1 IBeanFormGroup (org.jowidgets.cap.ui.api.form.IBeanFormGroup)1 IBeanFormProperty (org.jowidgets.cap.ui.api.form.IBeanFormProperty)1 AlignmentVertical (org.jowidgets.common.types.AlignmentVertical)1 Position (org.jowidgets.common.types.Position)1 ICustomWidgetCreator (org.jowidgets.common.widgets.factory.ICustomWidgetCreator)1