standup.clouds
Class CloudButtonNewJoke

java.lang.Object
  extended by standup.clouds.EntityAnimatedInteractive
      extended by standup.clouds.EntityAnimatedInteractiveBubbleLabel
          extended by standup.clouds.CloudButton
              extended by standup.clouds.CloudButtonNewJoke
All Implemented Interfaces:
Entity, EntityAnimated
Direct Known Subclasses:
CloudButtonNewJokeAny, CloudButtonNewJokeLexeme, CloudButtonNewJokeTopic, CloudButtonNewJokeType, CloudButtonNewJokeWord

public abstract class CloudButtonNewJoke
extends CloudButton

A CloudButton that, when selected by the user, calls the Backend to get a new joke that satisfies the current user profile's joke constraints.

Author:
Ruli Manurung

Nested Class Summary
 
Nested classes/interfaces inherited from class standup.clouds.CloudButton
CloudButton.LineMode
 
Field Summary
(package private)  JokeStructure joke
           
 
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
CloudButtonNewJoke(CloudFrontend f, CloudButton p, CloudLabel bl)
           
 
Method Summary
 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) abstract  CloudButtonNewJoke getAnotherLubbleNewJoke()
           
(package private) abstract  JokeStructure getJokeStructure()
           
(package private) abstract  CloudButtonOldJokes getLubbleOldJokes()
           
(package private)  void showMessage(CloudLabel message)
          Animate the display of this CloudButton's message.
(package private)  void showMessage(CloudLabel message, AnimatorLock al)
          Animate the display of this CloudButton's message using the given AnimatorLock.
 
Methods inherited from class standup.clouds.CloudButton
clicked, getCentreChild, getCentreSize, getMaxChildrenDisplay, getMessage, getOffsetAngle, getParent, getPeripheralChildren, getRingSize, layoutCloudLabel, prepareForAnimation, removeChild, setCentreChild, setLocation, setMessage, setPeripheralChildren, setSize, step
 
Methods inherited from class standup.clouds.EntityAnimatedInteractiveBubbleLabel
contains, draw, getBubbleLabel, getCurrentDimension, getCurrentLocation, getSpeechText
 
Methods inherited from class standup.clouds.EntityAnimatedInteractive
dehighlight, getHelpText, getLogFileText, highlight, isHighlighted, speakSpeechText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

joke

JokeStructure joke
Constructor Detail

CloudButtonNewJoke

public CloudButtonNewJoke(CloudFrontend f,
                          CloudButton p,
                          CloudLabel bl)
Method Detail

getJokeStructure

abstract JokeStructure getJokeStructure()

getAnotherLubbleNewJoke

abstract CloudButtonNewJoke getAnotherLubbleNewJoke()

getLubbleOldJokes

abstract CloudButtonOldJokes getLubbleOldJokes()

showMessage

void showMessage(CloudLabel message,
                 AnimatorLock al)
Description copied from class: CloudButton
Animate the display of this CloudButton's message using the given AnimatorLock. Override this to call PanelMessageWindow.showJoke(CloudLabel, AnimatorLock) if the message is a joke!

Overrides:
showMessage in class CloudButton
Parameters:
message - The message to be displayed
al - The object that controls animation synchronization

showMessage

void showMessage(CloudLabel message)
Description copied from class: CloudButton
Animate the display of this CloudButton's message. Override this to call PanelMessageWindow.showJoke(CloudLabel) if the message is a joke!

Overrides:
showMessage in class CloudButton
Parameters:
message - The message to be displayed

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: