Package ruscz.game.gameOfProd.Dialog
Class Dialog
- java.lang.Object
-
- ruscz.game.gameOfProd.Dialog.Dialog
-
public class Dialog extends java.lang.ObjectClass for showing text on Dialog Bar
-
-
Field Summary
Fields Modifier and Type Field Description private DialogBardialogBarprivate intcharNumberprivate ImageDialogimageDialogprivate SoundManagersoundManagerprivate java.lang.Stringtextprivate inttextLengthprivate javax.swing.Timertimerprivate booleantimerIsRunningprivate java.lang.Stringvoiceprivate booleanvoiceover
-
Method Summary
Modifier and Type Method Description SoundManagergetSoundManager()booleangetTimerIsRunning()voidhideText()Hide text from Dialog Barjavax.swing.JLabelprepareDialogBar(java.lang.String string)Takes String of Text and prepare JLabel with all settings neededvoidsetImageDialog(ImageDialog imageDialog)voidsetText(java.lang.String text)voidsetVoice(java.lang.String voice)voidsetVoiceover(boolean voiceover)private voidshowByChar()Function, that add next symbol from text to DialogBar Stop timer of adding symbols, if full text is showedvoidshowFastText()Showing block of text with fast changing of text (while, not Timer)voidshowText()Showing DialogBar with animation of adding symbolvoidskipShowText()Skip for animation of symbolsvoidunsetImageDialog()
-
-
-
Field Detail
-
text
private java.lang.String text
-
textLength
private int textLength
-
imageDialog
private ImageDialog imageDialog
-
timer
private javax.swing.Timer timer
-
dialogBar
private final DialogBar dialogBar
-
charNumber
private int charNumber
-
timerIsRunning
private boolean timerIsRunning
-
soundManager
private final SoundManager soundManager
-
voice
private java.lang.String voice
-
voiceover
private boolean voiceover
-
-
Constructor Detail
-
Dialog
public Dialog(DialogBar dialogBar)
-
-
Method Detail
-
prepareDialogBar
public javax.swing.JLabel prepareDialogBar(java.lang.String string)
Takes String of Text and prepare JLabel with all settings needed- Parameters:
string- Text to show- Returns:
- JLabel with text
-
showByChar
private void showByChar()
Function, that add next symbol from text to DialogBar Stop timer of adding symbols, if full text is showed
-
showText
public void showText()
Showing DialogBar with animation of adding symbol
-
showFastText
public void showFastText()
Showing block of text with fast changing of text (while, not Timer)
-
skipShowText
public void skipShowText()
Skip for animation of symbols
-
hideText
public void hideText()
Hide text from Dialog Bar
-
setText
public void setText(java.lang.String text)
-
setImageDialog
public void setImageDialog(ImageDialog imageDialog)
-
unsetImageDialog
public void unsetImageDialog()
-
getTimerIsRunning
public boolean getTimerIsRunning()
-
setVoice
public void setVoice(java.lang.String voice)
-
getSoundManager
public SoundManager getSoundManager()
-
setVoiceover
public void setVoiceover(boolean voiceover)
-
-