|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectno.tellu.cdlc.gui.GuiElement
framework.POIElement
public class POIElement
POIElement.java
Draws the points of interest in a map. The POIs can be selected by pressing the number (1-9) they are represented by. When a POI is selected, a popup with some information is drawn. Choosing POIs is done by pressing the fire button. The POIElement is used together with MapElement and MapLayout in a panel.
Field Summary |
---|
Fields inherited from class no.tellu.cdlc.gui.GuiElement |
---|
ANY, DECIMAL, EMAILADDR, NUMERIC, PASSWORD, PASSWORD_NUMERIC, PHONENUMBER, URL |
Constructor Summary | |
---|---|
POIElement(java.lang.String elementId,
int mapWidth,
int mapHeight,
MapObject map,
int maxNumberOfPOIsToSave)
Constructor POIElement |
Method Summary | |
---|---|
void |
deleteSavedPOI()
Deletes a saved POI |
boolean |
fire(int arg0)
Saves the selected POI if it is not saved, deletes it otherwise. |
int |
getMaxNumberOfPOIsToSave()
|
int |
getPOIIndexInSavedVector(POIObject poiObjectOnMap)
Finds the index number of a POI in the saved POIs vector |
java.util.Vector |
getSavedPOIs()
|
POIObject |
getSelectedPOI()
|
boolean |
numberPressed(int key)
Keeps control of which kindergarten is selected by the user. |
void |
paint(javax.microedition.lcdui.Graphics g,
boolean selected)
Paints the selectable and not selectable points of interest. |
boolean |
savePOI()
Saves a POI in the saved POIs vector |
void |
setMaxNumberOfPOIsToSave(int maxNumberOfPOIsToChoose)
Sets the highest number of kindergartens possible to save. |
void |
setSavedPOIs(java.util.Vector savedPOIs)
Sets the saved POIs. |
void |
setSelectedPOI(POIObject selectedPOI)
Sets the selected point of interest. |
Methods inherited from class no.tellu.cdlc.gui.GuiElement |
---|
backPressed, callbackAction, changeFont, charPressed, clearButton, clearFields, contains, countCharactersToWidth, countCharactersToWidth, drawBorder, drawBorder, drawString, drawString, elementLayoutManager, getComponentAt, getCurrGuiElement, getElement, getElementId, getFieldColour, getFieldType, getFont, getFontColour, getHeight, getHelpString, getInnerheight, getInnerWidth, getInsetBottom, getInsetLeft, getInsetRight, getInsetTop, getLabel, getLineColour, getMaxCharacters, getMaxHeight, getMaxWidth, getMinCharacters, getParent, getPreferredHeight, getPreferredWidth, getSoundFileName, getValue, getWidth, getWidtOfString, getWidtOfString, getX, getY, init, isAllElementsComplete, isBorderVisible, isEditable, isFocused, isHidden, isInputValidated, isLayoutNeeded, isMaximumSizeSet, isPreferredHeightSizeSet, isPreferredSizeSet, isPreferredWidhtSizeSet, isSelectable, isVisible, moveDown, moveLeft, moveRight, moveToShow, moveUp, paint, paint, poundPressed, remove, replaceTabInString, setAutoLayout, setBorderVisible, setBounds, setDrawBackground, setEditable, setElementId, setElementListner, setElementPosition, setFieldType, setFocused, setFont, setFrameSize, setGroupElement, setHeight, setHelpString, setHidden, setInsetBottom, setInsetLeft, setInsetRight, setInsets, setInsetTop, setLabel, setLayoutNeeded, setLayoutNeeded, setMaxCharacters, setMaximumSize, setMinCharacters, setParent, setPreferredSize, setSelectable, setSize, setSoundFileName, setWidth, setX, setY, starPressed, truncate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public POIElement(java.lang.String elementId, int mapWidth, int mapHeight, MapObject map, int maxNumberOfPOIsToSave)
elementId
- The id of the object of this classmapHeight
- The map height to be setmap
- The object containing the map informationmaxNumberOfPOIsToSave
- The maximum number of POIS that can be savedMethod Detail |
---|
public void paint(javax.microedition.lcdui.Graphics g, boolean selected)
paint
in class no.tellu.cdlc.gui.GuiElement
public boolean savePOI()
public void deleteSavedPOI()
public int getPOIIndexInSavedVector(POIObject poiObjectOnMap)
poiObjectOnMap
- the POI to be searched for
public java.util.Vector getSavedPOIs()
public void setSavedPOIs(java.util.Vector savedPOIs)
savedPOIs
- the vector with saved POIspublic boolean numberPressed(int key)
numberPressed
in class no.tellu.cdlc.gui.GuiElement
public boolean fire(int arg0)
fire
in class no.tellu.cdlc.gui.GuiElement
public int getMaxNumberOfPOIsToSave()
public void setMaxNumberOfPOIsToSave(int maxNumberOfPOIsToChoose)
maxNumberOfPOIsToChoose
- the highest number of kindergartens possible to savepublic POIObject getSelectedPOI()
public void setSelectedPOI(POIObject selectedPOI)
selectedPOI
- the point of interest to be set as selected
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |