org.openbp.common.rc.image
Class TMulti

java.lang.Object
  extended by org.openbp.common.rc.ResourceItem
      extended by org.openbp.common.rc.image.TMulti

public class TMulti
extends ResourceItem

Abstract image resource item implementation for the ImageIcon object.

Author:
Andreas Putz

Field Summary
protected static java.lang.String[] EXTENSIONS
           
protected static java.lang.String TAG_IMAGE_PATH
          XML tag 'path'
 
Fields inherited from class org.openbp.common.rc.ResourceItem
ATTRIBUTE_PROPERTY_NAME, ATTRIBUTE_PROPERTY_TYPE, GROUP_DELIMITER, name, resourceCollection, resourceObject
 
Constructor Summary
TMulti()
           
 
Method Summary
protected  boolean checkFileExtension(java.lang.String extension)
          Checks the validation of the file extension.
 java.lang.String getMimeType()
          Gets the mime-type of the resource item.
 java.lang.String getPath()
          Gets the image path.
 void initializeFromDOM(ResourceCollection res, org.w3c.dom.Element sourceElement, java.lang.String group)
          Determines the information from the DOM element and set this to the resource item.
protected  java.lang.Object loadResourceObject()
          Loads the object associated with the resource.
 
Methods inherited from class org.openbp.common.rc.ResourceItem
getErrorName, getName, getObject, getResourceCollection, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG_IMAGE_PATH

protected static final java.lang.String TAG_IMAGE_PATH
XML tag 'path'

See Also:
Constant Field Values

EXTENSIONS

protected static final java.lang.String[] EXTENSIONS
Constructor Detail

TMulti

public TMulti()
Method Detail

initializeFromDOM

public void initializeFromDOM(ResourceCollection res,
                              org.w3c.dom.Element sourceElement,
                              java.lang.String group)
Determines the information from the DOM element and set this to the resource item.

Overrides:
initializeFromDOM in class ResourceItem
Parameters:
res - Resource the item belongs to
sourceElement - Resource item node
group - Name of the resource item group or null

getMimeType

public java.lang.String getMimeType()
Gets the mime-type of the resource item.

Returns:
A string in mime-type format

loadResourceObject

protected java.lang.Object loadResourceObject()
Loads the object associated with the resource. Loads the image from the image path specified in the resource XML file.

Overrides:
loadResourceObject in class ResourceItem
Returns:
The image or null on error

getPath

public java.lang.String getPath()
Gets the image path.


checkFileExtension

protected boolean checkFileExtension(java.lang.String extension)
Checks the validation of the file extension.

Parameters:
extension - File extension f.e. 'gif'
Returns:
true Is valid
false Is invalid


Copyright © 2011. All Rights Reserved.