|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object standup.clouds.EntityAnimatedInteractive standup.clouds.EntityAnimatedInteractiveBubbleLabel standup.clouds.CloudButton
public abstract class CloudButton
A CloudButton
is a GUI button that appears inside a
PanelCloudButtonMenu
, i.e. the main interaction display in STANDUP.
It can also be thought of abstractly as a node in a tree that defines the
menu choices presented to the user. A CloudButton
has a number of
child CloudButton
s, which can either be peripheral children
(appearing laid out in a radial fashion), or a centre child, appearing in the
centre of the screen.
When a CloudButton
is selected by the user, the
executeClick()
method is called.
Nested Class Summary | |
---|---|
static class |
CloudButton.LineMode
|
Field Summary | |
---|---|
private AnimatorCloudButton |
animator
|
private CloudButton |
centreChild
centreChild is the option that appears in the centre of the bubblebrowser. |
protected CloudLabel |
message
|
private CloudButton |
parent
Get this Lubble's parent, i.e. |
private List<? extends CloudButton> |
peripheralChildren
peripheralChildren are the option that appears at the periphery of the bubblebrowser. |
(package private) PanelProgressMap.ProgressMapStage |
progressMapStage
|
Fields inherited from class standup.clouds.EntityAnimatedInteractiveBubbleLabel |
---|
bubbleLabel, cloudLabelLayout, myShape |
Fields inherited from class standup.clouds.EntityAnimatedInteractive |
---|
containingPanel, frontend |
Constructor Summary | |
---|---|
CloudButton(CloudFrontend _frontend,
CloudButton _parent,
CloudLabel _label,
CloudLabel _message,
CloudLabel _help)
METHODS |
|
CloudButton(CloudFrontend f,
CloudButton p,
CloudLabel bl,
CloudLabel msg,
CloudLabel help,
PanelProgressMap.ProgressMapStage pmn)
Constructor method for a Lubble. |
Method Summary | |
---|---|
void |
clicked()
AnimatedEntityInteractive methods |
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. |
CloudButton |
getCentreChild()
|
Dimension |
getCentreSize(Dimension bubbleBrowserDimension)
This method returns the Dimension that determines the size of this Lubble in the BubbleBrowser when it is a centre child. |
int |
getMaxChildrenDisplay()
|
CloudLabel |
getMessage()
Returns this CloudButton 's message to be displayed in the
MessageWindow . |
int |
getOffsetAngle()
|
CloudButton |
getParent()
|
List<? extends CloudButton> |
getPeripheralChildren()
|
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) void |
layoutCloudLabel(FontRenderContext frc)
|
void |
prepareForAnimation(AnimatorCloudButton _a,
PanelCloudButtonMenu bb)
|
(package private) boolean |
removeChild(CloudButton orphan)
This method removes a Lubble from this Lubble's children, whether central or peripheral... |
void |
setCentreChild(CloudButton centreChild)
|
(package private) void |
setLocation(Point newCentre)
Set this CloudButton 's location. |
void |
setMessage(CloudLabel msg)
Set this CloudButton 's message to be displayed in the
MessageWindow . |
void |
setPeripheralChildren(List<? extends CloudButton> peripheralChildren)
Set this CloudButton 's peripheral children, i.e. |
(package private) void |
setSize(Dimension newDimension)
Set this CloudButton 's size. |
(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 . |
void |
step(int frame)
Notify the AnimatorCloudButton to update this CloudButton 's
size and position. |
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 |
---|
private AnimatorCloudButton animator
private final CloudButton parent
private CloudButton centreChild
private List<? extends CloudButton> peripheralChildren
protected CloudLabel message
PanelProgressMap.ProgressMapStage progressMapStage
Constructor Detail |
---|
public CloudButton(CloudFrontend _frontend, CloudButton _parent, CloudLabel _label, CloudLabel _message, CloudLabel _help)
_f
- _a
- _t
- _lineMode
- _i
- bb
- public CloudButton(CloudFrontend f, CloudButton p, CloudLabel bl, CloudLabel msg, CloudLabel help, PanelProgressMap.ProgressMapStage pmn)
f
- Frontendp
- This Lubble's parentbl
- BubbleLabel displayed on this Lubblemsg
- BubbleLabel to display in the MessageWindow -- set to null if
not requiredpmn
- ProgressMapStage that this Lubble leads towardsMethod Detail |
---|
public void clicked()
clicked
in class EntityAnimatedInteractive
public Milestone executeClick()
This is the default action that is performed when a CloudButton
is clicked, i.e.:
Milestone
representing the user's interaction
choice.
public CloudButton getCentreChild()
public Dimension getCentreSize(Dimension bubbleBrowserDimension)
bubbleBrowserDimension
- The Dimension of the BubbleBrowser this Lubble appears in
public int getMaxChildrenDisplay()
public int getOffsetAngle()
public CloudButton getParent()
public List<? extends CloudButton> getPeripheralChildren()
public Dimension getRingSize(Dimension bubbleBrowserDimension)
bubbleBrowserDimension
- The Dimension of the BubbleBrowser this Lubble appears in
boolean removeChild(CloudButton orphan)
orphan
-
public void setCentreChild(CloudButton centreChild)
public void setPeripheralChildren(List<? extends CloudButton> peripheralChildren)
CloudButton
's peripheral children, i.e. a list of
CloudButton
s to be displayed in a circle.
peripheralChildren
- public void step(int frame)
AnimatorCloudButton
to update this CloudButton
's
size and position.
void setSize(Dimension newDimension)
CloudButton
's size.
newDimension
- the new size of this CloudButton
.void setLocation(Point newCentre)
CloudButton
's location.
newCentre
- the new location of this CloudButton
.public void prepareForAnimation(AnimatorCloudButton _a, PanelCloudButtonMenu bb)
public CloudLabel getMessage()
CloudButton
's message to be displayed in the
MessageWindow
.
public void setMessage(CloudLabel msg)
CloudButton
's message to be displayed in the
MessageWindow
.
msg
- void showMessage(CloudLabel message)
CloudButton
's message. Override this
to call PanelMessageWindow.showJoke(CloudLabel)
if the message is
a joke!
message
- The message to be displayedvoid showMessage(CloudLabel message, AnimatorLock al)
CloudButton
's message using the
given AnimatorLock
. Override this to call
PanelMessageWindow.showJoke(CloudLabel, AnimatorLock)
if the
message is a joke!
message
- The message to be displayedal
- The object that controls animation synchronizationvoid layoutCloudLabel(FontRenderContext frc)
layoutCloudLabel
in class EntityAnimatedInteractiveBubbleLabel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |