use of org.jowidgets.api.widgets.blueprint.factory.IBluePrintFactory 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);
}
use of org.jowidgets.api.widgets.blueprint.factory.IBluePrintFactory in project jo-client-platform by jo-source.
the class AttributeFilterDialogBluePrintFactory method createDialogBluePrint.
static IInputDialogBluePrint<IUiConfigurableFilter<? extends Object>> createDialogBluePrint(final IBeanTableModel<?> model, final int columnIndex, final IExecutionContext executionContext, final IFilterType filterType) {
final IBluePrintFactory bpf = Toolkit.getBluePrintFactory();
final ICapApiBluePrintFactory capBpf = CapUiToolkit.bluePrintFactory();
final IInputContentCreator<IUiConfigurableFilter<? extends Object>> contentCreator = new IInputContentCreator<IUiConfigurableFilter<? extends Object>>() {
private IAttributeFilterControl filterControl;
@Override
public void setValue(final IUiConfigurableFilter<? extends Object> value) {
filterControl.setValue(value);
}
@Override
public IUiConfigurableFilter<? extends Object> getValue() {
return filterControl.getValue();
}
@Override
public void createContent(final IInputContentContainer container) {
container.setLayout(new MigLayoutDescriptor("[][grow, 0::]", "10[]0"));
final IAttribute<?> attribute = model.getAttribute(columnIndex);
container.add(Toolkit.getBluePrintFactory().textLabel(attribute.getCurrentLabel()).setMarkup(Markup.STRONG));
filterControl = container.add(capBpf.attributeFilterControl(model.getAttributes()), "growx, w 0::");
if (filterType != null) {
filterControl.setAttribute(attribute, filterType);
}
}
};
final IInputDialogBluePrint<IUiConfigurableFilter<? extends Object>> dialogBp = bpf.inputDialog(contentCreator);
dialogBp.setExecutionContext(executionContext);
dialogBp.setMissingInputHint(Messages.getString("AttributeFilterDialogBluePrintFactory.please_edit_the_filter"));
dialogBp.setMinPackSize(new Dimension(600, 170));
dialogBp.setMaxPackSize(new Dimension(1024, 400));
return dialogBp;
}
use of org.jowidgets.api.widgets.blueprint.factory.IBluePrintFactory in project jo-client-platform by jo-source.
the class AttributeFilterControlImpl method comboBoxNotBp.
private static IComboBoxSelectionBluePrint<Boolean> comboBoxNotBp() {
final IBluePrintFactory bpf = Toolkit.getBluePrintFactory();
final IObjectStringConverter<Boolean> converter = new IObjectStringConverter<Boolean>() {
@Override
public String convertToString(final Boolean bool) {
if (bool) {
return NOT.get();
} else {
return "";
}
}
@Override
public String getDescription(final Boolean bool) {
if (bool) {
return NOT.get();
} else {
return "";
}
}
};
final IComboBoxSelectionBluePrint<Boolean> result = bpf.comboBoxSelection(converter);
result.autoCompletionOff().autoSelectionOn().setElements(Boolean.FALSE, Boolean.TRUE);
return result;
}
use of org.jowidgets.api.widgets.blueprint.factory.IBluePrintFactory 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()));
}
use of org.jowidgets.api.widgets.blueprint.factory.IBluePrintFactory in project jo-client-platform by jo-source.
the class AttributeFilterControlFactory method create.
@Override
public IAttributeFilterControl create(final Object parentUiReference, final IAttributeFilterControlBluePrint bluePrint) {
final IBluePrintFactory bpf = Toolkit.getBluePrintFactory();
final IComposite composite = Toolkit.getWidgetFactory().create(parentUiReference, bpf.composite());
return new AttributeFilterControlImpl(composite, bluePrint);
}
Aggregations