本文整理汇总了Java中org.kuali.rice.krad.uif.element.Image类的典型用法代码示例。如果您正苦于以下问题:Java Image类的具体用法?Java Image怎么用?Java Image使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Image类属于org.kuali.rice.krad.uif.element包,在下文中一共展示了Image类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addChildExpressions
import org.kuali.rice.krad.uif.element.Image; //导入依赖的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;
}
示例2: addChildExpressions
import org.kuali.rice.krad.uif.element.Image; //导入依赖的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;
}
示例3: getSimpleFieldValue
import org.kuali.rice.krad.uif.element.Image; //导入依赖的package包/类
/**
* Attempts to extract a string value out of the field passed in, varies depending on field type
*
* <p>If the field is a dataField, it will use its propertyName to retrieve a value, otherwise it will try to
* retrieve textual content out of various component types. If the field is a FieldGroup, only the first
* component's determined value will be used. This function is used for sorting.</p>
*
* @param model the current model
* @param field the field to get a value from
* @return the field's String value, false if it cant be determined
*/
public static String getSimpleFieldValue(Object model, Field field) {
if (field == null) {
return null;
}
String value = null;
// check for what type of field this is
if (field instanceof DataField) {
String propertyPath = ((DataField) field).getBindingInfo().getBindingPath();
Object valueObject = null;
if (field.isHidden()) {
return "";
}
// check if readable
if (ObjectPropertyUtils.isReadableProperty(model, propertyPath)) {
valueObject = ObjectPropertyUtils.getPropertyValueAsText(model, propertyPath);
}
// use object's string value
if (valueObject != null && !((DataField) field).isApplyMask()) {
value = valueObject.toString();
} else if (valueObject != null && ((DataField) field).isApplyMask()) {
value = ((DataField) field).getMaskFormatter().maskValue(valueObject);
}
} else if (field instanceof ActionField) {
value = ((ActionField) field).getActionLabel();
// use image alt text if any
if (StringUtils.isBlank(value) && ((ActionField) field).getActionImage() != null) {
value = ((ActionField) field).getActionImage().getAltText();
}
} else if (field instanceof LinkField) {
value = ((LinkField) field).getLinkText();
} else if (field instanceof ImageField) {
value = ((ImageField) field).getAltText();
} else if (field instanceof MessageField && ((MessageField) field).getMessage() != null) {
value = ((MessageField) field).getMessage().getMessageText();
} else if (field instanceof SpaceField) {
value = "";
} else if (field instanceof FieldGroup
&& ((FieldGroup) field).getGroup() != null
&& ((FieldGroup) field).getGroup().getItems() != null
&& !((FieldGroup) field).getGroup().getItems().isEmpty()) {
// using first components type for assumed value
Component firstComponent = ((FieldGroup) field).getGroup().getItems().get(0);
// check first component type to extract value
if (firstComponent != null && firstComponent instanceof Field) {
value = getSimpleFieldValue(model, (Field) firstComponent);
} else if (firstComponent instanceof Action && StringUtils.isNotBlank(
((Action) firstComponent).getActionLabel())) {
value = ((Action) firstComponent).getActionLabel();
} else if (firstComponent instanceof Action && ((Action) firstComponent).getActionImage() != null) {
value = ((Action) firstComponent).getActionImage().getAltText();
} else if (firstComponent instanceof Link) {
value = ((Link) firstComponent).getLinkText();
} else if (firstComponent instanceof Image) {
value = ((Image) firstComponent).getAltText();
} else if (firstComponent instanceof org.kuali.rice.krad.uif.element.Message) {
value = ((org.kuali.rice.krad.uif.element.Message) firstComponent).getMessageText();
} else {
value = null;
}
}
return value;
}
示例4: getActionImage
import org.kuali.rice.krad.uif.element.Image; //导入依赖的package包/类
/**
* @see org.kuali.rice.krad.uif.element.Action#getActionImage()
*/
@BeanTagAttribute(name = "actionImage", type = BeanTagAttribute.AttributeType.SINGLEBEAN)
public Image getActionImage() {
return action.getActionImage();
}
示例5: setActionImage
import org.kuali.rice.krad.uif.element.Image; //导入依赖的package包/类
/**
* @see org.kuali.rice.krad.uif.element.Action#setActionImage(org.kuali.rice.krad.uif.element.Image)
*/
public void setActionImage(Image actionImage) {
action.setActionImage(actionImage);
}
示例6: getSimpleFieldValue
import org.kuali.rice.krad.uif.element.Image; //导入依赖的package包/类
/**
* Attempts to extract a string value out of the field passed in, varies depending on field type
*
* <p>If the field is a dataField, it will use its propertyName to retrieve a value, otherwise it will try to
* retrieve textual content out of various component types. If the field is a FieldGroup, only the first
* component's determined value will be used. This function is used for sorting.</p>
*
* @param model the current model
* @param field the field to get a value from
* @return the field's String value, false if it cant be determined
*/
public static String getSimpleFieldValue(Object model, Field field) {
if (field == null) {
return null;
}
String value = null;
// check for what type of field this is
if (field instanceof DataField) {
String propertyPath = ((DataField) field).getBindingInfo().getBindingPath();
Object valueObject = null;
// check if readable
if (ObjectPropertyUtils.isReadableProperty(model, propertyPath)){
valueObject = ObjectPropertyUtils.getPropertyValue(model, propertyPath);
}
// use object's string value
if (valueObject != null) {
value = valueObject.toString();
}
} else if (field instanceof ActionField) {
value = ((ActionField) field).getActionLabel();
// use image alt text if any
if (StringUtils.isBlank(value) && ((ActionField) field).getActionImage() != null) {
value = ((ActionField) field).getActionImage().getAltText();
}
} else if (field instanceof LinkField) {
value = ((LinkField) field).getLinkText();
} else if (field instanceof ImageField) {
value = ((ImageField) field).getAltText();
} else if (field instanceof MessageField && ((MessageField) field).getMessage() != null) {
value = ((MessageField) field).getMessage().getMessageText();
} else if (field instanceof SpaceField) {
value = "";
} else if (field instanceof FieldGroup
&& ((FieldGroup) field).getGroup() != null
&& ((FieldGroup) field).getGroup().getItems() != null
&& !((FieldGroup) field).getGroup().getItems().isEmpty()) {
// using first components type for assumed value
Component firstComponent = ((FieldGroup) field).getGroup().getItems().get(0);
// check first component type to extract value
if (firstComponent != null && firstComponent instanceof Field) {
value = getSimpleFieldValue(model, field);
} else if (firstComponent instanceof Action
&& StringUtils.isNotBlank(((Action) firstComponent).getActionLabel())) {
value = ((Action) firstComponent).getActionLabel();
} else if (firstComponent instanceof Action
&& ((Action) firstComponent).getActionImage() != null) {
value = ((Action) firstComponent).getActionImage().getAltText();
} else if (firstComponent instanceof Link) {
value = ((Link) firstComponent).getLinkText();
} else if (firstComponent instanceof Image) {
value = ((Image) firstComponent).getAltText();
} else if (firstComponent instanceof Message) {
value = ((Message) firstComponent).getText();
} else {
value = null;
}
}
return value;
}
示例7: getActionImage
import org.kuali.rice.krad.uif.element.Image; //导入依赖的package包/类
/**
* Delegates {@code actionImage} property reference to the action.
*
* @return action image
* @see org.kuali.rice.krad.uif.element.Action#getActionImage()
*/
@ViewLifecycleRestriction
@BeanTagAttribute
public Image getActionImage() {
return action.getActionImage();
}
示例8: setActionImage
import org.kuali.rice.krad.uif.element.Image; //导入依赖的package包/类
/**
* Delegates {@code actionImage} property reference to the action.
*
* @param actionImage action image
* @see org.kuali.rice.krad.uif.element.Action#setActionImage(org.kuali.rice.krad.uif.element.Image)
*/
public void setActionImage(Image actionImage) {
action.setActionImage(actionImage);
}
示例9: getImage
import org.kuali.rice.krad.uif.element.Image; //导入依赖的package包/类
/**
* Retrieves the {@link Image} element wrapped by this field
*
* @return the Image element representing the HTML IMG element
*/
@BeanTagAttribute(type= BeanTagAttribute.AttributeType.DIRECTORBYTYPE)
public Image getImage() {
return image;
}
示例10: setImage
import org.kuali.rice.krad.uif.element.Image; //导入依赖的package包/类
/**
* Sets the Image to be wrapped by this field
*
* @param image the Image element to be wrapped by this field
*/
public void setImage(Image image) {
this.image = image;
}
示例11: getImage
import org.kuali.rice.krad.uif.element.Image; //导入依赖的package包/类
/**
* Gets the image component
*
* @return image field
*/
public static Image getImage() {
return (Image) getNewComponentInstance(IMAGE);
}
示例12: getImage
import org.kuali.rice.krad.uif.element.Image; //导入依赖的package包/类
/**
* Retrieves the {@link Image} element wrapped by this field
*
* @return the Image element representing the HTML IMG element
*/
@BeanTagAttribute(name="image",type= BeanTagAttribute.AttributeType.SINGLEBEAN)
public Image getImage() {
return image;
}