net.datacrow.core.objects
Class Picture

java.lang.Object
  extended by net.datacrow.core.objects.DcObject
      extended by net.datacrow.core.objects.Picture
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DcObject>

public class Picture
extends DcObject

A picture represents a physical picture file. Every image stored in Data Crow (such as screenshots) is represented by a picture object.

Author:
Robert Jan van der Waals
See Also:
Serialized Form

Field Summary
static int _A_OBJECTID
           
static int _B_FIELD
           
static int _C_FILENAME
           
static int _D_IMAGE
           
static int _E_HEIGHT
           
static int _F_WIDTH
           
static int _G_EXTERNAL_FILENAME
           
 
Fields inherited from class net.datacrow.core.objects.DcObject
_ID, _SYS_AVAILABLE, _SYS_CONTAINER, _SYS_CREATED, _SYS_DISPLAYVALUE, _SYS_EXTERNAL_REFERENCES, _SYS_FILEHASH, _SYS_FILEHASHTYPE, _SYS_FILENAME, _SYS_FILESIZE, _SYS_LENDBY, _SYS_LOANDUEDATE, _SYS_LOANDURATION, _SYS_LOANENDDATE, _SYS_LOANSTARTDATE, _SYS_LOANSTATUS, _SYS_LOANSTATUSDAYS, _SYS_MODIFIED, _SYS_MODULE, _SYS_SERVICE, _SYS_SERVICEURL, _VALUE, children
 
Constructor Summary
Picture()
          Creates a new instance
 
Method Summary
 void destroy()
           
 boolean equals(java.lang.Object o)
           
protected  void finalize()
           
 java.awt.Image getImage()
           
 java.lang.String getImageFilename()
           
 java.lang.String getScaledFilename()
           
 java.lang.String getScaledFilename(java.lang.String filename)
           
 DcImageIcon getScaledPicture()
           
 int hashCode()
           
 boolean hasImage()
          Checks whether an image has been defined and, if so, if the image exists.
 boolean hasPrimaryKey()
          Is this object capable of storing IDs?
 void initializeImages()
          Loads the actual image / picture information.
 void initializeReferences()
          Loads the actual reference information.
 boolean isDeleted()
           
 void isDeleted(boolean b)
           
 boolean isEdited()
           
 void isEdited(boolean b)
           
 boolean isLoaded()
           
 boolean isNew()
           
 void loadImage(boolean external)
           
 void markAsUnchanged()
          Mark all fields as unchanged.
 java.lang.String toString()
           
 void unload()
           
 
Methods inherited from class net.datacrow.core.objects.DcObject
addChild, addExternalReference, addRequest, applyEnhancers, applyTemplate, applyTemplate, beforeDelete, beforeSave, checkIntegrity, clearValues, clone, compareTo, copy, copyImage, createIcon, delete, executeRequests, flushImages, getChildren, getCurrentChildren, getDatabaseFieldCount, getDatabaseFieldName, getDefaultSortFieldIdx, getDisplayFieldIdx, getDisplayString, getExternalReference, getField, getFieldIndices, getFields, getFieldType, getFileField, getFilename, getIcon, getID, getLabel, getMaxFieldLength, getModule, getName, getNormalizedString, getNotSearchableFields, getParentID, getParentReferenceFieldIndex, getRequests, getSystemDisplayFieldIdx, getTableName, getTableShortName, getValue, getValueDef, getValues, initializeReferences, isChanged, isChanged, isDestroyed, isEnabled, isFilled, isLastInLine, isRequired, isSearchable, isUnique, isUpdateGUI, load, load, loadChildren, markAsChanged, merge, release, reload, removeChildren, removeRequests, saveNew, saveUpdate, saveUpdate, setChanged, setChildren, setIDs, setLastInLine, setLoanInformation, setLoanInformation, setNew, setUpdateGUI, setValidate, setValue, setValueForColumn, setValueForName, setValueLowLevel, validateRequiredFields
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_A_OBJECTID

public static final int _A_OBJECTID
See Also:
Constant Field Values

_B_FIELD

public static final int _B_FIELD
See Also:
Constant Field Values

_C_FILENAME

public static final int _C_FILENAME
See Also:
Constant Field Values

_D_IMAGE

public static final int _D_IMAGE
See Also:
Constant Field Values

_E_HEIGHT

public static final int _E_HEIGHT
See Also:
Constant Field Values

_F_WIDTH

public static final int _F_WIDTH
See Also:
Constant Field Values

_G_EXTERNAL_FILENAME

public static final int _G_EXTERNAL_FILENAME
See Also:
Constant Field Values
Constructor Detail

Picture

public Picture()
Creates a new instance

Method Detail

initializeImages

public void initializeImages()
Description copied from class: DcObject
Loads the actual image / picture information. Changes are overwritten. Useful when reloading an object.

Overrides:
initializeImages in class DcObject

hasPrimaryKey

public boolean hasPrimaryKey()
Description copied from class: DcObject
Is this object capable of storing IDs? In most cases the answer should be yes.

Overrides:
hasPrimaryKey in class DcObject

initializeReferences

public void initializeReferences()
Description copied from class: DcObject
Loads the actual reference information. Uses the Data Manager to retrieve the references and stores them in this object.

Overrides:
initializeReferences in class DcObject

hasImage

public boolean hasImage()
Checks whether an image has been defined and, if so, if the image exists.


loadImage

public void loadImage(boolean external)

getImage

public java.awt.Image getImage()

destroy

public void destroy()
Overrides:
destroy in class DcObject

getImageFilename

public java.lang.String getImageFilename()

unload

public void unload()

markAsUnchanged

public void markAsUnchanged()
Description copied from class: DcObject
Mark all fields as unchanged. This does not reset the values to their original values! (use #load())

Overrides:
markAsUnchanged in class DcObject

getScaledPicture

public DcImageIcon getScaledPicture()

getScaledFilename

public java.lang.String getScaledFilename()

getScaledFilename

public java.lang.String getScaledFilename(java.lang.String filename)

isEdited

public void isEdited(boolean b)

isDeleted

public void isDeleted(boolean b)

isLoaded

public boolean isLoaded()
Overrides:
isLoaded in class DcObject

isNew

public boolean isNew()
Overrides:
isNew in class DcObject

isEdited

public boolean isEdited()

isDeleted

public boolean isDeleted()

toString

public java.lang.String toString()
Overrides:
toString in class DcObject

hashCode

public int hashCode()
Overrides:
hashCode in class DcObject

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class DcObject

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class DcObject
Throws:
java.lang.Throwable