use of com.google.gwt.user.client.ui.Image in project perun by CESNET.
the class UserExtSourceDetailTabItem method draw.
public Widget draw() {
this.titleWidget.setText(Utils.getStrippedStringWithEllipsis(userExtSource.getLogin().trim()));
// MAIN TAB PANEL
VerticalPanel vp = new VerticalPanel();
vp.setSize("100%", "100%");
// The table
AbsolutePanel dp = new AbsolutePanel();
//dp.setStyleName("decoration");
final FlexTable menu = new FlexTable();
menu.setCellSpacing(5);
menu.setWidget(0, 0, new Image(LargeIcons.INSTANCE.worldIcon()));
Label memberName = new Label();
memberName.setText(Utils.getStrippedStringWithEllipsis(userExtSource.getLogin(), 40));
memberName.setStyleName("now-managing");
memberName.setTitle(userExtSource.getLogin());
menu.setWidget(0, 1, memberName);
int column = 2;
menu.setHTML(0, column, " ");
menu.getFlexCellFormatter().setWidth(0, column, "25px");
column++;
if (JsonUtils.isExtendedInfoVisible()) {
menu.setHTML(0, column, "<strong>UES ID:</strong><br/><span class=\"inputFormInlineComment\">" + userExtSource.getId() + "</span>");
column++;
menu.setHTML(0, column, " ");
menu.getFlexCellFormatter().setWidth(0, column, "25px");
column++;
menu.setHTML(0, column, "<strong>ES name:</strong><br/><span class=\"inputFormInlineComment\">" + userExtSource.getExtSource().getName() + "</span>");
column++;
menu.setHTML(0, column, " ");
menu.getFlexCellFormatter().setWidth(0, column, "25px");
column++;
menu.setHTML(0, column, "<strong>ES type:</strong><br/><span class=\"inputFormInlineComment\">" + userExtSource.getExtSource().getType() + "</span>");
}
dp.add(menu);
vp.add(dp);
vp.setCellHeight(dp, "30px");
tabPanel.clear();
tabPanel.add(new UserExtSourceSettingsTabItem(userExtSource), "Settings");
// Resize must be called after page fully displays
Scheduler.get().scheduleDeferred(new Command() {
@Override
public void execute() {
tabPanel.finishAdding();
}
});
vp.add(tabPanel);
this.contentWidget.setWidget(vp);
return getWidget();
}
use of com.google.gwt.user.client.ui.Image in project drools-wb by kiegroup.
the class ActionValueEditor method wrap.
// Wrap a Constraint Value Editor with an icon to remove the type
private Widget wrap(Widget w) {
HorizontalPanel wrapper = new HorizontalPanel();
Image clear = GuidedRuleEditorImages508.INSTANCE.DeleteItemSmall();
clear.setAltText(GuidedRuleEditorResources.CONSTANTS.RemoveActionValueDefinition());
clear.setTitle(GuidedRuleEditorResources.CONSTANTS.RemoveActionValueDefinition());
clear.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
// Reset Constraint's value and value type
if (Window.confirm(GuidedRuleEditorResources.CONSTANTS.RemoveActionValueDefinitionQuestion())) {
value.setNature(FieldNatureType.TYPE_UNDEFINED);
value.setValue(null);
doTypeChosen();
}
}
});
wrapper.add(w);
if (!this.readOnly) {
wrapper.add(clear);
wrapper.setCellVerticalAlignment(clear, HasVerticalAlignment.ALIGN_MIDDLE);
}
return wrapper;
}
use of com.google.gwt.user.client.ui.Image in project drools-wb by kiegroup.
the class CEPOperatorsDropdown method getOperatorExtension.
// Additional widget for CEP operator parameters
private Widget getOperatorExtension() {
container.setStylePrimaryName(GuidedRuleEditorResources.INSTANCE.css().container());
btnAddCEPOperators = new Image(GuidedRuleEditorResources.INSTANCE.images().clock());
btnAddCEPOperators.setVisible(parameterSets.size() > 0);
btnAddCEPOperators.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
visibleParameterSet++;
if (visibleParameterSet == parameterSets.size()) {
visibleParameterSet = 0;
}
hop.setParameter(VISIBLE_PARAMETER_SET, Integer.toString(visibleParameterSet));
displayParameters();
}
});
container.add(btnAddCEPOperators);
for (int i = 0; i < this.parameters.length; i++) {
container.add(parameters[i]);
}
return container;
}
use of com.google.gwt.user.client.ui.Image in project drools-wb by kiegroup.
the class ConstraintValueEditor method returnValueEditor.
/**
* An editor for the retval "formula" (expression).
*/
private Widget returnValueEditor() {
TextBox box = new BoundTextBox(constraint);
if (this.readOnly) {
return new SmallLabel(box.getText());
}
String msg = GuidedRuleEditorResources.CONSTANTS.FormulaEvaluateToAValue();
Image img = new Image(GuidedRuleEditorResources.INSTANCE.images().functionAssets());
img.setTitle(msg);
box.setTitle(msg);
box.addValueChangeHandler(new ValueChangeHandler<String>() {
public void onValueChange(final ValueChangeEvent event) {
executeOnValueChangeCommand();
}
});
Widget ed = widgets(img, box);
return ed;
}
use of com.google.gwt.user.client.ui.Image in project drools-wb by kiegroup.
the class RuleModeller method getAddAttribute.
private Widget getAddAttribute() {
Image add = GuidedRuleEditorImages508.INSTANCE.NewItem();
add.setTitle(GuidedRuleEditorResources.CONSTANTS.AddAnOptionToTheRuleToModifyItsBehaviorWhenEvaluatedOrExecuted());
add.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
showAttributeSelector();
}
});
return add;
}
Aggregations