|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjet.controls.JetProperty
jet.controls.JetString
jet.controls.JetImgProperty
public class JetImgProperty
JetImgProperty, for saving/retrieving an Image: loaded from file("Image(file name)" following) or Object directly("Image(Embed)"following).
Notice:
1) It doesn't have default value
2) It does used to saving/retrieving an Image(file name) by default
3) In JReport, Image(file name) is the resource based Catalog, so the file is based on Catalog's path.
| Field Summary |
|---|
| Fields inherited from interface jet.util.Propertiable |
|---|
BIGSTRING, BOOLEAN, CHG_FMTTINGBLNAME, CHG_FMTTINGFORMULA, CHG_OTHER, COLOR, CUSTOMER, CUSTOMERLINK, DELIM, DOUBLE, ENUMERATION, IGNORED, IMAGE, IMGVECTOR, MAPPINGTBL, NUMBER, REFERENCE, STRING, UNIT, VAL_NORMALLENGTH, VAL_NORMALSTART, VECTOR |
| Constructor Summary | |
|---|---|
JetImgProperty()
|
|
JetImgProperty(jet.controls.JetObject parent,
java.lang.String name)
Create JetImgProperty instance |
|
| Method Summary | |
|---|---|
void |
clearEmbed()
|
ImageResource |
getEmbedImageResource()
|
byte[] |
getGifBytes()
Deprecated. |
javax.swing.ImageIcon |
getImageIcon(java.lang.String currentPath)
Deprecated. |
ImageResource |
getImageResourceByID(java.lang.String resourceId)
|
ImageResource |
getImageResourceByPath(java.lang.String resourcePath)
|
int |
getImageType()
Deprecated. if "EMBED" return the image type of ImageResource, else return MediaType.UNKNOWN |
java.lang.String |
getInspValue()
ONLY For Designer UI If this used to save/retrieve an Image(file name) return the file name else return empty-string(Before V9.1) or the file name that called before #setEmbedImage(Image). |
java.lang.String |
getLocalPath()
Deprecated. |
java.lang.Object |
getObject()
Deprecated. |
java.lang.String |
getPath()
If path doesn't set, will return the report resource path,and try to set "catFullName" as catalog full file name |
java.lang.Object |
getResource()
Deprecated. |
java.lang.Object |
getResource(java.lang.String depPath)
Deprecated. |
int |
getResourceID()
Deprecated. |
java.lang.String |
getURL()
Deprecated. |
boolean |
isEmbed()
Had this been set to saving/retrieving an Image(Embed)? |
void |
set(java.lang.String str)
Sets value and call setURL(null) |
void |
setEmbedImage(ImageResource ir)
Changes to saving/retrieving an Image(Embed) or not. Notice: must call #setEmbedImageType(int) before/after it. |
void |
setLocalPath(java.lang.String path)
Deprecated. |
void |
setObject(java.lang.Object value)
Sets normal value |
void |
setResourceID(int id)
Deprecated. |
void |
setURL(java.lang.String url)
Deprecated. |
java.lang.String |
toString()
If this is set saving/retrieving Image(file name), return image file name directly. else return the String constructed by the byte array encoded by Base64 on the byte array encoded from Image(Embed) with imageType |
| Methods inherited from class jet.controls.JetString |
|---|
get, getMatchingSqlType, getPropertyChoice, set, setPropertyChoice |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jet.util.ImagePropertiable |
|---|
get |
| Methods inherited from interface jet.util.Propertiable |
|---|
getChangeByBL, getChangeByFmtt, getNormalObject, getPropType, getRuntimeChangeBy, getUnifiedObject, isChagneByFmtt, isChangeByBL, isChangeByOther, isSetRuntimeChgBy, loadFullChangeBy, saveFullChangeBy, setChangeByBL, setChangeByFmtt, setChangeByObject, setRuntimeChangeBy |
| Methods inherited from interface jet.convert.StringInfo |
|---|
get |
| Methods inherited from interface jet.convert.PropInfo |
|---|
getChangeByObjectName, getName, getValue, isChangeByOther, isNull, toUnitString |
| Constructor Detail |
|---|
public JetImgProperty()
public JetImgProperty(jet.controls.JetObject parent,
java.lang.String name)
parent - ownername - name| Method Detail |
|---|
public void set(java.lang.String str)
setURL(null)
set in interface jet.util.Propertiableset in class JetStringstr - the String value, null means default valuesetValue(String)public void setEmbedImage(ImageResource ir)
#setEmbedImageType(int) before/after it.
embedImage - if null change to saving/retrieving an Image(file name) else an Image(Embed)imageType - the meidaType must one of MediaType.JPG,MediaType.PNG,MediaType.BITMAP,MediaType.GIFMediaTypepublic void clearEmbed()
public boolean isEmbed()
public java.lang.String getInspValue()
#setEmbedImage(Image).
getInspValue in interface jet.convert.PropInfogetInspValue in class JetPropertypublic java.lang.String toString()
toString in interface jet.convert.PropInfotoString in class JetStringsetValue(String),
#imageToByte(Image, int),
#isImageEmbed()public void setObject(java.lang.Object value)
JetProperty
setObject in interface jet.util.PropertiablesetObject in class JetPropertypublic ImageResource getImageResourceByID(java.lang.String resourceId)
public ImageResource getImageResourceByPath(java.lang.String resourcePath)
public ImageResource getEmbedImageResource()
public int getResourceID()
getResourceID in interface jet.controls.JetResourceablegetResourceID in interface jet.convert.ImgInfopublic void setResourceID(int id)
setResourceID in interface jet.controls.JetResourceablejava.lang.UnsupportedOperationExceptionpublic java.lang.String getLocalPath()
getLocalPath in interface jet.controls.JetResourceablegetLocalPath in interface jet.convert.ImgInfojava.lang.UnsupportedOperationExceptionpublic void setLocalPath(java.lang.String path)
setLocalPath in interface jet.controls.JetResourceablejava.lang.UnsupportedOperationExceptionpublic java.lang.String getURL()
getURL in interface jet.controls.JetResourceablegetURL in interface jet.convert.ImgInfojava.lang.UnsupportedOperationExceptionpublic void setURL(java.lang.String url)
JetResourceable
setURL in interface jet.controls.JetResourceablejava.lang.UnsupportedOperationExceptionpublic java.lang.String getPath()
getPath in interface jet.convert.ImgInfojava.lang.UnsupportedOperationExceptionpublic java.lang.Object getResource(java.lang.String depPath)
getResource in interface jet.convert.ImgInfodepPath - the based path
java.lang.UnsupportedOperationExceptionpublic java.lang.Object getResource()
getResource in interface jet.controls.JetResourceablegetResource in interface jet.convert.ImgInfogetObject(),
getResource(String)
public byte[] getGifBytes()
throws java.io.IOException
getGifBytes in interface jet.convert.ImgInfojava.io.IOExceptionImageEncoder.renderImageToGif(Image)public java.lang.Object getObject()
getObject in interface jet.convert.ImgInfogetObject in interface jet.util.PropertiablegetObject in class JetPropertyJetProperty.isChangeByOther()
public javax.swing.ImageIcon getImageIcon(java.lang.String currentPath)
throws java.io.IOException
ImageIcon via ImageResource(EMBED) and return, else return null
java.io.IOExceptionpublic int getImageType()
MediaType.UNKNOWN
MediaType,
ImageResource#getImageType()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||