本文整理汇总了Java中uk.org.ponder.rsf.components.decorators.UITooltipDecorator类的典型用法代码示例。如果您正苦于以下问题:Java UITooltipDecorator类的具体用法?Java UITooltipDecorator怎么用?Java UITooltipDecorator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UITooltipDecorator类属于uk.org.ponder.rsf.components.decorators包,在下文中一共展示了UITooltipDecorator类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderCommentBlock
import uk.org.ponder.rsf.components.decorators.UITooltipDecorator; //导入依赖的package包/类
/**
* Render the comment block beneath an item if enabled for this item and handle the binding if there is one
*
* @param parent
* @param templateItem
* @param bindings
*/
public static void renderCommentBlock(UIContainer parent, EvalTemplateItem templateItem, String[] bindings) {
// render the item comment if enabled
boolean usesComment = templateItem.getUsesComment() == null ? false : templateItem.getUsesComment();
if (usesComment) {
String commentBinding = null;
if (bindings.length >= 3) {
commentBinding = bindings[2];
}
String commentInit = null;
if (commentBinding == null) commentInit = "";
UIBranchContainer showComment = UIBranchContainer.make(parent, "showComment:");
UIMessage.make(showComment, "itemCommentHeader", "viewitem.comment.desc");
UIMessage commentLink = UIMessage.make(showComment, "itemCommentShow", "comment.show");
commentLink.decorate(new UITooltipDecorator( UIMessage.make("comment.show.tooltip") ));
UIInput.make(showComment, "itemComment", commentBinding, commentInit);
}
}
示例2: emitItem
import uk.org.ponder.rsf.components.decorators.UITooltipDecorator; //导入依赖的package包/类
/**
* @param tofill
* @param templateItem
* @param index
* @param templateItemOTPBinding
* @param templateId
*/
private void emitItem(UIContainer tofill, EvalTemplateItem templateItem, int index, Long templateId, String templateItemOTPBinding ) {
UIBranchContainer radiobranch = UIBranchContainer.make(tofill,
"itemRowBlock:", templateItem.getId().toString()); //$NON-NLS-1$
UIOutput.make(radiobranch, "hidden-item-id", templateItem.getId().toString());
UIOutput.make(radiobranch, "item-block-num", Integer.toString(index));
UIVerbatim.make(radiobranch, "item-block-text", FormattedText.convertFormattedTextToPlaintext(templateItem.getItem().getItemText()));
UIInternalLink removeChildItem = UIInternalLink.make(radiobranch, "child-remove-item",
new ItemViewParameters(RemoveItemProducer.VIEW_ID, (Long)null, templateItem.getId(), templateId) );
removeChildItem.decorate(new UIFreeAttributeDecorator("templateItemId", templateItem.getId().toString()));
removeChildItem.decorate(new UIFreeAttributeDecorator("templateId", templateId.toString()));
removeChildItem.decorate(new UIFreeAttributeDecorator("OTP", templateItemOTPBinding));
removeChildItem.decorate(new UITooltipDecorator(UIMessage.make("modifytemplate.item.delete")));
UIInternalLink.make(radiobranch, "child-ungroup-item", UIMessage.make("modifytemplate.group.ungroup"),
new ItemViewParameters(RemoveItemProducer.VIEW_ID, (Long)null, templateItem.getId(), templateId) );
}
示例3: fillEntryIcon
import uk.org.ponder.rsf.components.decorators.UITooltipDecorator; //导入依赖的package包/类
private void fillEntryIcon(UIBranchContainer entrydiv, String imgUrl, String altKey, String titleKey, Boolean draft) {
UILink ul = UILink.make(entrydiv, "blog-visibility", imgUrl);
ul.decorate(new UIAlternativeTextDecorator(UIMessage.make(altKey)));
ul.decorate(new UITooltipDecorator(UIMessage.make(titleKey)));
if (draft) {
UIMessage.make(entrydiv, "blog-draft", "blogwow.blogview.draft");
} else {
UIOutput.make(entrydiv, "blog-draft", " ");
}
}
示例4: renderReponseRateColumn
import uk.org.ponder.rsf.components.decorators.UITooltipDecorator; //导入依赖的package包/类
/**
* Renders the response rate column (since the logic is complex)
*
* @param container the branch container (must contain the following elements):
* responseRateDisplay (output)
* responseRateLink (link)
* @param evaluationId the id of the evaluation
* @param responsesNeeded responses needed before results can be viewed (0 indicates they can be viewed now),
* normally should be the output from EvalBeanUtils.getResponsesNeededToViewForResponseRate(responsesCount, enrollmentsCount)
* @param responseString the string representing the response rate output
* @param allowedViewResponders if true, this user can view the responders listing,
* normally only if user have view responders permission or is admin user
* @param allowedEmailStudents if true, this user can send emails to evaluators,
* normally only if EvalSettings.INSTRUCTOR_ALLOWED_EMAIL_STUDENTS is true or is admin/owner of eval
*
* Sample html (from summary.html):
<tr rsf:id="evalResponsesList:">
...
<td nowrap="nowrap">
<a rsf:id="responseRateLink" href="evaluation_responders.html">2 of 39</a>
<span rsf:id="responseRateDisplay"></span>
</td>
</tr>
*
*/
public static void renderReponseRateColumn(UIBranchContainer container, Long evaluationId,
int responsesNeeded, String responseString, boolean allowedViewResponders, boolean allowedEmailStudents) {
if (container == null) { throw new IllegalArgumentException("container must be set"); }
if (evaluationId == null) { throw new IllegalArgumentException("evaluationId must be set"); }
if (responseString == null || "".equals(responseString)) { throw new IllegalArgumentException("responseString must be set"); }
/* Responses column:
* - if min responses reached and user have view responders permission: link to the responders view
* - else if INSTRUCTOR_ALLOWED_EMAIL_STUDENTS: link to notifications (send emails) view
* - else no options enabled and not admin ONLY show the text of the responses info (and tooltip if min responses not reached)
*/
boolean showRespondersLink = (responsesNeeded == 0 && allowedViewResponders);
UIComponent responseRateCompoenent;
if (allowedEmailStudents || showRespondersLink) {
ViewParameters viewparams;
if (showRespondersLink) {
viewparams = new EvalViewParameters( EvaluationRespondersProducer.VIEW_ID, evaluationId );
} else if (allowedEmailStudents) {
viewparams = new EvalViewParameters( EvaluationNotificationsProducer.VIEW_ID, evaluationId );
} else {
throw new RuntimeException("Bad logic in renderReponseRateColumn: should not be possible to reach this");
}
responseRateCompoenent = UIInternalLink.make(container, "responseRateLink",
UIMessage.make("controlevaluations.eval.responses.inline", new Object[] { responseString }),
viewparams );
} else {
responseRateCompoenent = UIMessage.make(container, "responseRateDisplay", "controlevaluations.eval.responses.inline",
new Object[] { responseString } );
}
if (responsesNeeded > 0) {
// show if responses are still needed
responseRateCompoenent.decorate(new UITooltipDecorator(
UIMessage.make("controlevaluations.eval.report.awaiting.responses", new Object[] { responsesNeeded }) ));
}
}
示例5: disableLink
import uk.org.ponder.rsf.components.decorators.UITooltipDecorator; //导入依赖的package包/类
private static void disableLink(UIComponent link, MessageLocator messageLocator) {
link.decorate(new UIFreeAttributeDecorator("onclick", "return false"));
link.decorate(new UIDisabledDecorator());
link.decorate(new UIStyleDecorator("disabled"));
link.decorate(new UIFreeAttributeDecorator("style", "color:#999 !important"));
link.decorate(new UITooltipDecorator(messageLocator.getMessage("simplepage.complete_required")));
}
示例6: createStandardToolBarLink
import uk.org.ponder.rsf.components.decorators.UITooltipDecorator; //导入依赖的package包/类
private void createStandardToolBarLink(String viewID, UIContainer tofill, String ID, String message, SimpleViewParameters params, String tooltip) {
params.viewID = viewID;
if (message != null)
message = messageLocator.getMessage(message);
UILink link = UIInternalLink.make(tofill, ID, message , params);
link.decorate(new UITooltipDecorator(messageLocator.getMessage(tooltip)));
}
示例7: addStatusImage
import uk.org.ponder.rsf.components.decorators.UITooltipDecorator; //导入依赖的package包/类
private void addStatusImage(Status status, UIContainer container, String imageId, String name) {
String imagePath = "/lessonbuilder-tool/images/";
String imageAlt = "";
// better not to include alt or title. Bundle them with the link. Avoids
// complexity for screen reader
if (status == Status.COMPLETED) {
imagePath += "checkmark.png";
imageAlt = ""; // messageLocator.getMessage("simplepage.status.completed")
// + " " + name;
} else if (status == Status.DISABLED) {
imagePath += "unavailable.png";
imageAlt = ""; // messageLocator.getMessage("simplepage.status.disabled")
// + " " + name;
} else if (status == Status.FAILED) {
imagePath += "failed.png";
imageAlt = ""; // messageLocator.getMessage("simplepage.status.failed")
// + " " + name;
} else if (status == Status.REQUIRED) {
imagePath += "available.png";
imageAlt = ""; // messageLocator.getMessage("simplepage.status.required")
// + " " + name;
} else if (status == Status.NEEDSGRADING) {
imagePath += "blue-question.png";
imageAlt = ""; // messageLocator.getMessage("simplepage.status.required")
// + " " + name;
} else if (status == Status.NOT_REQUIRED) {
imagePath += "not-required.png";
// it's a blank image, no need for screen readers to say anything
imageAlt = ""; // messageLocator.getMessage("simplepage.status.notrequired");
}
UIOutput.make(container, "status-td");
UIOutput.make(container, imageId).decorate(new UIFreeAttributeDecorator("src", imagePath))
.decorate(new UIFreeAttributeDecorator("alt", imageAlt)).decorate(new UITooltipDecorator(imageAlt));
}
示例8: fullyDecorate
import uk.org.ponder.rsf.components.decorators.UITooltipDecorator; //导入依赖的package包/类
private UIComponent fullyDecorate(UIComponent todecorate, UIBoundString text) {
return todecorate.decorate(
new UIAlternativeTextDecorator(text)).decorate(new UITooltipDecorator(text));
}
示例9: fakeDisableLink
import uk.org.ponder.rsf.components.decorators.UITooltipDecorator; //导入依赖的package包/类
private static void fakeDisableLink(UIComponent link, MessageLocator messageLocator) {
link.decorate(new UIFreeAttributeDecorator("style", "color:#999 !important"));
link.decorate(new UITooltipDecorator(messageLocator.getMessage("simplepage.complete_required")));
}