com.sybase.uep.bobclient.controls.celltable.configs
Class CellImageConfig

java.lang.Object
  extended by com.sybase.uep.bobclient.controls.celltable.configs.AbstractCellAttributeConfig
      extended by com.sybase.uep.bobclient.controls.celltable.configs.CellImageConfig

public class CellImageConfig
extends AbstractCellAttributeConfig

Configuration of a cell image

Author:
congchen

Constructor Summary
CellImageConfig()
           
 
Method Summary
 void addValueImageMapping(java.lang.String value, java.lang.String imageName)
          Adds a pair of MBO attribute value and the mapping image file
 java.lang.String getDefaultValueMappingImageName()
          Gets the default value mapping image file name
 java.lang.String getImageName()
          Gets full image file name of the image (eg.
 int getImageType()
          Gets the image type.
 java.lang.String getMboAttrId()
          Gets the mobile business object attribute id that the image is bind to
 java.lang.String getNewImageName()
          Gets the name of image file that indicates 'new' state of a MBO
 java.lang.String getPendingImageName()
          Gets the name of image file that indicates pending state of a MBO
 java.util.Hashtable getValueImageMapping()
          Gets the pairs of MBO attribute value and the mapping image file
 ControlVariable getVariable()
          Gets variable that is set to the image, the variable is supposed to reference to a real image
 boolean isPreserveAspectRatio()
          Gets if preserve aspect ratio.
 void setDefaultValueMappingImageName(java.lang.String defaultValueMappingImageName)
          Sets the default value mapping image file name
 void setImageName(java.lang.String imageName)
          Sets full image file name to the image
 void setImageType(int imageType)
          Sets the image type.
 void setMboAttrId(java.lang.String mboAttrId)
          Sets mobile business object attribute id to the image
 void setNewImageName(java.lang.String newImageName)
          Sets the name of image file that indicates 'new' state of a MBO
 void setPendingImageName(java.lang.String pendingImageName)
          Sets the name of image file that indicates 'pending' state of a MBO
 void setPreserveAspectRatio(boolean isPreserveAspectRatio)
          Sets if preserve aspect ratio
 void setValueImageMapping(java.util.Hashtable valueImageMapping)
          Sets the pairs of MBO attribute value and the mapping image file
 void setVariable(ControlVariable variable)
          Sets a variable to the image, the variable is supposed to reference to a real image
 
Methods inherited from class com.sybase.uep.bobclient.controls.celltable.configs.AbstractCellAttributeConfig
getColSpan, getFocusFontStyle, getHAlignment, getOrder, getRowSpan, getUnfocusFontStyle, getVAlignment, setColSpan, setFocusFontStyle, setHAlignment, setOrder, setRowSpan, setUnfocusFontStyle, setVAlignment
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellImageConfig

public CellImageConfig()
Method Detail

getImageName

public java.lang.String getImageName()
Gets full image file name of the image (eg. image.png)

Returns:
the full image file name

setImageName

public void setImageName(java.lang.String imageName)
Sets full image file name to the image

Parameters:
imageName -

getPendingImageName

public java.lang.String getPendingImageName()
Gets the name of image file that indicates pending state of a MBO

Returns:
- String

setPendingImageName

public void setPendingImageName(java.lang.String pendingImageName)
Sets the name of image file that indicates 'pending' state of a MBO

Parameters:
pendingImageName - - image file name

getNewImageName

public java.lang.String getNewImageName()
Gets the name of image file that indicates 'new' state of a MBO

Returns:
String

setNewImageName

public void setNewImageName(java.lang.String newImageName)
Sets the name of image file that indicates 'new' state of a MBO

Parameters:
newImageName - - image file name

getMboAttrId

public java.lang.String getMboAttrId()
Gets the mobile business object attribute id that the image is bind to

Returns:
the mobile business object attribute id

setMboAttrId

public void setMboAttrId(java.lang.String mboAttrId)
Sets mobile business object attribute id to the image

Parameters:
mboAttrId - - mobile business object attribute id

getVariable

public ControlVariable getVariable()
Gets variable that is set to the image, the variable is supposed to reference to a real image

Returns:
Variable

setVariable

public void setVariable(ControlVariable variable)
Sets a variable to the image, the variable is supposed to reference to a real image

Parameters:
variable - - ControlVariable

getImageType

public int getImageType()
Gets the image type. The value is one constant of the ICellAttributeTypeContants.

Returns:
the image type. eg.ICellAttributeTypeContants.MBO_ATTRIBUTE_TYPE

setImageType

public void setImageType(int imageType)
Sets the image type.

Parameters:
imageType - - one constant of ICellAttributeTypeContants. eg.ICellAttributeTypeContants.MBO_ATTRIBUTE_TYPE

isPreserveAspectRatio

public boolean isPreserveAspectRatio()
Gets if preserve aspect ratio.

Returns:
boolean

setPreserveAspectRatio

public void setPreserveAspectRatio(boolean isPreserveAspectRatio)
Sets if preserve aspect ratio

Parameters:
isPreserveAspectRatio - - true means keep the original width and height ratio when scaling image

getDefaultValueMappingImageName

public java.lang.String getDefaultValueMappingImageName()
Gets the default value mapping image file name

Returns:
String

setDefaultValueMappingImageName

public void setDefaultValueMappingImageName(java.lang.String defaultValueMappingImageName)
Sets the default value mapping image file name

Parameters:
defaultValueMappingImageName - - image file name with file extension

getValueImageMapping

public java.util.Hashtable getValueImageMapping()
Gets the pairs of MBO attribute value and the mapping image file

Returns:
Hashtable - key is MBO attribute value of type String, value is mapping file name

setValueImageMapping

public void setValueImageMapping(java.util.Hashtable valueImageMapping)
Sets the pairs of MBO attribute value and the mapping image file

Parameters:
valueImageMapping - - a Hashtable, key is MBO attribute value of type String, value is mapping file name

addValueImageMapping

public void addValueImageMapping(java.lang.String value,
                                 java.lang.String imageName)
Adds a pair of MBO attribute value and the mapping image file

Parameters:
value - - MBO attribute value
imageName - - image file name with file extension