com.cc.framework.ui.model.imp
Class ImageModelImp

java.lang.Object
  extended bycom.cc.framework.ui.model.imp.ImageModelImp
All Implemented Interfaces:
ImageModel, java.io.Serializable, WebResourceAccess

public class ImageModelImp
extends java.lang.Object
implements ImageModel, java.io.Serializable

Designmodel for images.

Since:
1.0
Version:
$Revision: 1.17 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  java.lang.String alternate
          The alternate text for this image
private  java.lang.String base
          The base directory for all the images
private  int height
          The height of the image
private static long serialVersionUID
          Serial Version UID
private  java.lang.String source
          The source URL of the image
private  java.lang.String style
          Html-Style
private  java.lang.String styleClass
          Style Class -> HTML class Attribut
private  java.lang.String styleId
          Style ID
private  java.lang.String tooltip
          Tooltip Text
private  int width
          The width of the image
 
Constructor Summary
ImageModelImp()
          Constructor for ImageModelImp
ImageModelImp(ImageModel other)
          Copy Constructor for ImageModelImp
ImageModelImp(java.lang.String source)
          Constructor for ImageModelImp
ImageModelImp(java.lang.String source, int width, int height)
          Constructor for ImageModelImp
 
Method Summary
 java.lang.String getAlternate()
          Returns the text to display if the image can't be displayed.
 java.lang.String getBase()
          Gets the Base Directory for the Resource
 int getHeight()
          Returns the height of the image
 java.lang.String getSource()
          Returns the URL of the image to be displayed
 java.lang.String getStyle()
          Returns the Style
 java.lang.String getStyleClass()
          Returns the StyleClass
 java.lang.String getStyleId()
          returns the StyleId
 java.lang.String getTooltip()
          Returns a tooltip text for this image
 int getWidth()
          Returns the width of the image
 void setAlternate(java.lang.String alt)
          Sets the text to display if the image can't be displayed or the image content can't be found.
 void setBase(java.lang.String base)
          Sets the resoure base directory
 void setFromImage(ImageModel other)
          Copies all attributes from an other image
 void setHeight(int height)
          Sets the height of the image
 void setSource(java.lang.String src)
          Sets the URL of the image to be displayed
 void setStyle(java.lang.String style)
          Sets the Style
 void setStyleClass(java.lang.String styleClass)
          Sets the StyleClass
 void setStyleId(java.lang.String styleId)
          Sets the StyleId
 void setTooltip(java.lang.String tooltip)
          Sets the tooltip for this image
 void setWidth(int width)
          Sets the width of the image
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

source

private java.lang.String source
The source URL of the image


base

private java.lang.String base
The base directory for all the images


tooltip

private java.lang.String tooltip
Tooltip Text


alternate

private java.lang.String alternate
The alternate text for this image


width

private int width
The width of the image


height

private int height
The height of the image


styleId

private java.lang.String styleId
Style ID


styleClass

private java.lang.String styleClass
Style Class -> HTML class Attribut


style

private java.lang.String style
Html-Style

Constructor Detail

ImageModelImp

public ImageModelImp()
Constructor for ImageModelImp


ImageModelImp

public ImageModelImp(java.lang.String source)
Constructor for ImageModelImp

Parameters:
source - The source URL of the image

ImageModelImp

public ImageModelImp(java.lang.String source,
                     int width,
                     int height)
Constructor for ImageModelImp

Parameters:
source - The source URL of the image
width - The width of the image
height - The height of the image

ImageModelImp

public ImageModelImp(ImageModel other)
Copy Constructor for ImageModelImp

Parameters:
other - The Model to copy from
Method Detail

setFromImage

public void setFromImage(ImageModel other)
Copies all attributes from an other image

Parameters:
other - The Model to copy from

getTooltip

public java.lang.String getTooltip()
Description copied from interface: ImageModel
Returns a tooltip text for this image

Specified by:
getTooltip in interface ImageModel
Returns:
Tooltip text
See Also:
ImageModel.getTooltip()

getAlternate

public java.lang.String getAlternate()
Description copied from interface: ImageModel
Returns the text to display if the image can't be displayed.

Specified by:
getAlternate in interface ImageModel
Returns:
String the alternative text.
See Also:
ImageModel.getAlternate()

getHeight

public int getHeight()
Description copied from interface: ImageModel
Returns the height of the image

Specified by:
getHeight in interface ImageModel
Returns:
the height of the image
See Also:
ImageModel.getHeight()

getSource

public java.lang.String getSource()
Description copied from interface: ImageModel
Returns the URL of the image to be displayed

Specified by:
getSource in interface ImageModel
Returns:
String the URL of the image
See Also:
ImageModel.getSource()

getWidth

public int getWidth()
Description copied from interface: ImageModel
Returns the width of the image

Specified by:
getWidth in interface ImageModel
Returns:
the width of the image
See Also:
ImageModel.getWidth()

setTooltip

public void setTooltip(java.lang.String tooltip)
Sets the tooltip for this image

Parameters:
tooltip - Tooltip text

setAlternate

public void setAlternate(java.lang.String alt)
Sets the text to display if the image can't be displayed or the image content can't be found.

Parameters:
alt - The text to display if the image can't be displayed.

setHeight

public void setHeight(int height)
Sets the height of the image

Parameters:
height - the height of the image

setSource

public void setSource(java.lang.String src)
Sets the URL of the image to be displayed

Parameters:
src - the URL of the image

setWidth

public void setWidth(int width)
Sets the width of the image

Parameters:
width - the width of the image

getBase

public java.lang.String getBase()
Description copied from interface: WebResourceAccess
Gets the Base Directory for the Resource

Specified by:
getBase in interface WebResourceAccess
Returns:
base directory or null
See Also:
WebResourceAccess.getBase()

setBase

public void setBase(java.lang.String base)
Sets the resoure base directory

Specified by:
setBase in interface WebResourceAccess
Parameters:
base - Base Directory

getStyle

public java.lang.String getStyle()
Description copied from interface: ImageModel
Returns the Style

Specified by:
getStyle in interface ImageModel
Returns:
String
See Also:
ImageModel.getStyle()

getStyleId

public java.lang.String getStyleId()
Description copied from interface: ImageModel
returns the StyleId

Specified by:
getStyleId in interface ImageModel
Returns:
string
See Also:
ImageModel.getStyleId()

setStyle

public void setStyle(java.lang.String style)
Description copied from interface: ImageModel
Sets the Style

Specified by:
setStyle in interface ImageModel
Parameters:
style - Style constant
See Also:
ImageModel.setStyle(String style)

setStyleId

public void setStyleId(java.lang.String styleId)
Description copied from interface: ImageModel
Sets the StyleId

Specified by:
setStyleId in interface ImageModel
Parameters:
styleId - HTML-Id of the element
See Also:
ImageModel.setStyleId(String styleId)

getStyleClass

public java.lang.String getStyleClass()
Description copied from interface: ImageModel
Returns the StyleClass

Specified by:
getStyleClass in interface ImageModel
Returns:
String
See Also:
ImageModel.getStyleClass()

setStyleClass

public void setStyleClass(java.lang.String styleClass)
Description copied from interface: ImageModel
Sets the StyleClass

Specified by:
setStyleClass in interface ImageModel
Parameters:
styleClass - StyleClass
See Also:
ImageModel.setStyleClass(String styleClass)


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.