|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.kobjects.kui.KForm
public class KForm
| Field Summary | |
|---|---|
boolean |
center
Center content vertically |
static Command |
DISMISS_COMMAND
Dismiss command (for alerts, see KDisplay.createAlert) |
protected int |
h
Content height; -1 indicates that a relayout is necessary. |
static Command |
SELECT_COMMAND
Select command for Lists |
| Constructor Summary | |
|---|---|
KForm(java.lang.String title)
Creates an empty KForm with the given title. |
|
| Method Summary | |
|---|---|
void |
addCommand(Command cmd)
Add the given command to this form. |
void |
append(KItem item)
Append the given item at the end of this KForm. |
void |
append(java.lang.String text)
Shortcut for append(new KStringItem(null, text)); |
protected void |
drawSoftKeys(Graphics g)
Draws the soft keys and the option menu |
protected void |
drawTitle(Graphics g)
Draws the title area of this form |
KItem |
get(int i)
Returns the item with the given index |
int |
getFocusIndex()
Returns the index of the focussed item |
KItem |
getFocussedItem()
Returns the focussed item, or null if none is focussed. |
int |
getHeight()
Calculates the height of the content area (excluding title, softkeys) |
Style |
getStyle(int index)
Returns the style with the given identification. |
java.lang.String |
getTitle()
Returns the title of this form, as set in the constructor or by setTitle(). |
int |
getWidth()
Calculates the width of the content area (excluding title, softkeys) |
void |
insert(int index,
KItem item)
insert the given item at the given index. |
void |
keyPressed(int code)
Called when a key was pressed, but there is no focussed item to consume the event. |
void |
keyReleased(int code)
Called when a key was released, but there is no focussed item to consume the event. |
void |
keyRepeated(int code)
Called when a key was repeated, but there is no focussed item to consume the event. |
void |
paint(Graphics g)
Draws the content area of this form. |
void |
pointerDragged(int x,
int y)
Indicates that the pointer was dragged to the given location. |
void |
pointerPressed(int x,
int y)
Indicates that the pointer was pressed at the given location. |
void |
pointerReleased(int x,
int y)
Indicates that the pointer was released at the given location. |
void |
removeCommand(Command cmd)
Remove the given command. |
void |
repaint()
Request a repaint of the form. |
void |
setBackgroundImage(Image img)
|
void |
setCommandListener(KCommandListener listener)
Set the command listener for this form |
boolean |
setFocusIndex(int i,
int dir)
Set the focus to the given item index |
void |
setInfo(java.lang.String text)
Sets a short text in the right corner of the title bar. |
void |
setStyle(int index,
Style style)
Sets the style with the given identification for this form. |
void |
setTitle(java.lang.String title)
Sets the form title and requests a relayout |
void |
setTitleIcon(Image icon)
Set the title icon, displayed to the left of the title |
int |
size()
Returns the number of items in this form |
protected void |
tick()
Called by the display every 100 ms if the form is visible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Command DISMISS_COMMAND
public static final Command SELECT_COMMAND
protected int h
public boolean center
| Constructor Detail |
|---|
public KForm(java.lang.String title)
title - Title of the form| Method Detail |
|---|
public void append(java.lang.String text)
public void append(KItem item)
public Style getStyle(int index)
KDisplay.getStyle(int)
public void setStyle(int index,
Style style)
KDisplay.setStyle(int,Style)public void removeCommand(Command cmd)
public void setTitleIcon(Image icon)
protected void drawTitle(Graphics g)
public void paint(Graphics g)
protected void drawSoftKeys(Graphics g)
public boolean setFocusIndex(int i,
int dir)
public KItem get(int i)
public int getFocusIndex()
public void pointerPressed(int x,
int y)
x - x-coordinatey - y-coordinate
public void pointerReleased(int x,
int y)
x - x-coordinatey - y-coordinate
public void pointerDragged(int x,
int y)
x - x-coordinatey - y-coordinatepublic void keyPressed(int code)
code - normalized keycodepublic void keyRepeated(int code)
code - normalized keycodepublic void keyReleased(int code)
code - normalized keycodepublic void addCommand(Command cmd)
public void setCommandListener(KCommandListener listener)
public int size()
public void insert(int index,
KItem item)
public void setTitle(java.lang.String title)
public java.lang.String getTitle()
public KItem getFocussedItem()
public void repaint()
protected void tick()
public int getWidth()
public int getHeight()
public void setBackgroundImage(Image img)
public void setInfo(java.lang.String text)
text - Text to be displayed in the top right area
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||