|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.miginfocom.calendar.category.Category
com.miginfocom.beans.DemoDataBean
public class DemoDataBean
A JavaBean that can be used to create some random demo activities.
This class should only be used to test activity handling. Performance is sub-par for anything else since the demo data will be recreated for every setXxx method called.
The algorithm start from the earliest time (set in the propertis of this class) and the randomizing values (normally between some min/max value) for all properties of the activity until the end time is reached.
ActivityHelper#createActivities(com.miginfocom.util.dates.DateRangeI, String[], String[], Object[], Object[][], int, int, int, int, int, int),
Serialized Form| Field Summary |
|---|
| Fields inherited from class com.miginfocom.calendar.category.Category |
|---|
ALL_PROPERTIES_CHANGED_NAME, ICON, oo, PROP_ALLOWS_CHILDREN, PROP_CATEGORY_SORTER, PROP_CHILDREN_IDS, PROP_ICON, PROP_ID, PROP_IS_HIDDEN, PROP_IS_LEAF, PROP_LAST_MODIFIED_MILLIS, PROP_NAME, PROP_PARENT_IDS, PROP_STATUS |
| Constructor Summary | |
|---|---|
DemoDataBean()
|
|
| Method Summary | |
|---|---|
void |
createDemoData()
This method will create the demo data. |
ImmutableDateRange |
geDataDateRange()
Property: The date range that the demo data will be created for. |
java.lang.String |
getActivityCategories()
Property: A comma separated list of main categories that all activities will get one (random) of. |
java.lang.String |
getActivityDepositoryContext()
Property: The context used to get the depository to put all generated demo activities in. |
java.lang.String |
getCategories()
Property: A comma separated list with special chars of main categories that will be created in the CategoryDepository. |
java.lang.String |
getDescriptionTexts()
Property: A comma separated list of description texts that will randomly be selected from for every created activity. |
int |
getGapMinutesMax()
Property: The maximum minutes that should pass between two generated activities. |
int |
getGapMinutesMin()
Property: The minimum minutes that has to pass between two generated activities. |
int |
getLengthMinutesMax()
Property: The maximum number of minutes that an activity should span. |
int |
getLengthMinutesMin()
Property: The minimum number of minutes that an activity should span. |
java.util.Locale |
getLocale()
Property: The locale to set for every created Activity. |
int |
getMaxActivityCount()
Property: The maximum number of activities generated. |
int |
getRoundToMinutes()
Property: The number of minutes to round to. |
java.lang.String |
getSummaryTexts()
Property: A comma separated list of summaries that will randomly be selected from for every created activity. |
java.util.TimeZone |
getTimeZone()
Property: The time zone to set for every created Activity. |
boolean |
isDemoDataCreated()
Returns if this bean should generate demo data or not. |
boolean |
isEnabled()
Property: If the demo data bean is enabled or not. |
boolean |
isOnlyDesignTime()
Property: If the demo date should only be created in a design time environment. |
void |
removeDemoData()
This method will remove the demo data. |
void |
setActivityCategories(java.lang.String actCats)
Property: A comma separated list of main categories that all activities will get one (random) of. |
void |
setActivityDepositoryContext(java.lang.String ctx)
Property: The context used to get the depository to put all generated demo activities in. |
void |
setCategories(java.lang.String cats)
Property: A comma separated list with special chars of main categories that will be created in the CategoryDepository. |
void |
setDataDateRange(ImmutableDateRange dateRange)
Property: The date range that the demo data will be created for. |
void |
setDescriptionTexts(java.lang.String descrTexts)
Property: A comma separated list of description texts that will randomly be selected from for every created activity. |
void |
setEnabled(boolean b)
Property: If the demo data bean is enabled or not. |
void |
setGapMinutesMax(int minutes)
Property: The maximum minutes that should pass between two generated activities. |
void |
setGapMinutesMin(int minutes)
Property: The minimum minutes that has to pass between two generated activities. |
void |
setLengthMinutesMax(int minutes)
Property: The maximum number of minutes that an activity should span. |
void |
setLengthMinutesMin(int minutes)
Property: The minimum number of minutes that an activity should span. |
void |
setLocale(java.util.Locale locale)
Property: The locale to set for every created Activity. |
void |
setMaxActivityCount(int count)
Property: The maximum number of activities generated. |
void |
setOnlyDesignTime(boolean b)
Property: If the demo date should only be created in a design time environment. |
void |
setRoundToMinutes(int minutes)
Property: The number of minutes to round to. |
void |
setSummaryTexts(java.lang.String sumTexts)
Property: A comma separated list of summaries that will randomly be selected from for every created activity. |
void |
setTimeZone(java.util.TimeZone timeZone)
Property: The time zone to set for every created Activity. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DemoDataBean()
| Method Detail |
|---|
public boolean isEnabled()
public void setEnabled(boolean b)
b - If the demo data bean should be enabled or not.public boolean isDemoDataCreated()
true is demo data has been generated.public void createDemoData()
ActivityDepository.getInstance(String),
setEnabled(boolean)public void removeDemoData()
ActivityDepository.getInstance(String)public java.lang.String getActivityDepositoryContext()
null.ActivityDepository.getInstance(String)public void setActivityDepositoryContext(java.lang.String ctx)
This method will recreated the demo data which may take some time.
ctx - The new context. May be null.ActivityDepository.getInstance(String),
ActivityHelper#createActivities(com.miginfocom.util.dates.DateRangeI, String[], String[], Object[], Object[][], int, int, int, int, int, int)public java.lang.String getCategories()
CategoryDepository.
setCategories(String)public void setCategories(java.lang.String cats)
CategoryDepository.
The list can be used to create a hierarchy (tree) of categories.
This method will recreated the demo data which may take some time.
cats - The comma separated category ids. For every element, if first char is a "+" the category catIDs[catIx] will be a folder beneath
addToNode and the rest will be added to this new fonder. If the first char is one or more "-" the category catIDs[catIx] will
be added to the parent that many levels up from addToNode. If not "+" or "-" then catIDs[catIx] will just be added to
addToNode.
"-" and "+" can be combined but "-" must always be first if so. For instacne "-+Folder" creates a folder in the parent category.
public java.lang.String getActivityCategories()
null.ActivityHelper#createActivities(com.miginfocom.util.dates.DateRangeI, String[], String[], Object[], Object[][], int, int, int, int, int, int)public void setActivityCategories(java.lang.String actCats)
This method will recreated the demo data which may take some time.
actCats - The new comma separated list. May be null in which case the activities will get no categories.ActivityHelper#createActivities(com.miginfocom.util.dates.DateRangeI, String[], String[], Object[], Object[][], int, int, int, int, int, int)public java.lang.String getSummaryTexts()
null but may be "":public void setSummaryTexts(java.lang.String sumTexts)
This method will recreated the demo data which may take some time.
sumTexts - The new list. null is converted to "":public java.lang.String getDescriptionTexts()
null but may be "":public void setDescriptionTexts(java.lang.String descrTexts)
This method will recreated the demo data which may take some time.
descrTexts - The new list. null is converted to "":public java.util.TimeZone getTimeZone()
Activity.
null.public void setTimeZone(java.util.TimeZone timeZone)
Activity.
This method will recreated the demo data which may take some time.
timeZone - The new time zone to use. May be null.public java.util.Locale getLocale()
Activity.
null.public void setLocale(java.util.Locale locale)
Activity.
This method will recreated the demo data which may take some time.
locale - The new time zone to use. May be null.public ImmutableDateRange geDataDateRange()
null.
null.public void setDataDateRange(ImmutableDateRange dateRange)
null.
The demo data will not be recreated. Call recreateDemoData() for that.
dateRange - The new range. Not null.public int getGapMinutesMin()
public void setGapMinutesMin(int minutes)
This method will recreated the demo data which may take some time.
minutes - The new number of minutes. May be negative.public int getGapMinutesMax()
public void setGapMinutesMax(int minutes)
This method will recreated the demo data which may take some time.
minutes - The new number of minutes. Not negative.public int getRoundToMinutes()
5 all activities start and end times will be rounded to
five minutes intervals (0, 5, 10, 15 etc..).
public void setRoundToMinutes(int minutes)
5 all activities start and end times will be rounded to
five minutes intervals (0, 5, 10, 15 etc..).
This method will recreated the demo data which may take some time.
minutes - The new value.public int getLengthMinutesMin()
public void setLengthMinutesMin(int minutes)
This method will recreated the demo data which may take some time.
minutes - The new value.public int getLengthMinutesMax()
public void setLengthMinutesMax(int minutes)
This method will recreated the demo data which may take some time.
minutes - The new value.public int getMaxActivityCount()
public void setMaxActivityCount(int count)
This method will recreated the demo data which may take some time.
count - The new value. Default is 200.public boolean isOnlyDesignTime()
public void setOnlyDesignTime(boolean b)
This method will recreated the demo data which may take some time.
b - The new value.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||