Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.data
Class Sticker

java.lang.Object
  extended by ch.elexis.data.PersistentObject
      extended by ch.elexis.data.Sticker
All Implemented Interfaces:
IPersistentObject, ISelectable, ISticker, java.lang.Comparable<ISticker>

public class Sticker
extends PersistentObject
implements java.lang.Comparable<ISticker>, ISticker

Eine Markierung für im Prinzip beliebige Objekte. Ein Objekt, das eine Etikette hat, kann diese Etikette zur Darstellung verwenden

Author:
gerry

Nested Class Summary
 
Nested classes/interfaces inherited from class ch.elexis.data.PersistentObject
PersistentObject.FieldType
 
Field Summary
static java.lang.String BACKGROUND
           
static java.lang.String FOREGROUND
           
static java.lang.String IMAGE_ID
           
static java.lang.String NAME
           
 
Fields inherited from class ch.elexis.data.PersistentObject
CACHE_DEFAULT_LIFETIME, CACHE_MIN_LIFETIME, CFG_CONNECTSTRING, CFG_DRIVER, CFG_PWD, CFG_TYPE, CFG_USER, DELETED, EXISTS, INEXISTENT, INVALID_ID, MATCH_AUTO, MATCH_CONTAINS, MATCH_EXACT, MATCH_REGEXP, MATCH_START
 
Fields inherited from interface ch.elexis.core.data.IPersistentObject
FLD_DATE, FLD_DELETED, FLD_EXTINFO, FLD_ID, FLD_LASTUPDATE, STATE_EXISTING, STATE_INEXISTENT, STATE_INVALID_ID
 
Constructor Summary
Sticker(java.lang.String name, Color fg, Color bg)
           
 
Method Summary
 int compareTo(ISticker o)
           
 Composite createForm(Composite parent)
           
 boolean delete()
          Ein Objekt und ggf. dessen XID's aus der Datenbank löschen the object is not deleted but rather marked as deleted.
 Color getBackground()
           
 java.util.List<java.lang.String> getClassesForSticker()
           
 Color getForeground()
           
 Image getImage()
           
 java.lang.String getLabel()
          Einen menschenlesbaren Identifikationsstring für dieses Objet liefern
static java.util.List<Sticker> getStickersForClass(java.lang.Class<?> clazz)
          Find all Stickers applicable for a given class
 int getWert()
           
static Sticker load(java.lang.String id)
           
 void register()
           
 void removeClassForSticker(java.lang.Class<?> clazz)
           
 void setBackground(Color bg)
           
 void setBackground(java.lang.String bg)
           
 void setClassForSticker(java.lang.Class clazz)
           
 void setForeground(Color fg)
           
 void setForeground(java.lang.String fg)
           
 void setImage(DBImage image)
           
 void setWert(int w)
           
 
Methods inherited from class ch.elexis.data.PersistentObject
addChangeListener, addSticker, addToList, addXid, begin, checkNull, checkZero, checkZeroDouble, clearCache, connect, connect, deleteList, disconnect, equals, executeSQLScript, exists, exportData, fireChangeEvent, flatten, fold, get, get, getCacheTime, getConnection, getDefaultCacheLifetime, getFieldType, getId, getInt, getLastUpdate, getList, getList, getMap, getSticker, getStickers, getWrappedId, getXid, getXid, getXids, hashCode, isAvailable, isDeleted, isDragOK, isMatching, isMatching, isMatching, isMatching, isShowDeleted, isValid, lock, map, relock, removeChangeListener, removeFromList, removeFromList, removeSticker, resetCache, set, set, setDefaultCacheLifetime, setInt, setMap, setShowDeleted, setTrace, state, storeToString, tableExists, ts, undelete, unlock
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.elexis.core.data.ISticker
getId
 

Field Detail

IMAGE_ID

public static final java.lang.String IMAGE_ID
See Also:
Constant Field Values

BACKGROUND

public static final java.lang.String BACKGROUND
See Also:
Constant Field Values

FOREGROUND

public static final java.lang.String FOREGROUND
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values
Constructor Detail

Sticker

public Sticker(java.lang.String name,
               Color fg,
               Color bg)
Method Detail

createForm

public Composite createForm(Composite parent)

getImage

public Image getImage()

setImage

public void setImage(DBImage image)

setForeground

public void setForeground(java.lang.String fg)

setForeground

public void setForeground(Color fg)

getForeground

public Color getForeground()

setBackground

public void setBackground(java.lang.String bg)

setBackground

public void setBackground(Color bg)

register

public void register()

getBackground

public Color getBackground()

getLabel

public java.lang.String getLabel()
Description copied from class: PersistentObject
Einen menschenlesbaren Identifikationsstring für dieses Objet liefern

Specified by:
getLabel in interface IPersistentObject
Specified by:
getLabel in interface ISticker
Specified by:
getLabel in class PersistentObject

getWert

public int getWert()
Specified by:
getWert in interface ISticker

setWert

public void setWert(int w)
Specified by:
setWert in interface ISticker

delete

public boolean delete()
Description copied from class: PersistentObject
Ein Objekt und ggf. dessen XID's aus der Datenbank löschen the object is not deleted but rather marked as deleted. A purge must be applied to remove the object really

Specified by:
delete in interface ISticker
Overrides:
delete in class PersistentObject
Returns:
true on success

setClassForSticker

public void setClassForSticker(java.lang.Class clazz)
Specified by:
setClassForSticker in interface ISticker

removeClassForSticker

public void removeClassForSticker(java.lang.Class<?> clazz)
Specified by:
removeClassForSticker in interface ISticker

getClassesForSticker

public java.util.List<java.lang.String> getClassesForSticker()
Specified by:
getClassesForSticker in interface ISticker

getStickersForClass

public static java.util.List<Sticker> getStickersForClass(java.lang.Class<?> clazz)
Find all Stickers applicable for a given class

Parameters:
clazz -
Returns:

load

public static Sticker load(java.lang.String id)

compareTo

public int compareTo(ISticker o)
Specified by:
compareTo in interface ISticker
Specified by:
compareTo in interface java.lang.Comparable<ISticker>

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis