本文整理汇总了Java中org.kuali.rice.krad.uif.widget.Tooltip类的典型用法代码示例。如果您正苦于以下问题:Java Tooltip类的具体用法?Java Tooltip怎么用?Java Tooltip使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Tooltip类属于org.kuali.rice.krad.uif.widget包,在下文中一共展示了Tooltip类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderTooltip
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* Render a KRAD tooltip component.
*
* <p>
* This method originated as template.ftl, and supercedes the previous content of that template.
* </p>
*
* @param component The component to render a tooltip for.
* @param out The output writer to render to, typically from {@link Environment#getOut()}.
* @throws IOException If rendering is interrupted due to an I/O error.
*/
public static void renderTooltip(Component component, Writer out) throws IOException {
Tooltip tt = component.getToolTip();
String script = "";
if (tt != null && StringUtils.hasText(tt.getTooltipContent())) {
String templateOptionsJSString = tt.getTemplateOptionsJSString();
script += "createTooltip('"
+ component.getId()
+ "', '"
+ tt.getTooltipContent()
+ "', "
+ (templateOptionsJSString == null ? "''" : templateOptionsJSString)
+ ", "
+ tt.isOnMouseHover()
+ ", "
+ tt.isOnFocus()
+ ");";
renderScript(script, component, null, out);
}
}
示例2: addChildExpressions
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* Add expressions to the expression map for nested components of specific types
*
* @param components the child components
* @param expressionMap the map to add expressions to
* @return the map with child component expressions added
*/
protected Map<String, String> addChildExpressions(Collection<? extends LifecycleElement> components,
Map<String, String> expressionMap) {
for (LifecycleElement comp : components) {
if (comp != null && (comp instanceof Action
|| comp instanceof Image
|| comp instanceof Message
|| comp instanceof Link
|| comp instanceof Inquiry
|| comp instanceof Group
|| comp instanceof Tooltip
|| comp instanceof InputField
|| comp instanceof CheckboxControl
|| comp instanceof TextControl
|| comp instanceof SelectControl)) {
expressionMap = buildExpressionMap((Component) comp, expressionMap);
}
}
return expressionMap;
}
示例3: addChildExpressions
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* Add expressions to the expression map for nested components of specific types
*
* @param components the child components
* @param expressionMap the map to add expressions to
* @return the map with child component expressions added
*/
protected Map<String, String> addChildExpressions(List<? extends Component> components,
Map<String, String> expressionMap) {
for (Component comp : components) {
if (comp != null && (comp instanceof Action
|| comp instanceof Image
|| comp instanceof Message
|| comp instanceof Link
|| comp instanceof Inquiry
|| comp instanceof Group
|| comp instanceof Tooltip
|| comp instanceof InputField
|| comp instanceof CheckboxControl
|| comp instanceof TextControl
|| comp instanceof SelectControl)) {
expressionMap = buildExpressionMap(comp, expressionMap);
}
}
return expressionMap;
}
示例4: testCleanContextDeap
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* Test {@link ContextUtils#cleanContextDeep} using a BreadcrumbItem object
*/
@Test
public void testCleanContextDeap() {
Map<String, Object> context = new HashMap<String, Object>();
context.put("contextkey", "value");
context.put("contextkey2", "value2");
BreadcrumbItem breadcrumbItem = new BreadcrumbItem();
breadcrumbItem.setContext(context);
InputField inputField = new InputFieldBase();
inputField.setContext(context);
Label fieldLabel = new Label();
fieldLabel.setContext(context);
Tooltip labelTootlip = new Tooltip();
labelTootlip.setContext(context);
fieldLabel.setToolTip(labelTootlip);
inputField.setFieldLabel(fieldLabel);
breadcrumbItem.setSiblingBreadcrumbComponent(inputField);
Tooltip tooltip = new Tooltip();
tooltip.setContext(context);
breadcrumbItem.setToolTip(tooltip);
ContextUtils.cleanContextDeep(breadcrumbItem);
assertEquals(0, breadcrumbItem.getContext().size());
assertEquals(0, inputField.getContext().size());
assertEquals(0, fieldLabel.getContext().size());
assertEquals(0, labelTootlip.getContext().size());
assertEquals(0, tooltip.getContext().size());
}
示例5: setTooltipOfComponent
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setTooltipOfComponent(Tooltip tooltip) {
getFieldLabel().setToolTip(tooltip);
}
示例6: setTooltipOfComponent
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setTooltipOfComponent(Tooltip tooltip) {
getHeader().setToolTip(tooltip);
}
示例7: getToolTip
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
@BeanTagAttribute(type = BeanTagAttribute.AttributeType.DIRECTORBYTYPE)
public Tooltip getToolTip() {
return toolTip;
}
示例8: setToolTip
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setToolTip(Tooltip toolTip) {
checkMutable(true);
this.toolTip = toolTip;
}
示例9: setTooltipOfComponent
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* For data fields the help tooltip is placed on the label.
*
* @see org.kuali.rice.krad.uif.widget.Helpable#setTooltipOfComponent(org.kuali.rice.krad.uif.widget.Tooltip))
*/
@Override
@BeanTagAttribute(name = "tooltipOfComponent", type = BeanTagAttribute.AttributeType.SINGLEBEAN)
public void setTooltipOfComponent(Tooltip tooltip) {
getFieldLabel().setToolTip(tooltip);
}
示例10: getToolTip
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* @see org.kuali.rice.krad.uif.component.Component#getToolTip()
*/
@BeanTagAttribute(name = "toolTip", type = BeanTagAttribute.AttributeType.SINGLEBEAN)
public Tooltip getToolTip() {
return toolTip;
}
示例11: setToolTip
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* @see org.kuali.rice.krad.uif.component.Component#setToolTip(Tooltip)
*/
public void setToolTip(Tooltip toolTip) {
this.toolTip = toolTip;
}
示例12: getToolTip
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* The Tooltip widget that renders a tooltip with additional information about the element on
* specified trigger event
*
* @return Tooltip
*/
Tooltip getToolTip();
示例13: setToolTip
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* Setter for the component tooltip widget instance
*
* @param toolTip
*/
void setToolTip(Tooltip toolTip);
示例14: setTooltipOfComponent
import org.kuali.rice.krad.uif.widget.Tooltip; //导入依赖的package包/类
/**
* For containers the help tooltip is placed on the header.
*
* @see org.kuali.rice.krad.uif.widget.Helpable#setTooltipOfComponent(org.kuali.rice.krad.uif.widget.Tooltip)
*/
@Override
public void setTooltipOfComponent(Tooltip tooltip) {
getHeader().setToolTip(tooltip);
}