jet.controls
Class JetImgProperty

java.lang.Object
  extended by jet.controls.JetProperty
      extended by jet.controls.JetString
          extended by jet.controls.JetImgProperty

public class JetImgProperty
extends JetString

Image property, for saving/retriving a Image file name value.


Field Summary
 
Fields inherited from class jet.controls.JetProperty
CHART_BACKGROUND_EDITOR, CHART_FILLPATTERN_EDITOR, CHART_FILTER_EDITOR, CHART_FILTER_EDITOR_NO_DATE, CHART_ICON_STYLE, CHART_PATTERN_LIST_EDITOR, CHART_PENSTYLE_EDITOR, CHART_TEXTSTYLE_EDITOR, CHOICE_EDITOR, COLOR_EDITOR, COMBO_EDITOR, COMMAND_EDITOR, CONTROL_SELECT_ITEMS, DATASOURCE_EDITOR, DBCOL_EDITOR, DETAIL_REPORT_EDITOR, EDIT_FORBIDDEN, EDIT_FORBIDDEN_INIT, EDITABLE_ALLTIME, INTERNAL, LINK_EDITOR, MULSEL_EDITOR, PARAMCOL_EDITOR, QUERY_EDITOR, RECORDDB_EDITOR, SECURITY_EDITOR, TEXT_EDITOR
 
Constructor Summary
JetImgProperty()
           
JetImgProperty(JetObject parent, java.lang.String name)
          Constructor.
 
Method Summary
static java.lang.String createRelativePath(java.lang.String catalogPath, java.lang.String imgSource)
           
 java.lang.String getFilePath(java.lang.String currentPath)
           
static java.lang.String getFilePath(java.lang.String currentPath, java.lang.String imgSourcePath)
           
 byte[] getGifBytes()
          Converte the java.awt.Image value to a GIF format bype array.
 javax.swing.ImageIcon getImageIcon(java.lang.String currentPath)
           
 int getImageType()
           
 java.lang.String getInspValue()
           
 java.lang.String getLocalPath()
          Get the local path of the resource.
 java.lang.Object getObject()
          Get the java.awt.Image value.
 java.lang.String getPath()
          Get the path of the resource.
 java.lang.Object getResource()
          Get the resource instance.
 java.lang.Object getResource(java.lang.String depPath)
          Get the resource instance with dependent path.
 int getResourceID()
          Return the resource ID in the resource file.
static java.lang.String getRootPath(java.lang.String currentPath)
           
 java.lang.String getURL()
          Get the URL string of the resource.
static byte[] imageToByte(java.awt.Image image)
           
static byte[] imageToByte(java.awt.Image image, int toByteType)
           
 boolean isImageEmbed()
           
 void set(java.lang.String str)
          Sets the value to this property via a String.
 void setEmbedImage(java.awt.Image embedImage)
           
 void setEmbedImageType(int type)
           
 void setImage(java.lang.String name, java.awt.Image img)
          Set the Image value.
 void setLocalPath(java.lang.String path)
          Set the local path of the resource.
 void setPath(java.lang.String path)
          Set the path of the resource.
 void setResourceID(int id)
          Set the resource ID in the resource file.
 void setURL(java.lang.String url)
          Set the URL string of the resource.
 java.lang.String toString()
          Returns the value as a String.
 
Methods inherited from class jet.controls.JetString
get, getMatchingSqlType, getPropertyChoice, set, setPropertyChoice
 
Methods inherited from class jet.controls.JetProperty
canChangeByBL, canChangeByFmtt, canChangeByOthers, getChangeBy, getChangeByBL, getChangeByBLName, getChangeByFmtt, getChangeByFmttName, getChangeByObject, getChangeByObjectName, getEditFlag, getEditorType, getInspValue, getName, getNormalObject, getParent, getPropType, getUnifiedObject, getValue, isChagneByFmtt, isChangeByBL, isChangeByOther, isNull, isTransient, loadFullChangeBy, propertyChanged, saveFullChangeBy, setCanChangeByBL, setCanChangeByFmtt, setCanChangeByOthers, setChangeByBL, setChangeByFmtt, setChangeByObject, setEditFlag, setEditorType, setObject, setTransient, setUnitValue, toUnitString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JetImgProperty

public JetImgProperty()

JetImgProperty

public JetImgProperty(JetObject parent,
                      java.lang.String name)
Constructor.

Parameters:
parent - the owner of the property.
name - the property name
Method Detail

getResourceID

public int getResourceID()
Return the resource ID in the resource file.


setResourceID

public void setResourceID(int id)
Set the resource ID in the resource file.


getLocalPath

public java.lang.String getLocalPath()
Get the local path of the resource.


setLocalPath

public void setLocalPath(java.lang.String path)
Set the local path of the resource.


getURL

public java.lang.String getURL()
Get the URL string of the resource.


setURL

public void setURL(java.lang.String url)
Set the URL string of the resource.


set

public void set(java.lang.String str)
Description copied from class: JetString
Sets the value to this property via a String.

Overrides:
set in class JetString
Parameters:
str - the String value

setPath

public void setPath(java.lang.String path)
Set the path of the resource. For getObject() use it.


getPath

public java.lang.String getPath()
Get the path of the resource.


setEmbedImage

public void setEmbedImage(java.awt.Image embedImage)

setEmbedImageType

public void setEmbedImageType(int type)

isImageEmbed

public boolean isImageEmbed()

getResource

public java.lang.Object getResource(java.lang.String depPath)
Get the resource instance with dependent path.


getImageType

public int getImageType()

getResource

public java.lang.Object getResource()
Get the resource instance.


getObject

public java.lang.Object getObject()
Get the java.awt.Image value.

Overrides:
getObject in class JetProperty

getGifBytes

public byte[] getGifBytes()
                   throws java.io.IOException
Converte the java.awt.Image value to a GIF format bype array.

Throws:
java.io.IOException

setImage

public void setImage(java.lang.String name,
                     java.awt.Image img)
Set the Image value.

Parameters:
name - the name of the image.
img - the Image value.

getImageIcon

public javax.swing.ImageIcon getImageIcon(java.lang.String currentPath)
                                   throws java.net.MalformedURLException,
                                          java.io.IOException
Parameters:
currentPath - the default folder path such as "D:\Demo\Reports\"
Throws:
java.net.MalformedURLException
java.io.IOException

getFilePath

public java.lang.String getFilePath(java.lang.String currentPath)
Parameters:
currentPath - the default folder path such as "D:\Demo\Reports\"

getFilePath

public static java.lang.String getFilePath(java.lang.String currentPath,
                                           java.lang.String imgSourcePath)
Parameters:
currentPath -
imageSourcePath -

createRelativePath

public static java.lang.String createRelativePath(java.lang.String catalogPath,
                                                  java.lang.String imgSource)

getRootPath

public static java.lang.String getRootPath(java.lang.String currentPath)

imageToByte

public static byte[] imageToByte(java.awt.Image image,
                                 int toByteType)

imageToByte

public static byte[] imageToByte(java.awt.Image image)

getInspValue

public java.lang.String getInspValue()
Overrides:
getInspValue in class JetProperty

toString

public java.lang.String toString()
Description copied from class: JetString
Returns the value as a String.

Overrides:
toString in class JetString