|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.cbse.jeasy.JEObject
com.cbse.jeasy.JETips
public class JETips
A JETips reads tips of a day out of an XML file and/or a String . If you show the tips in an editorpane (see RunExample.java) html syntax can be used. The format of the XML file or string is:
<tips>
<tip>your tip</tip>
</tips>
| Properties | ||
|---|---|---|
| name | values | comment |
| id | * | Id of the object. Let it begin with MC_ |
| filename |   | The name of the XML file to read the tips. |
| tips |   | An xml string with your tips in format <tip>your tip</tip>. |
| random | true false | Set to true will set a random order of tips. |
* = property you have to set; bold = default value
| Field Summary |
|---|
| Fields inherited from class com.cbse.jeasy.JEObject |
|---|
DEVELOPPING, INPUT_ERROR_DATE, INPUT_ERROR_LENGTH, INPUT_ERROR_MANDATORY, INPUT_ERROR_PARSE, INPUT_ERROR_RANGE, INPUT_ERROR_TIME, INPUT_ERRORS, NO_INPUT_ERROR, RUNNING |
| Constructor Summary | |
|---|---|
JETips()
Constructor |
|
JETips(java.lang.String s)
Reads the properties from a string. |
|
| Method Summary | |
|---|---|
java.lang.String |
getFilename()
Method getFilename |
int |
getSize()
Returns the number of tips |
java.lang.String |
gettips()
Method gettips |
java.lang.String |
nextTip()
Gets the next tip |
java.lang.String |
previousTip()
Gets the previous tip |
void |
randomize()
Randomizes the order of the tips |
void |
setFilename(java.lang.String filename)
Method setFilename |
void |
setNumber(int number)
Sets the number of the tip that you can get by nextTip The first tip has the number 0. |
void |
settips(java.lang.String tips)
Method settips |
void |
start()
Method start |
| Methods inherited from class com.cbse.jeasy.JEObject |
|---|
backupEntry, clear, deserializeValue, getApplet, getApplLocale, getCenter, getComponent, getEast, getElementAt, getElementSize, getId, getJCallBack, getJClass, getLabel, getMode, getName, getNorth, getObjLocale, getParentId, getPreview, getProjectDirectory, getProperty, getRegisterText, getSouth, getStarted, getTitle, getType, getWest, getXMLtag, isEditable, isEnabled, isEnterprise, isProfessional, isStandard, isVisible, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEaddTab, removeProperties, removeProperty, restoreEntry, serializeValue, setApplet, setApplLocale, setEditable, setEditable, setEnabled, setEnabled, setFocus, setJCallBack, setMarkable, setMarkable, setMode, setObjLocale, setParentId, setPreview, setProjectDirectory, setProperty, setStarted, setVisible, setVisible, wasEntryChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JETips()
public JETips(java.lang.String s)
s - contains properties and valuesJE#PropertyString| Method Detail |
|---|
public void setFilename(java.lang.String filename)
filename - a Stringpublic java.lang.String getFilename()
public void settips(java.lang.String tips)
tips - a Stringpublic java.lang.String gettips()
public void setNumber(int number)
size - an intpublic int getSize()
public void randomize()
public java.lang.String nextTip()
public java.lang.String previousTip()
public void start()
start in class JEObject
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||