standup.clouds
Class CloudButtonWordTrie

java.lang.Object
  extended by standup.clouds.EntityAnimatedInteractive
      extended by standup.clouds.EntityAnimatedInteractiveBubbleLabel
          extended by standup.clouds.CloudButton
              extended by standup.clouds.CloudButtonWordTrie
All Implemented Interfaces:
Entity, EntityAnimated
Direct Known Subclasses:
CloudButtonWordTrieClustered

public class CloudButtonWordTrie
extends CloudButton

A CloudButton that, when selected by the user, displays a choice of subsequent letters (or complete words) in spelling a word.

Author:
Ruli Manurung

Nested Class Summary
 
Nested classes/interfaces inherited from class standup.clouds.CloudButton
CloudButton.LineMode
 
Field Summary
(package private)  WordTrie wordTrie
           
 
Fields inherited from class standup.clouds.CloudButton
message, progressMapStage
 
Fields inherited from class standup.clouds.EntityAnimatedInteractiveBubbleLabel
bubbleLabel, cloudLabelLayout, myShape
 
Fields inherited from class standup.clouds.EntityAnimatedInteractive
containingPanel, frontend
 
Constructor Summary
CloudButtonWordTrie(CloudFrontend f, CloudButton _parent, CloudLabel _label, CloudLabel _help, WordTrie _wt)
          Constructor for displaying a lexemeset using 'adaptive' spelling
 
Method Summary
(package private)  CloudLabel constructMessageLabel()
           
(package private)  List<CloudButton> constructPeripheralChildren()
           
 Milestone executeClick()
           This is the default action that is performed when a CloudButton is clicked, i.e.: Perform the appropriate animations: 'shrink' siblings, move to centre, 'grow' children, and Update progress map if necessary, and Return a Milestone representing the user's interaction choice.
(package private) static CloudLabel getChildBubbleLabel(String prefix, String kidsPrefix)
           
(package private) static CloudButton getLexemeSetLubbleDependingOnChooseSpecificLexemes(CloudFrontend frontend, CloudButton parent, boolean chooseSpecificLexemes, LexemeSet lxs, String prefix)
           
 String getLogFileText()
           
 int getMaxChildrenDisplay()
           
 Dimension getRingSize(Dimension bubbleBrowserDimension)
          This method returns the Dimension that determines the size of this Lubble in the BubbleBrowser when it is a peripheral child.
(package private)  boolean hasLexemeSetChild()
           
(package private)  boolean hasNonLexemeSetChild()
           
(package private)  void layoutCloudLabel(FontRenderContext g2)
           
 
Methods inherited from class standup.clouds.CloudButton
clicked, getCentreChild, getCentreSize, getMessage, getOffsetAngle, getParent, getPeripheralChildren, prepareForAnimation, removeChild, setCentreChild, setLocation, setMessage, setPeripheralChildren, setSize, showMessage, showMessage, step
 
Methods inherited from class standup.clouds.EntityAnimatedInteractiveBubbleLabel
contains, draw, getBubbleLabel, getCurrentDimension, getCurrentLocation, getSpeechText
 
Methods inherited from class standup.clouds.EntityAnimatedInteractive
dehighlight, getHelpText, highlight, isHighlighted, speakSpeechText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wordTrie

final WordTrie wordTrie
Constructor Detail

CloudButtonWordTrie

public CloudButtonWordTrie(CloudFrontend f,
                           CloudButton _parent,
                           CloudLabel _label,
                           CloudLabel _help,
                           WordTrie _wt)
Constructor for displaying a lexemeset using 'adaptive' spelling

Parameters:
_parent -
_label -
message -
lexemeSet -
segmentSize -
Method Detail

getLogFileText

public String getLogFileText()
Specified by:
getLogFileText in class EntityAnimatedInteractive

getMaxChildrenDisplay

public int getMaxChildrenDisplay()
Overrides:
getMaxChildrenDisplay in class CloudButton

layoutCloudLabel

void layoutCloudLabel(FontRenderContext g2)
Overrides:
layoutCloudLabel in class CloudButton

getLexemeSetLubbleDependingOnChooseSpecificLexemes

static CloudButton getLexemeSetLubbleDependingOnChooseSpecificLexemes(CloudFrontend frontend,
                                                                      CloudButton parent,
                                                                      boolean chooseSpecificLexemes,
                                                                      LexemeSet lxs,
                                                                      String prefix)

getChildBubbleLabel

static CloudLabel getChildBubbleLabel(String prefix,
                                      String kidsPrefix)

constructMessageLabel

CloudLabel constructMessageLabel()

hasLexemeSetChild

boolean hasLexemeSetChild()

hasNonLexemeSetChild

boolean hasNonLexemeSetChild()

constructPeripheralChildren

List<CloudButton> constructPeripheralChildren()

executeClick

public Milestone executeClick()
Description copied from class: CloudButton

This is the default action that is performed when a CloudButton is clicked, i.e.:

Override this method if: -- you want this Lubble to perform other things when first clicked, e.g. joke generation (make sure to call super.getMilestone to return the Milestone!) -- you just want to perform some stuff that doesn't end up as a Milestone on the HistoryCoordinator (make sure to return null)

Overrides:
executeClick in class CloudButton
Returns:

getRingSize

public Dimension getRingSize(Dimension bubbleBrowserDimension)
Description copied from class: CloudButton
This method returns the Dimension that determines the size of this Lubble in the BubbleBrowser when it is a peripheral child. Since the BubbleBrowser window size itself is a factor, it is passed as a parameter here.

Overrides:
getRingSize in class CloudButton
Parameters:
bubbleBrowserDimension - The Dimension of the BubbleBrowser this Lubble appears in
Returns:
The Dimension of this Lubble when appearing on the BubbleBrowser peripheral ring/ellipse