standup.clouds
Class CloudButtonWordClustered
java.lang.Object
standup.clouds.EntityAnimatedInteractive
standup.clouds.EntityAnimatedInteractiveBubbleLabel
standup.clouds.CloudButton
standup.clouds.CloudButtonWordClustered
- All Implemented Interfaces:
- Entity, EntityAnimated
public class CloudButtonWordClustered
- extends CloudButton
A CloudButton
that, when selected by the user, displays a set of
words, potentially clustered alphabetically to reduce the number of available
choices.
- Author:
- Ruli Manurung
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
wordFormClusters
private final Hashtable<String,LexemeSet> wordFormClusters
wordFormsList
private final List<String> wordFormsList
numberOfSegments
private final int numberOfSegments
message
private final CloudLabel message
logFileText
private final String logFileText
CloudButtonWordClustered
public CloudButtonWordClustered(CloudFrontend f,
CloudButton _parent,
CloudLabel _label,
CloudLabel _msg,
CloudLabel help,
Hashtable<String,LexemeSet> _wfc,
List<String> _wf)
- Constructor for displaying lexemeset clustered alphabetically
- Parameters:
_parent
- _label
- message
- lexemeSet
- segmentSize
-
getMaxChildrenDisplay
public int getMaxChildrenDisplay()
- Overrides:
getMaxChildrenDisplay
in class CloudButton
layoutCloudLabel
void layoutCloudLabel(FontRenderContext frc)
- Overrides:
layoutCloudLabel
in class CloudButton
executeClick
public Milestone executeClick()
- Description copied from class:
CloudButton
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.
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
allTheseStringsStartWith
private static boolean allTheseStringsStartWith(String prefix,
String[] strings)
calculateCommonPrefix
private static String calculateCommonPrefix(Set<String> strings)
getLogFileText
public String getLogFileText()
- Specified by:
getLogFileText
in class EntityAnimatedInteractive