Package
menu
Class MacaoAcceleratorController
Inherited from MacaoObject
Constructor Methods
A MacaoAcceleratorController can be added in addition to a MacaoSteeringController to a page, in order to display a steered
objects velocity. See the description of MacaoSteeringController on how to use the Accelerator Controller.
Constructor Summary |
MacaoAcceleratorController(String name, String title, integer left, integer top, String imageSource, number baseWidth, number baseHeight)
|
Method Summary |
number |
getSteeringVelocity()
Call this method to get the current velocity of the controlled object.
|
integer |
getTop0()
Call this method to get the y-coordinate of the top edge of the controller for the velocity 0.
|
void |
setSteeringController(String steeringControllerName)
Call this method to assign the Accelerator Controller to a Steering Controller.
|
void |
setTop0(integer top0)
Call this method to set the y-coordinate of the top edge for the velocity 0.
|
void |
setVelocityPosFactor(number velocityPosFactor)
Call this method to set the factor between the velocity of the controlled object and the y-coordinate of the Accelerator Controller.
|
Inherited Methods |
accelerate, addLookBunch, addTalkItem, adjustStacking, approachAndTryAction, approachObject, approachPos, assignRoadNode, bindToNet, calculateApproachPos, calculateStackingIndex, changeDirection, createTalkItem, getAnchorXPos, getAnchorYPos, getApproachable, getAssignedNode, getBunchPhase, getDirection, getLookDirection, getMaxVelocity, getMeetingObjectNames, getNearestNode, getNetType, getResponsesSenderName, getResponseTalkItems, getReverseGear, getVelocity, hearEvent, hearFreeText, isMeetingObject, isWalking, leave, mayILeaveNode, meet, moveAnchorTo, moveToNode, onClickOther, onClickWindow, restore, setAnchorAtBottom, setApproachable, setApproachClick, setAssignedNode, setAutoAcceleration, setAutoRestore, setBunchDepth, setBunchPhase, setCollisionBreak, setDirection, setDisableApproach, setPreferredLook, setRandomTalk, setReverseGear, setStacking, setSteeringIndex, setTalkCssClassName, setVelocity, setWalkCharacteristics, setWalkPhases, startAutoAcceleration, steeredVelocityChanged, stopWalking, store, tryAction, walkToNode, walkToPos, wanderAroundactivateDrag, 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 |
MacaoAcceleratorController(String name, String title, integer left, integer top, String imageSource, number baseWidth, number baseHeight)
Parameters
name: Provide a unique name for the Steering Controller. The examples are using the name "AcceleratorController".
title: Provide the text, which will be displayed as tool tip over the controller. Provide null, if you don't want a tool tip to be
displayed.
The title is automatically added to the resources and received from the resources. The object name is used as the resource
item name. See also MacaoPage.getResource().
left: Provide the x-coordinate of the left edge of the controller in pixels relative to the page.
top: Provide the y-coordinate of the top edge of the controller in pixels relative to the page. This will be the position of the
top edge for the velocity 0. Any higher velocity will move the accelerator up.
imageSource: Provide the URL of the image, which is used to display the Accelerator Controller. The URL has to be relative to the base
path. See getBasePath().
baseWidth: Provide the width of the image in pixels. You can provide a different value than the images real width to resize the image
by default. Provide null, if you don't specify an imageSource.
baseHeight: Provide the height of the image in pixels. You can provide a different value than the images real height to resize the image
by default.
number getSteeringVelocity()
integer getTop0()
void setSteeringController(String steeringControllerName)
Call this method to assign the Accelerator Controller to a Steering Controller.
Commands from the Accelerator Controller to the controlled object are routed via the Steering Controller.
Parameters
steeringControllerName: Provide the name of the Steering Controller.
void setTop0(integer top0)
void setVelocityPosFactor(number velocityPosFactor)
Call this method to set the factor between the velocity of the controlled object and the y-coordinate of the Accelerator Controller.
The default value is 3.0.
Parameters
velocityPosFactor: Provide the factor between the velocity of the controlled object and the y-coordinate of the Accelerator Controller.