Package kernel

Class MacaoBubble

Inherited from MacaoObject

Constructor   Methods

The class MacaoBubble is used to display bubbles for objects as popups. When loading the package core/kernel.js into a page, there is automatically created one invisible object of the class MacaoBubble. This bubble has the object name "Bubble".

When you let an object say something by calling the method say() or by using the talk funcitonality (see addTalkItem()), the bubble is moved to the object and is made visible, showing the text, image or html. When the bubble is already saying something for another object, the content will be buffered as a MacaoBubbleItem. After the previous contents are displayed, the new buffered content will be displayed.

The one MacaoBubble is also be used to show popus (see showPopup()). Popups are buffered like other bubbles. The only difference is, that a popup is positioned in the centre of the visible client area of the frame.
The duration of the display of a bubble can be provided when opening the bubble. Or it can be calculated automatically by the length of the text, which is to be displayed. You can call setSpeedFactor() to modify the factor between text length and duration. You can also let the bubble stay open, until you send it a clear() event.

See also say(), addTalkItem(), showPopup().

Constructor Summary
MacaoBubble(String name)
     The class MacaoBubble is used to display bubbles for objects as popups. When loading the package core/kernel.js into a page, there is automatically created one invisible object of the class MacaoBubble. This bubble has the object name "Bubble".

Method Summary
void clear()
     Call this method to end the display of the current message and start the display of the next message.
void display(String targetObjectName, String text, optional String html, optional String imageSource, optional integer imageWidth, optional integer imageHeight, optional integer duration, optional String afterEventType, optional Array afterEventParams, optional String cssClassName, optional String lookName)
     Call this method to initiate the display of a message or image by the bubble.
number getSpeedFactor()
     Use this method to get the current factor, which is used to calculate the display duration from the text length.
void setSpeedFactor(number speedFactor)
     Use this method to change the factor, which is used to calculate the display duration by the length of the text.

Inherited Methods
activateDrag, activateDrop, addController, broadcastEvent, createLayer, createLook, displayMeasures, getActualLook, getCollisionCheck, getCssClassName, getFrameName, getHeight, getLayer, getLeft, getLook, getName, getTitle, getTop, getType, getVisibility, getWidth, getZIndex, getZoom, hasLook, initObject, isController, isDragActive, isDragged, isDropActive, isDropAllowed, moveTo, moveToCenter, notifyControllers, onClick, onClickOther, onClickOtherItem, onClickWindow, onCollisionOut, onCollisionOver, onDblClick, onDblClickOther, onDblClickWindow, onDragEnd, onDragOut, onDragOver, onDragStart, onDrop, onKeyDown, onKeyPress, onKeyUp, onLoad, onMouseDown, onMouseDownWindow, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onMouseUpWindow, onUnload, openPage, postEvent, refreshZoom, removeController, removeObject, say, scrollVisible, sendEvent, setActualLook, setBaseSize, setCollisionCheck, setCssClassName, setForwardMouseEvents, setHTML, setImage, setScrollVisibleOptions, setTitle, setToolTip, setType, setVisibility, setZIndex, setZoom, toBack, toFront

Constructor Details
MacaoBubble(String name)

Method Details
void clear()

void display(String targetObjectName, String text, optional String html, optional String imageSource, optional integer imageWidth, optional integer imageHeight, optional integer duration, optional String afterEventType, optional Array afterEventParams, optional String cssClassName, optional String lookName)

number getSpeedFactor()

void setSpeedFactor(number speedFactor)