com.monad.homerun.model.date
Class DateModel

java.lang.Object
  extended by com.monad.homerun.base.DataObject
      extended by com.monad.homerun.model.date.DateModel
All Implemented Interfaces:
Model, java.io.Serializable

public class DateModel
extends DataObject
implements Model

DateModel extends Model to describe instants of time projected onto a calendar, or time sequence. So it is sort of a hybrid between state and numeric models - emphasis depends on the 'subtype'.

See Also:
Serialized Form

Field Summary
static int DATE_FULL
           
static int DAY_NAME
           
static int DAY_OF_MONTH
           
static int MONTH_NAME
           
static int OPT_ABBREV
           
static int OPT_DMDATE
           
static int OPT_GRAPHICAL
           
static int OPT_MODEL_ICON
           
static int OPT_MODEL_NAME
           
static int OPT_NUMERIC
           
static int OPT_OBJECT_ICON
           
static int OPT_OBJECT_NAME
           
static int YEAR
           
 
Constructor Summary
DateModel()
           
DateModel(java.lang.String domain, java.lang.String modelName, java.lang.String iconName, int subType)
           
DateModel(java.lang.String domain, java.lang.String modelName, java.lang.String iconName, int subType, java.lang.String[] stateNames)
           
 
Method Summary
 Control getControl()
          Returns a control for the model.
 java.lang.String getDomain()
          Returns the name of the model's domain.
static java.util.Map<java.lang.String,java.lang.Integer> getFormatOptions(int subType)
           
 java.lang.String getIconName()
          Returns the icon name for the model.
 java.lang.String getModelName()
          Returns the name of model, unique within a domain.
 int getModelSubType()
           
 java.lang.String getModelType()
          Returns the type of the model.
 java.lang.String[] getStateNames()
           
 boolean isNowRef()
           
static boolean needModelIcon(int format)
           
static boolean needObjectIcon(int format)
           
 void setIconName(java.lang.String iconName)
           
 void setModelName(java.lang.String modelName)
          Sets the name of the model.
 void setModelSubType(int subType)
           
 void setStateNames(java.lang.String[] stateNames)
           
static java.lang.String styledValue(DateModelStatus status, int format)
           
static java.lang.String toOrdinal(int val)
           
 
Methods inherited from class com.monad.homerun.base.DataObject
getCategory, getModificationTime, getName, getNote, setCategory, setModificationTime, setName, setNote
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DAY_NAME

public static final int DAY_NAME
See Also:
Constant Field Values

DAY_OF_MONTH

public static final int DAY_OF_MONTH
See Also:
Constant Field Values

MONTH_NAME

public static final int MONTH_NAME
See Also:
Constant Field Values

YEAR

public static final int YEAR
See Also:
Constant Field Values

DATE_FULL

public static final int DATE_FULL
See Also:
Constant Field Values

OPT_GRAPHICAL

public static final int OPT_GRAPHICAL
See Also:
Constant Field Values

OPT_MODEL_NAME

public static final int OPT_MODEL_NAME
See Also:
Constant Field Values

OPT_MODEL_ICON

public static final int OPT_MODEL_ICON
See Also:
Constant Field Values

OPT_OBJECT_NAME

public static final int OPT_OBJECT_NAME
See Also:
Constant Field Values

OPT_OBJECT_ICON

public static final int OPT_OBJECT_ICON
See Also:
Constant Field Values

OPT_ABBREV

public static final int OPT_ABBREV
See Also:
Constant Field Values

OPT_NUMERIC

public static final int OPT_NUMERIC
See Also:
Constant Field Values

OPT_DMDATE

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

DateModel

public DateModel()

DateModel

public DateModel(java.lang.String domain,
                 java.lang.String modelName,
                 java.lang.String iconName,
                 int subType)

DateModel

public DateModel(java.lang.String domain,
                 java.lang.String modelName,
                 java.lang.String iconName,
                 int subType,
                 java.lang.String[] stateNames)
Method Detail

getModelName

public java.lang.String getModelName()
Description copied from interface: Model
Returns the name of model, unique within a domain.

Specified by:
getModelName in interface Model
Returns:
the model name

setModelName

public void setModelName(java.lang.String modelName)
Description copied from interface: Model
Sets the name of the model.

Specified by:
setModelName in interface Model
Parameters:
modelName - the name of the model

getDomain

public java.lang.String getDomain()
Description copied from interface: Model
Returns the name of the model's domain.

Specified by:
getDomain in interface Model
Returns:
the model domain

getModelType

public java.lang.String getModelType()
Description copied from interface: Model
Returns the type of the model.

Specified by:
getModelType in interface Model
Returns:
the model type

getIconName

public java.lang.String getIconName()
Description copied from interface: Model
Returns the icon name for the model.

Specified by:
getIconName in interface Model
Returns:
the model icon name

isNowRef

public boolean isNowRef()

getControl

public Control getControl()
Description copied from interface: Model
Returns a control for the model.

Specified by:
getControl in interface Model
Returns:
a control, or null if model cannot be controlled

getStateNames

public java.lang.String[] getStateNames()

setStateNames

public void setStateNames(java.lang.String[] stateNames)

getModelSubType

public int getModelSubType()

setModelSubType

public void setModelSubType(int subType)

setIconName

public void setIconName(java.lang.String iconName)

getFormatOptions

public static java.util.Map<java.lang.String,java.lang.Integer> getFormatOptions(int subType)

needObjectIcon

public static boolean needObjectIcon(int format)

needModelIcon

public static boolean needModelIcon(int format)

styledValue

public static java.lang.String styledValue(DateModelStatus status,
                                           int format)

toOrdinal

public static java.lang.String toOrdinal(int val)


Copyright © 2006-2009 Richard Rodgers. All Rights Reserved.