|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.huguesjohnson.tiamat.graphics.Dialog
Dialog - a dialog to display text and accept selections
| Constructor Summary | |
Dialog(java.lang.String[] text,
java.awt.Component canvas,
Theme style,
javax.swing.JFrame parent)
Constructor. |
|
Dialog(java.lang.String[] text,
int x,
int y,
int x1,
int y1,
java.awt.Component canvas,
Theme style,
javax.swing.JFrame parent)
Constructor. |
|
Dialog(java.lang.String[] text,
java.lang.String[] selections,
java.awt.Component canvas,
Theme style,
javax.swing.JFrame parent)
Constructor. |
|
Dialog(java.lang.String[] text,
java.lang.String[] selections,
int x,
int y,
int x1,
int y1,
java.awt.Component canvas,
Theme style,
javax.swing.JFrame parent)
Constructor. |
|
| Method Summary | |
boolean |
back()
Scrolls the text behind one “screen”, also causes redraw. |
void |
draw()
Draws the Dialog. |
void |
draw(int x,
int y)
Draws the Dialog at the specified coordinates. |
void |
draw(int x1,
int y1,
int x2,
int y2)
Draws the Dialog at the specified coordinates. |
boolean |
forward()
Scrolls the text ahead one page, also causes redraw. |
java.awt.Component |
getCanvas()
Returns the canvas. |
java.lang.String |
getSelection(int index)
Returns the specified selection. |
java.lang.String[] |
getSelections()
Returns all the selections that will be displayed after the last page of text. |
Theme |
getStyle()
Returns the Theme for this Dialog. |
java.lang.String[] |
getText()
Returns the array of text to display. |
java.lang.String |
getText(int index)
Returns a single page of text. |
void |
hide()
Hides the Dialog. |
void |
onCancel()
Event called when the Dialog is closed. |
void |
onSelection(int index)
Event invoked when the player has confirmed a selection in the dialog. |
void |
setCanvas(java.awt.Component canvas)
Sets the canvas for this Dialog |
void |
setSelection(java.lang.String selection,
int index)
Sets the selection at the specified index. |
void |
setSelections(java.lang.String[] selections)
Sets the selections to present after the last page of text. |
void |
setStyle(Theme style)
Sets the Theme for this Dialog. |
void |
setText(java.lang.String[] text)
Sets the array of text to display. |
void |
setText(java.lang.String text,
int index)
Sets one page of text to display. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Dialog(java.lang.String[] text,
java.awt.Component canvas,
Theme style,
javax.swing.JFrame parent)
text - Array of text pages to display.canvas - Where to draw the Dialog.style - The Theme for the Dialog.parent - The parent frame for the Dialog.
public Dialog(java.lang.String[] text,
int x,
int y,
int x1,
int y1,
java.awt.Component canvas,
Theme style,
javax.swing.JFrame parent)
text - Array of text pages to display.x - Left coordinate.x1 - Right coordinate.y - Top coordinate.y1 - Bottom coordinate.canvas - Where to draw the Dialog.style - The Theme for the Dialog.parent - The parent frame for the Dialog.
public Dialog(java.lang.String[] text,
java.lang.String[] selections,
java.awt.Component canvas,
Theme style,
javax.swing.JFrame parent)
text - Array of text pages to display.selections - The selections to display after showing the last page of text.canvas - Where to draw the Dialog.style - The Theme for the Dialog.parent - The parent frame for the Dialog.
public Dialog(java.lang.String[] text,
java.lang.String[] selections,
int x,
int y,
int x1,
int y1,
java.awt.Component canvas,
Theme style,
javax.swing.JFrame parent)
text - Array of text pages to display.selections - The selections to display after showing the last page of text.x - Left coordinate.x1 - Right coordinate.y - Top coordinate.y1 - Bottom coordinate.canvas - Where to draw the Dialog.style - The Theme for the Dialog.parent - The parent frame for the Dialog.| Method Detail |
public void setText(java.lang.String[] text)
text - The array of text to display, each element in the array represents a page of text.
public void setText(java.lang.String text,
int index)
text - The new text to display.index - The page number to replace.public java.lang.String[] getText()
public java.lang.String getText(int index)
index - The page index to return.
public void setSelections(java.lang.String[] selections)
selections - An array of text selections.
public void setSelection(java.lang.String selection,
int index)
selection - The new selection to display.index - The index of the selection to replace.public java.lang.String[] getSelections()
public java.lang.String getSelection(int index)
index - The index of the selection to return.
public Theme getStyle()
public void setStyle(Theme style)
style - New Theme for the Dialog.public java.awt.Component getCanvas()
public void setCanvas(java.awt.Component canvas)
canvas - Where to the draw this Dialog.public boolean forward()
public boolean back()
public void hide()
public void onCancel()
public void onSelection(int index)
index - The index of the selection made (relative to the selections array).public void draw()
draw in interface Drawable
public void draw(int x,
int y)
draw in interface Drawablex - The left x cooridinate.y - The top y cooridinate.
public void draw(int x1,
int y1,
int x2,
int y2)
draw in interface Drawablex1 - The left x cooridinate.x2 - The right x cooridinate.y1 - The top y cooridinate.y2 - The bottom y cooridinate.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||