/** * Instantiates a new loading chart animation. * * @param chartTexts the chart texts * @param chartResources the chart resources */ @Inject public QueryActiveAnimation(ChartTexts chartTexts, ChartResources chartResources) { mainPanel = new SimplePanel(); loadingImage = new Image(chartResources.loaderLoadingImage()); loadingImage.setAltText(chartTexts.loadingChart()); loadingImage.setTitle(chartTexts.loadingChart()); doneImage = new Image(chartResources.loaderDoneImage()); doneImage.setAltText(chartTexts.loadingChartDone()); doneImage.setTitle(chartTexts.loadingChartDone()); initWidget(mainPanel); setWidth("20px"); setHeight("20px"); setStylePrimaryName("daxplore-QueryActiveAnimation"); setLoading(false); }
private Widget getSetterLabel() { HorizontalPanel horiz = new HorizontalPanel(); if (model.state == ActionCallMethod.TYPE_UNDEFINED) { Image edit = DroolsGuvnorImages.INSTANCE.AddFieldToFact(); edit.setAltText(Constants.INSTANCE.AddAnotherFieldToThisSoYouCanSetItsValue()); edit.setTitle(Constants.INSTANCE.AddAnotherFieldToThisSoYouCanSetItsValue()); edit.addClickHandler( new ClickHandler() { public void onClick(ClickEvent event) { Widget w = (Widget) event.getSource(); showAddFieldPopup(w); } }); horiz.add( new SmallLabel( HumanReadable.getActionDisplayName("call") + " [" + model.variable + "]")); // NON-NLS if (!this.readOnly) { horiz.add(edit); } } else { horiz.add( new SmallLabel( HumanReadable.getActionDisplayName("call") + " [" + model.variable + "." + model.methodName + "]")); // NON-NLS } return horiz; }
private void doLayout() { layout.clear(); for (int i = 0; i < model.getFieldValues().length; i++) { ActionFieldValue val = model.getFieldValues()[i]; layout.setWidget(i, 0, getSetterLabel()); layout.setWidget(i, 1, fieldSelector(val)); layout.setWidget(i, 2, valueEditor(val)); final int idx = i; Image remove = GuidedRuleEditorImages508.INSTANCE.DeleteItemSmall(); remove.addClickHandler( new ClickHandler() { public void onClick(ClickEvent event) { if (Window.confirm(Constants.INSTANCE.RemoveThisItem())) { model.removeField(idx); setModified(true); getModeller().refreshWidget(); // Signal possible change in Template variables TemplateVariablesChangedEvent tvce = new TemplateVariablesChangedEvent(getModeller().getModel()); getEventBus().fireEventFromSource(tvce, getModeller().getModel()); } } }); if (!this.readOnly) { layout.setWidget(i, 3, remove); } } if (model.getFieldValues().length == 0) { HorizontalPanel h = new HorizontalPanel(); h.add(getSetterLabel()); if (!this.readOnly) { Image image = GuidedRuleEditorImages508.INSTANCE.Edit(); image.setAltText(Constants.INSTANCE.AddFirstNewField()); image.setTitle(Constants.INSTANCE.AddFirstNewField()); image.addClickHandler( new ClickHandler() { public void onClick(ClickEvent sender) { showAddFieldPopup(sender); } }); h.add(image); } layout.setWidget(0, 0, h); } // layout.setWidget( 0, 1, inner ); }
private void doActions() { VerticalPanel actions = new VerticalPanel(); Image add = GuvnorImages.INSTANCE.NewItem(); add.setAltText(ConstantsCore.INSTANCE.AssetCategoryEditorAddNewCategory()); add.setTitle(constants.AddANewCategory()); add.addClickHandler( new ClickHandler() { public void onClick(ClickEvent event) { doOKClick(); } }); actions.add(add); layout.setWidget(0, 1, actions); }
protected Widget addRemoveButton(Widget w, ClickHandler listener) { DirtyableHorizontalPane horiz = new DirtyableHorizontalPane(); final Image remove = GuidedRuleEditorImages508.INSTANCE.DeleteItemSmall(); remove.setAltText(Constants.INSTANCE.RemoveThisBlockOfData()); remove.setTitle(Constants.INSTANCE.RemoveThisBlockOfData()); remove.addClickHandler(listener); horiz.setWidth("100%"); w.setWidth("100%"); horiz.add(w); if (!this.readOnly) { horiz.add(remove); } return horiz; }
public Image MoveUp() { Image image = new Image(CommonImages.INSTANCE.shuffleUp()); image.setAltText(CommonConstants.INSTANCE.MoveUp()); return image; }
public Image NewItemBelow() { Image image = new Image(CommonImages.INSTANCE.newItemBelow()); image.setAltText(CommonConstants.INSTANCE.NewItemBelow()); return image; }
public Image DeleteItemSmall() { Image image = new Image(CommonImages.INSTANCE.DeleteItemSmall()); image.setAltText(CommonConstants.INSTANCE.DeleteItem()); return image; }
public Image Edit() { final Image image = new Image(CommonImages.INSTANCE.edit()); image.setAltText(CommonConstants.INSTANCE.Edit()); return image; }
public Image AddFieldToFact() { Image image = new Image(TestScenarioImages.INSTANCE.addFieldToFact()); image.setAltText(TestScenarioConstants.INSTANCE.AddFieldToFact()); return image; }
@Override public void setAltText(String altText) { super.setAltText(altText); if (getTitle() == null || getTitle().isEmpty()) setTitle(altText); }
public Image getIcon() { Image image = new Image(ImageResources.INSTANCE.decisionTable()); image.setAltText(DecisionTableXLSEditorConstants.INSTANCE.DecisionTable()); return image; }
public Image getIcon() { Image image = new Image(DroolsGuvnorImageResources.INSTANCE.modelLarge()); image.setAltText(ConstantsCore.INSTANCE.Model()); return image; }
public Image typeTestScenario() { Image image = new Image(TestScenarioImages.INSTANCE.typeTestScenario()); image.setAltText(TestScenarioConstants.INSTANCE.TestScenario()); return image; }
public Image Wizard() { Image image = new Image(TestScenarioImages.INSTANCE.newWiz()); image.setAltText(TestScenarioConstants.INSTANCE.Wizard()); return image; }
/** @param url of the image */ public void setUrl(String url) { categoryImage.setUrl(StringUtil.formThumbnailName(url, ".")); categoryImage.setAltText(socialDo.getTitle()); categoryImage.setTitle(socialDo.getTitle()); }
public WindowHeader(String title, final PopupPanel callback) { final HorizontalPanel header = new HorizontalPanel(); header.setStyleName("default-window-header"); HTML titleText = new HTML(title); titleText.setStyleName("default-window-title"); Image closeIcon = new Image(Icons.INSTANCE.close()); closeIcon.setAltText("Close"); closeIcon.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent clickEvent) { callback.hide(); } }); Image maximizeIcon = new Image(Icons.INSTANCE.maximize()); maximizeIcon.setAltText("Min/Maximize"); maximizeIcon.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent clickEvent) { int width = origWidth; int height = origHeight; int top = origTop; int left = origLeft; if (origWidth == -1) { origWidth = getOffsetWidth(); origHeight = (int) (origWidth / 1.618) + 50; // TODO: this fails "getOffsetHeight()"; origLeft = getAbsoluteLeft(); origTop = getAbsoluteTop(); width = Window.getClientWidth() - 50; height = Window.getClientHeight() - 50; top = 25; left = 25; } else { origWidth = -1; origHeight = -1; origLeft = -1; origTop = -1; } callback.hide(); callback.setPopupPosition(top, left); callback.setWidth(width + "px"); callback.setHeight(height + "px"); callback.show(); } }); header.add(titleText); header.add(maximizeIcon); header.add(closeIcon); initWidget(header); titleText.getElement().getParentElement().setAttribute("width", "100%"); maximizeIcon.getElement().getParentElement().setAttribute("width", "16px"); maximizeIcon .getElement() .getParentElement() .setAttribute("style", "width:16px;padding-right:5px"); closeIcon.getElement().getParentElement().setAttribute("width", "16px"); closeIcon.getElement().getParentElement().setAttribute("style", "width:16px;padding-right:5px"); }
public Image RuleAsset() { Image image = new Image(TestScenarioImages.INSTANCE.RuleAsset()); image.setAltText(CommonConstants.INSTANCE.RuleAsset()); return image; }