How to use getter method in autotest

Best Python code snippet using autotest_python

jsb_property_apis.js

Source:jsb_property_apis.js Github

copy

Full Screen

1/*2 * Copyright (c) 2014 Chukong Technologies Inc.3 *4 * Permission is hereby granted, free of charge, to any person obtaining a copy5 * of this software and associated documentation files (the "Software"), to deal6 * in the Software without restriction, including without limitation the rights7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell8 * copies of the Software, and to permit persons to whom the Software is9 * furnished to do so, subject to the following conditions:10 *11 * The above copyright notice and this permission notice shall be included in12 * all copies or substantial portions of the Software.13 *14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN20 * THE SOFTWARE.21 */22/**23 * <p>Properties configuration function </br>24 * All properties in attrs will be set to the node, </br>25 * when the setter of the node is available, </br>26 * the property will be set via setter function.</br>27 * </p>28 * @param {Object} attrs Properties to be set to node29 */30cc.Node.prototype.attr = function(attrs) {31 for(var key in attrs) {32 this[key] = attrs[key];33 }34};35var _proto = cc.Action.prototype;36cc.defineGetterSetter(_proto, "tag", _proto.getTag, _proto.setTag);37// Overrides38_proto = cc.AtlasNode.prototype;39cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);40cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);41cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);42_proto = cc.LabelTTF.prototype;43cc.defineGetterSetter(_proto, "size", _proto.getContentSize, _proto.setContentSize);44cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);45cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);46_proto = cc.LayerColor.prototype;47cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);48cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);49cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);50cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);51cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);52_proto = cc.LayerGradient.prototype;53cc.defineGetterSetter(_proto, "size", _proto.getContentSize, _proto.setContentSize);54cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);55cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);56_proto = cc.Sprite.prototype;57cc.defineGetterSetter(_proto, "ignoreAnchor", _proto.isIgnoreAnchorPointForPosition, _proto.ignoreAnchorPointForPosition);58_proto = cc.LabelAtlas.prototype;59cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);60_proto = cc.LabelBMFont.prototype;61cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);62cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);63cc.defineGetterSetter(_proto, "scale", _proto.getScale, _proto.setScale);64cc.defineGetterSetter(_proto, "scaleX", _proto.getScaleX, _proto.setScaleX);65cc.defineGetterSetter(_proto, "scaleY", _proto.getScaleY, _proto.setScaleY);66cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);67cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);68cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);69cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);70cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);71_proto = cc.Menu.prototype;72cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);73cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);74cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);75cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);76cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);77_proto = cc.MenuItem.prototype;78cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);79cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);80cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);81cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);82cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);83_proto = cc.MotionStreak.prototype;84cc.defineGetterSetter(_proto, "x", _proto.getPositionX, _proto.setPositionX);85cc.defineGetterSetter(_proto, "y", _proto.getPositionY, _proto.setPositionY);86cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);87cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);88cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);89cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);90cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);91_proto = cc.ParticleSystem.prototype;92cc.defineGetterSetter(_proto, "rotation", _proto.getRotation, _proto.setRotation);93cc.defineGetterSetter(_proto, "scale", _proto.getScale, _proto.setScale);94cc.defineGetterSetter(_proto, "scaleX", _proto.getScaleX, _proto.setScaleX);95cc.defineGetterSetter(_proto, "scaleY", _proto.getScaleY, _proto.setScaleY);96_proto = cc.PhysicsSprite.prototype;97cc.defineGetterSetter(_proto, "body", _proto.getBody, _proto.setBody);98cc.defineGetterSetter(_proto, "x", _proto.getPositionX, _proto.setPositionX);99cc.defineGetterSetter(_proto, "y", _proto.getPositionY, _proto.setPositionY);100cc.defineGetterSetter(_proto, "rotation", _proto.getRotation, _proto.setRotation);101cc.defineGetterSetter(_proto, "dirty", _proto.isDirty, _proto.setDirty);102_proto = cc.ProgressTimer.prototype;103cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);104cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);105cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);106_proto = cc.TextFieldTTF.prototype;107cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);108_proto = ccs.Bone.prototype;109cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);110cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);111cc.defineGetterSetter(_proto, "zIndex", _proto.getLocalZOrder, _proto.setLocalZOrder);112_proto = ccui.Widget.prototype;113cc.defineGetterSetter(_proto, "x", _proto.getPositionX, _proto.setPositionX);114cc.defineGetterSetter(_proto, "y", _proto.getPositionY, _proto.setPositionY);115cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);116cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);117cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX);118cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY);119cc.defineGetterSetter(_proto, "children", _proto.getChildren);120cc.defineGetterSetter(_proto, "childrenCount", _proto.getChildrenCount);121_proto = ccui.ScrollView.prototype;122cc.defineGetterSetter(_proto, "children", _proto.getChildren);123cc.defineGetterSetter(_proto, "childrenCount", _proto.getChildrenCount);124cc.defineGetterSetter(_proto, "layoutType", _proto.getLayoutType, _proto.setLayoutType);125_proto = ccui.Button.prototype;126cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);127cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);128cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX);129cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY);130cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);131_proto = ccui.CheckBox.prototype;132cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);133cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);134cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX);135cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY);136cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);137cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);138_proto = ccui.ImageView.prototype;139cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);140cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);141cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX);142cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY);143cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);144cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);145_proto = ccui.Text.prototype;146cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);147cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);148cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);149cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);150cc.defineGetterSetter(_proto, "scaleX", _proto.getScaleX, _proto.setScaleX);151cc.defineGetterSetter(_proto, "scaleY", _proto.getScaleY, _proto.setScaleY);152cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX);153cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY);154_proto = ccui.TextAtlas.prototype;155cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);156cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);157cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);158cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);159_proto = ccui.TextBMFont.prototype;160cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);161cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);162cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);163cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);164_proto = ccui.LoadingBar.prototype;165cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);166cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);167_proto = ccui.Slider.prototype;168cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);169cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);170_proto = ccui.TextField.prototype;171cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);172cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);173cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);174cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);175_proto = cc.Control.prototype;176cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);177_proto = cc.ControlButton.prototype;178cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);179cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);180_proto = cc.ControlColourPicker.prototype;181cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);182cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);183_proto = cc.ControlHuePicker.prototype;184cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);185_proto = cc.ControlPotentiometer.prototype;186cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);187_proto = cc.ControlSaturationBrightnessPicker.prototype;188cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);189_proto = cc.ControlSlider.prototype;190cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);191_proto = cc.ControlSwitch.prototype;192cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);193_proto = cc.Scale9Sprite.prototype;194cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);195cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);196cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);197cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);198cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);199_proto = cc.ScrollView.prototype;200cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);201cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);202// Extends203var _proto = cc.ClippingNode.prototype;204cc.defineGetterSetter(_proto, "alphaThreshold", _proto.getAlphaThreshold, _proto.setAlphaThreshold);205cc.defineGetterSetter(_proto, "inverted", _proto.getInverted, _proto.setInverted);206cc.defineGetterSetter(_proto, "stencil", _proto.getStencil, _proto.setStencil);207_proto = cc.AtlasNode.prototype;208cc.defineGetterSetter(_proto, "texture", _proto.getTexture, _proto.setTexture);209cc.defineGetterSetter(_proto, "textureAtlas", _proto.getTextureAtlas, _proto.setTextureAtlas);210cc.defineGetterSetter(_proto, "quadsToDraw", _proto.getQuadsToDraw, _proto.setQuadsToDraw);211_proto = cc.Node.prototype;212cc.defineGetterSetter(_proto, "x", _proto.getPositionX, _proto.setPositionX);213cc.defineGetterSetter(_proto, "y", _proto.getPositionY, _proto.setPositionY);214cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);215cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);216cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);217cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);218cc.defineGetterSetter(_proto, "skewX", _proto.getSkewX, _proto.setSkewX);219cc.defineGetterSetter(_proto, "skewY", _proto.getSkewY, _proto.setSkewY);220cc.defineGetterSetter(_proto, "zIndex", _proto.getLocalZOrder, _proto.setLocalZOrder);221cc.defineGetterSetter(_proto, "vertexZ", _proto.getVertexZ, _proto.setVertexZ);222cc.defineGetterSetter(_proto, "rotation", _proto.getRotation, _proto.setRotation);223cc.defineGetterSetter(_proto, "rotationX", _proto.getRotationX, _proto.setRotationX);224cc.defineGetterSetter(_proto, "rotationY", _proto.getRotationY, _proto.setRotationY);225cc.defineGetterSetter(_proto, "scale", _proto.getScale, _proto.setScale);226cc.defineGetterSetter(_proto, "scaleX", _proto.getScaleX, _proto.setScaleX);227cc.defineGetterSetter(_proto, "scaleY", _proto.getScaleY, _proto.setScaleY);228cc.defineGetterSetter(_proto, "children", _proto.getChildren);229cc.defineGetterSetter(_proto, "childrenCount", _proto.getChildrenCount);230cc.defineGetterSetter(_proto, "parent", _proto.getParent, _proto.setParent);231cc.defineGetterSetter(_proto, "visible", _proto.isVisible, _proto.setVisible);232cc.defineGetterSetter(_proto, "running", _proto.isRunning);233cc.defineGetterSetter(_proto, "ignoreAnchor", _proto.isIgnoreAnchorPointForPosition, _proto.ignoreAnchorPointForPosition);234cc.defineGetterSetter(_proto, "actionManager", _proto.getActionManager, _proto.setActionManager);235cc.defineGetterSetter(_proto, "scheduler", _proto.getScheduler, _proto.setScheduler);236cc.defineGetterSetter(_proto, "shaderProgram", _proto.getShaderProgram, _proto.setShaderProgram);237cc.defineGetterSetter(_proto, "glServerState", _proto.getGLServerState, _proto.setGLServerState);238cc.defineGetterSetter(_proto, "tag", _proto.getTag, _proto.setTag);239cc.defineGetterSetter(_proto, "userData", _proto.getUserData, _proto.setUserData);240cc.defineGetterSetter(_proto, "userObject", _proto.getUserObject, _proto.setUserObject);241cc.defineGetterSetter(_proto, "arrivalOrder", _proto.getArrivalOrder, _proto.setArrivalOrder);242_proto = cc.NodeRGBA.prototype;243cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);244cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);245cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);246cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);247cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);248_proto = cc.LabelTTF.prototype;249cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);250cc.defineGetterSetter(_proto, "textAlign", _proto.getHorizontalAlignment, _proto.setHorizontalAlignment);251cc.defineGetterSetter(_proto, "verticalAlign", _proto.getVerticalAlignment, _proto.setVerticalAlignment);252cc.defineGetterSetter(_proto, "fontSize", _proto.getFontSize, _proto.setFontSize);253cc.defineGetterSetter(_proto, "fontName", _proto.getFontName, _proto.setFontName);254cc.defineGetterSetter(_proto, "font", _proto._getFont, _proto._setFont);255cc.defineGetterSetter(_proto, "boundingWidth", _proto._getBoundingWidth, _proto._setBoundingWidth);256cc.defineGetterSetter(_proto, "boundingHeight", _proto._getBoundingHeight, _proto._setBoundingHeight);257cc.defineGetterSetter(_proto, "fillStyle", _proto._getFillStyle, _proto.setFontFillColor);258cc.defineGetterSetter(_proto, "strokeStyle", _proto._getStrokeStyle, _proto._setStrokeStyle);259cc.defineGetterSetter(_proto, "lineWidth", _proto._getLineWidth, _proto._setLineWidth);260cc.defineGetterSetter(_proto, "shadowOffsetX", _proto._getShadowOffsetX, _proto._setShadowOffsetX);261cc.defineGetterSetter(_proto, "shadowOffsetY", _proto._getShadowOffsetY, _proto._setShadowOffsetY);262cc.defineGetterSetter(_proto, "shadowOpacity", _proto._getShadowOpacity, _proto._setShadowOpacity);263cc.defineGetterSetter(_proto, "shadowBlur", _proto._getShadowBlur, _proto._setShadowBlur);264cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);265cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);266cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);267cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);268cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);269_proto = cc.LayerRGBA.prototype;270cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);271cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);272cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);273cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);274cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);275_proto = cc.LayerColor.prototype;276cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);277cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);278cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);279cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);280cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);281cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);282cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);283_proto = cc.LayerGradient.prototype;284cc.defineGetterSetter(_proto, "startColor", _proto.getStartColor, _proto.setStartColor);285cc.defineGetterSetter(_proto, "endColor", _proto.getEndColor, _proto.setEndColor);286cc.defineGetterSetter(_proto, "startOpacity", _proto.getStartOpacity, _proto.setStartOpacity);287cc.defineGetterSetter(_proto, "endOpacity", _proto.getEndOpacity, _proto.setEndOpacity);288cc.defineGetterSetter(_proto, "vector", _proto.getVector, _proto.setVector);289cc.defineGetterSetter(_proto, "compresseInterpolation", _proto.isCompressedInterpolation, _proto.setCompressedInterpolation);290cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);291cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);292cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);293cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);294cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);295_proto = cc.Sprite.prototype;296cc.defineGetterSetter(_proto, "dirty", _proto.getDirty, _proto.setDirty);297cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX);298cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY);299cc.defineGetterSetter(_proto, "offsetX", _proto._getOffsetX);300cc.defineGetterSetter(_proto, "offsetY", _proto._getOffsetY);301cc.defineGetterSetter(_proto, "atlasIndex", _proto.getAtlasIndex, _proto.setAtlasIndex);302cc.defineGetterSetter(_proto, "texture", _proto.getTexture, _proto.setTexture);303cc.defineGetterSetter(_proto, "textureRectRotated", _proto.isTextureRectRotated);304cc.defineGetterSetter(_proto, "textureAtlas", _proto.getTextureAtlas, _proto.setTextureAtlas);305cc.defineGetterSetter(_proto, "batchNode", _proto.getBatchNode, _proto.setBatchNode);306cc.defineGetterSetter(_proto, "quad", _proto.getQuad);307cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);308cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);309cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);310cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);311cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);312_proto = cc.SpriteBatchNode.prototype;313cc.defineGetterSetter(_proto, "textureAtlas", _proto.getTextureAtlas, _proto.setTextureAtlas);314cc.defineGetterSetter(_proto, "descendants", _proto.getDescendants);315cc.defineGetterSetter(_proto, "texture", _proto.getTexture, _proto.setTexture);316_proto = cc.Texture2D.prototype;317cc.defineGetterSetter(_proto, "name", _proto.getName);318cc.defineGetterSetter(_proto, "pixelFormat", _proto.getPixelFormat);319cc.defineGetterSetter(_proto, "defaultPixelFormat", _proto.getDefaultAlphaPixelFormat, _proto.setDefaultAlphaPixelFormat);320cc.defineGetterSetter(_proto, "pixelsWidth", _proto.getPixelsWide);321cc.defineGetterSetter(_proto, "pixelsHeight", _proto.getPixelsHigh);322cc.defineGetterSetter(_proto, "width", _proto._getWidth);323cc.defineGetterSetter(_proto, "height", _proto._getHeight);324cc.defineGetterSetter(_proto, "shaderProgram", _proto.getShaderProgram, _proto.setShaderProgram);325cc.defineGetterSetter(_proto, "maxS", _proto.getMaxS, _proto.setMaxS);326cc.defineGetterSetter(_proto, "maxT", _proto.getMaxT, _proto.setMaxT);327_proto = cc.LabelAtlas.prototype;328cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);329cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);330_proto = cc.LabelBMFont.prototype;331cc.defineGetterSetter(_proto, "string", _proto.getString, _proto._setStringForSetter);332cc.defineGetterSetter(_proto, "textAlign", _proto._getAlignment, _proto.setAlignment);333cc.defineGetterSetter(_proto, "boundingWidth", _proto._getBoundingWidth, _proto.setBoundingWidth);334_proto = cc.Menu.prototype;335cc.defineGetterSetter(_proto, "enabled", _proto.getEnabled, _proto.setEnabled);336_proto = cc.MenuItem.prototype;337cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);338_proto = cc.MenuItemLabel.prototype;339cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);340cc.defineGetterSetter(_proto, "label", _proto.getLabel, _proto.setLabel);341cc.defineGetterSetter(_proto, "disabledColor", _proto.getDisabledColor, _proto.setDisabledColor);342_proto = cc.MenuItemFont.prototype;343cc.defineGetterSetter(_proto, "fontSize", _proto.fontSize, _proto.setFontSize);344cc.defineGetterSetter(_proto, "fontName", _proto.fontName, _proto.setFontName);345_proto = cc.MenuItemSprite.prototype;346cc.defineGetterSetter(_proto, "normalImage", _proto.getNormalImage, _proto.setNormalImage);347cc.defineGetterSetter(_proto, "selectedImage", _proto.getSelectedImage, _proto.setSelectedImage);348cc.defineGetterSetter(_proto, "disabledImage", _proto.getDisabledImage, _proto.setDisabledImage);349_proto = cc.ParticleBatchNode.prototype;350cc.defineGetterSetter(_proto, "textureAtlas", _proto.getTextureAtlas, _proto.setTextureAtlas);351cc.defineGetterSetter(_proto, "texture", _proto.getTexture, _proto.setTexture);352_proto = cc.ParticleSystem.prototype;353cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);354cc.defineGetterSetter(_proto, "batchNode", _proto.getBatchNode, _proto.setBatchNode);355cc.defineGetterSetter(_proto, "active", _proto.isActive);356cc.defineGetterSetter(_proto, "shapeType", _proto.getShapeType, _proto.setShapeType);357cc.defineGetterSetter(_proto, "atlasIndex", _proto.getAtlasIndex, _proto.setAtlasIndex);358cc.defineGetterSetter(_proto, "particleCount", _proto.getParticleCount, _proto.setParticleCount);359cc.defineGetterSetter(_proto, "duration", _proto.getDuration, _proto.setDuration);360cc.defineGetterSetter(_proto, "sourcePos", _proto.getSourcePosition, _proto.setSourcePosition);361cc.defineGetterSetter(_proto, "posVar", _proto.getPosVar, _proto.setPosVar);362cc.defineGetterSetter(_proto, "life", _proto.getLife, _proto.setLife);363cc.defineGetterSetter(_proto, "lifeVar", _proto.getLifeVar, _proto.setLifeVar);364cc.defineGetterSetter(_proto, "angle", _proto.getAngle, _proto.setAngle);365cc.defineGetterSetter(_proto, "angleVar", _proto.getAngleVar, _proto.setAngleVar);366cc.defineGetterSetter(_proto, "startSize", _proto.getStartSize, _proto.setStartSize);367cc.defineGetterSetter(_proto, "startSizeVar", _proto.getStartSizeVar, _proto.setStartSizeVar);368cc.defineGetterSetter(_proto, "endSize", _proto.getEndSize, _proto.setEndSize);369cc.defineGetterSetter(_proto, "endSizeVar", _proto.getEndSizeVar, _proto.setEndSizeVar);370cc.defineGetterSetter(_proto, "startSpin", _proto.getStartSpin, _proto.setStartSpin);371cc.defineGetterSetter(_proto, "startSpinVar", _proto.getStartSpinVar, _proto.setStartSpinVar);372cc.defineGetterSetter(_proto, "endSpin", _proto.getEndSpin, _proto.setEndSpin);373cc.defineGetterSetter(_proto, "endSpinVar", _proto.getEndSpinVar, _proto.setEndSpinVar);374cc.defineGetterSetter(_proto, "gravity", _proto.getGravity, _proto.setGravity);375cc.defineGetterSetter(_proto, "speed", _proto.getSpeed, _proto.setSpeed);376cc.defineGetterSetter(_proto, "speedVar", _proto.getSpeedVar, _proto.setSpeedVar);377cc.defineGetterSetter(_proto, "tangentialAccel", _proto.getTangentialAccel, _proto.setTangentialAccel);378cc.defineGetterSetter(_proto, "tangentialAccelVar", _proto.getTangentialAccelVar, _proto.setTangentialAccelVar);379cc.defineGetterSetter(_proto, "tangentialAccel", _proto.getTangentialAccel, _proto.setTangentialAccel);380cc.defineGetterSetter(_proto, "tangentialAccelVar", _proto.getTangentialAccelVar, _proto.setTangentialAccelVar);381cc.defineGetterSetter(_proto, "rotationIsDir", _proto.getRotationIsDir, _proto.setRotationIsDir);382cc.defineGetterSetter(_proto, "startRadius", _proto.getStartRadius, _proto.setStartRadius);383cc.defineGetterSetter(_proto, "startRadiusVar", _proto.getStartRadiusVar, _proto.setStartRadiusVar);384cc.defineGetterSetter(_proto, "endRadius", _proto.getEndRadius, _proto.setEndRadius);385cc.defineGetterSetter(_proto, "endRadiusVar", _proto.getEndRadiusVar, _proto.setEndRadiusVar);386cc.defineGetterSetter(_proto, "rotatePerS", _proto.getRotatePerSecond, _proto.setRotatePerSecond);387cc.defineGetterSetter(_proto, "rotatePerSVar", _proto.getRotatePerSecondVar, _proto.setRotatePerSecondVar);388cc.defineGetterSetter(_proto, "startColor", _proto.getStartColor, _proto.setStartColor);389cc.defineGetterSetter(_proto, "startColorVar", _proto.getStartColorVar, _proto.setStartColorVar);390cc.defineGetterSetter(_proto, "endColor", _proto.getEndColor, _proto.setEndColor);391cc.defineGetterSetter(_proto, "endColorVar", _proto.getEndColorVar, _proto.setEndColorVar);392cc.defineGetterSetter(_proto, "emissionRate", _proto.getEmissionRate, _proto.setEmissionRate);393cc.defineGetterSetter(_proto, "emitterMode", _proto.getEmitterMode, _proto.setEmitterMode);394cc.defineGetterSetter(_proto, "positionType", _proto.getPositionType, _proto.setPositionType);395cc.defineGetterSetter(_proto, "totalParticles", _proto.getTotalParticles, _proto.setTotalParticles);396cc.defineGetterSetter(_proto, "autoRemoveOnFinish", _proto.getAutoRemoveOnFinish, _proto.setAutoRemoveOnFinish);397cc.defineGetterSetter(_proto, "texture", _proto.getTexture, _proto.setTexture);398_proto = cc.ProgressTimer.prototype;399cc.defineGetterSetter(_proto, "midPoint", _proto.getMidpoint, _proto.setMidpoint);400cc.defineGetterSetter(_proto, "barChangeRate", _proto.getBarChangeRate, _proto.setBarChangeRate);401cc.defineGetterSetter(_proto, "type", _proto.getType, _proto.setType);402cc.defineGetterSetter(_proto, "percentage", _proto.getPercentage, _proto.setPercentage);403cc.defineGetterSetter(_proto, "sprite", _proto.getSprite, _proto.setSprite);404cc.defineGetterSetter(_proto, "reverseDir", _proto.isReverseDirection, _proto.setReverseDirection);405_proto = cc.RenderTexture.prototype;406cc.defineGetterSetter(_proto, "sprite", _proto.getSprite, _proto.setSprite);407cc.defineGetterSetter(_proto, "clearFlags", _proto.getClearFlags, _proto.setClearFlags);408cc.defineGetterSetter(_proto, "clearDepthVal", _proto.getClearDepthVal, _proto.setClearDepthVal);409cc.defineGetterSetter(_proto, "clearStencilVal", _proto.getClearStencilVal, _proto.setClearStencilVal);410cc.defineGetterSetter(_proto, "clearColorVal", _proto.getClearColor, _proto.setClearColor);411cc.defineGetterSetter(_proto, "autoDraw", _proto.getAutoDraw, _proto.setAutoDraw);412_proto = cc.NodeGrid.prototype;413cc.defineGetterSetter(_proto, "grid", _proto.getGrid, _proto.setGrid);414cc.defineGetterSetter(_proto, "target", null, _proto.setTarget);415_proto = cc.TMXLayer.prototype;416cc.defineGetterSetter(_proto, "tiles", _proto.getTiles, _proto.setTiles);417cc.defineGetterSetter(_proto, "tileset", _proto.getTileset, _proto.setTileset);418cc.defineGetterSetter(_proto, "layerOrientation", _proto.getLayerOrientation, _proto.setLayerOrientation);419cc.defineGetterSetter(_proto, "properties", _proto.getProperties, _proto.setProperties);420cc.defineGetterSetter(_proto, "layerName", _proto.getLayerName, _proto.setLayerName);421cc.defineGetterSetter(_proto, "layerWidth", _proto._getLayerWidth, _proto._setLayerWidth);422cc.defineGetterSetter(_proto, "layerHeight", _proto._getLayerHeight, _proto._setLayerHeight);423cc.defineGetterSetter(_proto, "tileWidth", _proto._getTileWidth, _proto._setTileWidth);424cc.defineGetterSetter(_proto, "tileHeight", _proto._getTileHeight, _proto._setTileHeight);425cc.defineGetterSetter(_proto, "texture", _proto.getTexture, _proto.setTexture);426_proto = cc.TMXTiledMap.prototype;427cc.defineGetterSetter(_proto, "properties", _proto.getProperties, _proto.setProperties);428cc.defineGetterSetter(_proto, "mapOrientation", _proto.getMapOrientation, _proto.setMapOrientation);429cc.defineGetterSetter(_proto, "objectGroups", _proto.getObjectGroups, _proto.setObjectGroups);430cc.defineGetterSetter(_proto, "mapWidth", _proto._getMapWidth, _proto._setMapWidth);431cc.defineGetterSetter(_proto, "mapHeight", _proto._getMapHeight, _proto._setMapHeight);432cc.defineGetterSetter(_proto, "tileWidth", _proto._getTileWidth, _proto._setTileWidth);433cc.defineGetterSetter(_proto, "tileHeight", _proto._getTileHeight, _proto._setTileHeight);434_proto = ccs.Armature.prototype;435cc.defineGetterSetter(_proto, "parentBone", _proto.getParentBone, _proto.setParentBone);436cc.defineGetterSetter(_proto, "animation", _proto.getAnimation, _proto.setAnimation);437cc.defineGetterSetter(_proto, "armatureData", _proto.getArmatureData, _proto.setArmatureData);438cc.defineGetterSetter(_proto, "name", _proto.getName, _proto.setName);439cc.defineGetterSetter(_proto, "batchNode", _proto.getBatchNode, _proto.setBatchNode);440cc.defineGetterSetter(_proto, "version", _proto.getVersion, _proto.setVersion);441cc.defineGetterSetter(_proto, "body", _proto.getBody, _proto.setBody);442cc.defineGetterSetter(_proto, "colliderFilter", _proto.setColliderFilter);443_proto = ccs.Bone.prototype;444cc.defineGetterSetter(_proto, "boneData", _proto.getBoneData, _proto.setBoneData);445cc.defineGetterSetter(_proto, "armature", _proto.getArmature, _proto.setArmature);446cc.defineGetterSetter(_proto, "parentBone", _proto.getParentBone, _proto.setParentBone);447cc.defineGetterSetter(_proto, "childArmature", _proto.getChildArmature, _proto.setChildArmature);448cc.defineGetterSetter(_proto, "childrenBone", _proto.getChildrenBone);449cc.defineGetterSetter(_proto, "tween", _proto.getTween);450cc.defineGetterSetter(_proto, "tweenData", _proto.getTweenData);451cc.defineGetterSetter(_proto, "transformDirty", _proto.getTransformDirty, _proto.setTransformDirty);452cc.defineGetterSetter(_proto, "colliderFilter", _proto.getColliderFilter, _proto.setColliderFilter);453cc.defineGetterSetter(_proto, "displayManager", _proto.getDisplayManager, _proto.setDisplayManager);454cc.defineGetterSetter(_proto, "ignoreMovementBoneData", _proto.getIgnoreMovementBoneData, _proto.setIgnoreMovementBoneData);455cc.defineGetterSetter(_proto, "name", _proto.getName, _proto.setName);456cc.defineGetterSetter(_proto, "blendDirty", _proto.getBlendDirty, _proto.setBlendDirty);457_proto = ccs.Skin.prototype;458cc.defineGetterSetter(_proto, "skinData", _proto.getSkinData, _proto.setSkinData);459cc.defineGetterSetter(_proto, "bone", _proto.getBone, _proto.setBone);460cc.defineGetterSetter(_proto, "displayName", _proto.getDisplayName);461_proto = ccs.ColliderDetector.prototype;462cc.defineGetterSetter(_proto, "colliderFilter", _proto.getColliderFilter, _proto.setColliderFilter);463cc.defineGetterSetter(_proto, "active", _proto.getActive, _proto.setActive);464cc.defineGetterSetter(_proto, "body", _proto.getBody, _proto.setBody);465_proto = ccui.Widget.prototype;466cc.defineGetterSetter(_proto, "xPercent", _proto._getXPercent, _proto._setXPercent);467cc.defineGetterSetter(_proto, "yPercent", _proto._getYPercent, _proto._setYPercent);468cc.defineGetterSetter(_proto, "widthPercent", _proto._getWidthPercent, _proto._setWidthPercent);469cc.defineGetterSetter(_proto, "heightPercent", _proto._getHeightPercent, _proto._setHeightPercent);470cc.defineGetterSetter(_proto, "widgetParent", _proto.getWidgetParent);471cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);472cc.defineGetterSetter(_proto, "focused", _proto.isFocused, _proto.setFocused);473cc.defineGetterSetter(_proto, "sizeType", _proto.getSizeType, _proto.setSizeType);474cc.defineGetterSetter(_proto, "widgetType", _proto.getWidgetType);475cc.defineGetterSetter(_proto, "touchEnabled", _proto.isTouchEnabled, _proto.setTouchEnabled);476cc.defineGetterSetter(_proto, "updateEnabled", _proto.isUpdateEnabled, _proto.setUpdateEnabled);477cc.defineGetterSetter(_proto, "bright", _proto.isBright, _proto.setBright);478cc.defineGetterSetter(_proto, "name", _proto.getName, _proto.setName);479cc.defineGetterSetter(_proto, "actionTag", _proto.getActionTag, _proto.setActionTag);480_proto = ccui.Layout.prototype;481cc.defineGetterSetter(_proto, "clippingEnabled", _proto.isClippingEnabled, _proto.setClippingEnabled);482cc.defineGetterSetter(_proto, "clippingType", _proto.setClippingType);483cc.defineGetterSetter(_proto, "layoutType", _proto.getLayoutType, _proto.setLayoutType);484_proto = ccui.Button.prototype;485cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);486cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);487cc.defineGetterSetter(_proto, "titleText", _proto.getTitleText, _proto.setTitleText);488cc.defineGetterSetter(_proto, "titleFont", _proto._getTitleFont, _proto._setTitleFont);489cc.defineGetterSetter(_proto, "titleFontSize", _proto.getTitleFontSize, _proto.setTitleFontSize);490cc.defineGetterSetter(_proto, "titleFontName", _proto.getTitleFontName, _proto.setTitleFontName);491cc.defineGetterSetter(_proto, "titleFontColor", _proto.getTitleFontColor, _proto.setTitleFontColor);492cc.defineGetterSetter(_proto, "pressedActionEnabled", _proto.getPressedActionEnabled, _proto.setPressedActionEnabled);493_proto = ccui.CheckBox.prototype;494cc.defineGetterSetter(_proto, "selected", _proto.getSelected, _proto.setSelected);495_proto = ccui.Text.prototype;496cc.defineGetterSetter(_proto, "boundingWidth", _proto._getBoundingWidth, _proto._setBoundingWidth);497cc.defineGetterSetter(_proto, "boundingHeight", _proto._getBoundingHeight, _proto._setBoundingHeight);498cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);499cc.defineGetterSetter(_proto, "stringLength", _proto.getStringLength);500cc.defineGetterSetter(_proto, "font", _proto._getFont, _proto._setFont);501cc.defineGetterSetter(_proto, "fontName", _proto.getFontName, _proto.setFontName);502cc.defineGetterSetter(_proto, "fontSize", _proto.getFontSize, _proto.setFontSize);503cc.defineGetterSetter(_proto, "textAlign", _proto.getHorizontalAlignment, _proto.setTextHorizontalAlignment);504cc.defineGetterSetter(_proto, "verticalAlign", _proto.getVerticalAlignment, _proto.setTextVerticalAlignment);505cc.defineGetterSetter(_proto, "touchScaleEnabled", _proto.getTouchScaleEnabled, _proto.setTouchScaleEnabled);506_proto = ccui.TextAtlas.prototype;507cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);508_proto = ccui.TextBMFont.prototype;509cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);510_proto = ccui.LoadingBar.prototype;511cc.defineGetterSetter(_proto, "direction", _proto.getDirection, _proto.setDirection);512cc.defineGetterSetter(_proto, "percent", _proto.getPercent, _proto.setPercent);513_proto = ccui.Slider.prototype;514cc.defineGetterSetter(_proto, "percent", _proto.getPercent, _proto.setPercent);515_proto = ccui.TextField.prototype;516cc.defineGetterSetter(_proto, "maxLengthEnabled", _proto.isMaxLengthEnabled, _proto.setMaxLengthEnabled);517cc.defineGetterSetter(_proto, "maxLength", _proto.getMaxLength, _proto.setMaxLength);518cc.defineGetterSetter(_proto, "passwordEnabled", _proto.isPasswordEnabled, _proto.setPasswordEnabled);519cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);520cc.defineGetterSetter(_proto, "font", _proto._getFont, _proto._setFont);521cc.defineGetterSetter(_proto, "fontSize", _proto.getFontSize, _proto.setFontSize);522cc.defineGetterSetter(_proto, "fontName", _proto.getFontName, _proto.setFontName);523_proto = ccui.ScrollView.prototype;524cc.defineGetterSetter(_proto, "innerWidth", _proto._getInnerWidth, _proto._setInnerWidth);525cc.defineGetterSetter(_proto, "innerHeight", _proto._getInnerHeight, _proto._setInnerHeight);526cc.defineGetterSetter(_proto, "bounceEnabled", _proto.getBounceEnabled, _proto.setBounceEnabled);527cc.defineGetterSetter(_proto, "inertiaScrollEnabled", _proto.getInertiaScrollEnabled, _proto.setInertiaScrollEnabled);528_proto = cc.EditBox.prototype;529cc.defineGetterSetter(_proto, "font", null, _proto._setFont);530cc.defineGetterSetter(_proto, "fontName", null, _proto.setFontName);531cc.defineGetterSetter(_proto, "fontSize", null, _proto.setFontSize);532cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);533cc.defineGetterSetter(_proto, "maxLength", _proto.getMaxLength, _proto.setMaxLength);534_proto = cc.Control.prototype;535cc.defineGetterSetter(_proto, "state", _proto.getState);536cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);537cc.defineGetterSetter(_proto, "selected", _proto.isSelected, _proto.setSelected);538cc.defineGetterSetter(_proto, "highlighted", _proto.isHighlighted, _proto.setHighlighted);539_proto = cc.ControlButton.prototype;540cc.defineGetterSetter(_proto, "adjustBackgroundImage", _proto.getAdjustBackgroundImage, _proto.setAdjustBackgroundImage);541cc.defineGetterSetter(_proto, "zoomOnTouchDown", _proto.getZoomOnTouchDown, _proto.setZoomOnTouchDown);542cc.defineGetterSetter(_proto, "preferredSize", _proto.getPreferredSize, _proto.setPreferredSize);543cc.defineGetterSetter(_proto, "labelAnchor", _proto.getLabelAnchorPoint, _proto.setLabelAnchorPoint);544_proto = cc.ControlColourPicker.prototype;545cc.defineGetterSetter(_proto, "background", _proto.getBackground);546_proto = cc.ControlHuePicker.prototype;547cc.defineGetterSetter(_proto, "hue", _proto.getHue, _proto.setHue);548cc.defineGetterSetter(_proto, "huePercent", _proto.getHuePercentage, _proto.setHuePercentage);549cc.defineGetterSetter(_proto, "background", _proto.getBackground);550cc.defineGetterSetter(_proto, "slider", _proto.getSlider);551cc.defineGetterSetter(_proto, "startPos", _proto.getStartPos);552_proto = cc.ControlPotentiometer.prototype;553cc.defineGetterSetter(_proto, "value", _proto.getValue, _proto.setValue);554cc.defineGetterSetter(_proto, "minValue", _proto.getMinimumValue, _proto.setMinimumValue);555cc.defineGetterSetter(_proto, "maxValue", _proto.getMaximumValue, _proto.setMaximumValue);556cc.defineGetterSetter(_proto, "progressTimer", _proto.getProgressTimer, _proto.setProgressTimer);557cc.defineGetterSetter(_proto, "thumbSprite", _proto.getThumbSprite, _proto.setThumbSprite);558cc.defineGetterSetter(_proto, "prevLocation", _proto.getPreviousLocation, _proto.setPreviousLocation);559_proto = cc.ControlSaturationBrightnessPicker.prototype;560cc.defineGetterSetter(_proto, "saturation", _proto.getSaturation);561cc.defineGetterSetter(_proto, "brightness", _proto.getBrightness);562cc.defineGetterSetter(_proto, "background", _proto.getBackground);563cc.defineGetterSetter(_proto, "overlay", _proto.getOverlay);564cc.defineGetterSetter(_proto, "shadow", _proto.getShadow);565cc.defineGetterSetter(_proto, "slider", _proto.getSlider);566cc.defineGetterSetter(_proto, "startPos", _proto.getStartPos);567_proto = cc.ControlSlider.prototype;568cc.defineGetterSetter(_proto, "value", _proto.getValue, _proto.setValue);569cc.defineGetterSetter(_proto, "minValue", _proto.getMinimumValue, _proto.setMinimumValue);570cc.defineGetterSetter(_proto, "maxValue", _proto.getMaximumValue, _proto.setMaximumValue);571cc.defineGetterSetter(_proto, "minAllowedValue", _proto.getMinimumAllowedValue, _proto.setMinimumAllowedValue);572cc.defineGetterSetter(_proto, "maxAllowedValue", _proto.getMaximumAllowedValue, _proto.setMaximumAllowedValue);573cc.defineGetterSetter(_proto, "thumbSprite", _proto.getThumbSprite);574cc.defineGetterSetter(_proto, "progressSprite", _proto.getProgressSprite);575cc.defineGetterSetter(_proto, "backgroundSprite", _proto.getBackgroundSprite);576_proto = cc.ControlStepper.prototype;577cc.defineGetterSetter(_proto, "wraps", _proto.getWraps, _proto.setWraps);578cc.defineGetterSetter(_proto, "value", _proto.getValue, _proto.setValue);579cc.defineGetterSetter(_proto, "minValue", _proto.getMinimumValue, _proto.setMinimumValue);580cc.defineGetterSetter(_proto, "maxValue", _proto.getMaximumValue, _proto.setMaximumValue);581cc.defineGetterSetter(_proto, "stepValue", _proto.getStepValue, _proto.setStepValue);582cc.defineGetterSetter(_proto, "continuous", _proto.isContinuous);583cc.defineGetterSetter(_proto, "minusSprite", _proto.getMinusSprite, _proto.setMinusSprite);584cc.defineGetterSetter(_proto, "plusSprite", _proto.getPlusSprite, _proto.setPlusSprite);585cc.defineGetterSetter(_proto, "minusLabel", _proto.getMinusLabel, _proto.setMinusLabel);586cc.defineGetterSetter(_proto, "plusSLabel", _proto.getPlusSLabel, _proto.setPlusSLabel);587_proto = cc.Scale9Sprite.prototype;588cc.defineGetterSetter(_proto, "preferredSize", _proto.getPreferredSize, _proto.setPreferredSize);589cc.defineGetterSetter(_proto, "capInsets", _proto.getCapInsets, _proto.setCapInsets);590cc.defineGetterSetter(_proto, "insetLeft", _proto.getInsetLeft, _proto.setInsetLeft);591cc.defineGetterSetter(_proto, "insetTop", _proto.getInsetTop, _proto.setInsetTop);592cc.defineGetterSetter(_proto, "insetRight", _proto.getInsetRight, _proto.setInsetRight);593cc.defineGetterSetter(_proto, "insetBottom", _proto.getInsetBottom, _proto.setInsetBottom);594_proto = cc.ScrollView.prototype;595cc.defineGetterSetter(_proto, "direction", _proto.getDirection, _proto.setDirection);596_proto = cc.TableViewCell.prototype;...

Full Screen

Full Screen

ngTableColumn.ts

Source:ngTableColumn.ts Github

copy

Full Screen

1/**2 * ngTable: Table + Angular JS3 *4 * @author Vitalii Savchuk <esvit666@gmail.com>5 * @url https://github.com/esvit/ng-table/6 * @license New BSD License <http://creativecommons.org/licenses/BSD/>7 */8import { IScope } from 'angular';9import * as ng1 from 'angular';10import { ColumnDef, ColumnDefPartial, DynamicTableColDef } from './public-interfaces';11/**12 * @private13 */14function isScopeLike(object: any) {15 return object != null && ng1.isFunction(object.$new);16}17/**18 * @private19 * Service to construct a $column definition used by {@link ngTable ngTable} directive20 */21export class NgTableColumn<TCol extends ColumnDefPartial | DynamicTableColDef> {22 static $inject: string[] = [];23 /**24 * Creates a $column for use within a header template25 *26 * @param column the initial definition for $column to build27 * @param defaultScope the $scope to supply to the $column getter methods when not supplied by caller28 * @param columns a reference to the $columns array to make available on the context supplied to the29 * $column getter methods30 */31 buildColumn(column: TCol, defaultScope: IScope, columns: ColumnDef[]): ColumnDef {32 // note: we're not modifying the original column object. This helps to avoid unintended side affects33 const extendedCol = Object.create(column);34 const defaults = this.createDefaults();35 for (const prop in defaults) {36 if (extendedCol[prop] === undefined) {37 extendedCol[prop] = defaults[prop];38 }39 if (!ng1.isFunction(extendedCol[prop])) {40 // wrap raw field values with "getter" functions41 // - this is to ensure consistency with how ngTable.compile builds columns42 // - note that the original column object is being "proxied"; this is important43 // as it ensure that any changes to the original object will be returned by the "getter"44 const getterSetter = function getterSetter(/*[value] || [$scope, locals]*/) {45 if (arguments.length === 1 && !isScopeLike(arguments[0])) {46 (getterSetter as any).assign(null, arguments[0]);47 } else {48 return column[prop];49 }50 };51 (getterSetter as any).assign = function ($scope: IScope, value: any) {52 column[prop] = value;53 };54 extendedCol[prop] = getterSetter;55 }56 // satisfy the arguments expected by the function returned by parsedAttribute in the ngTable directive57 const getterFn = extendedCol[prop];58 extendedCol[prop] = function () {59 if (arguments.length === 1 && !isScopeLike(arguments[0])) {60 getterFn.assign(defaultScope, arguments[0]);61 } else {62 const scope = arguments[0] || defaultScope;63 const context = Object.create(scope);64 ng1.extend(context, {65 $column: extendedCol,66 $columns: columns67 });68 return getterFn.call(column, context);69 }70 };71 if (getterFn.assign) {72 extendedCol[prop].assign = getterFn.assign;73 } else {74 const wrappedGetterFn = extendedCol[prop];75 let localValue: any;76 const getterSetter = function getterSetter(/*[value] || [$scope, locals]*/) {77 if (arguments.length === 1 && !isScopeLike(arguments[0])) {78 (getterSetter as any).assign(null, arguments[0]);79 } else {80 return localValue != undefined ? localValue : wrappedGetterFn.apply(extendedCol, arguments);81 }82 };83 (getterSetter as any).assign = function ($scope: IScope, value: any) {84 localValue = value;85 };86 extendedCol[prop] = getterSetter;87 }88 }89 return extendedCol as ColumnDef;90 }91 private createDefaults() {92 return {93 'class': this.createGetterSetter(''),94 filter: this.createGetterSetter(false),95 groupable: this.createGetterSetter(false),96 filterData: ng1.noop,97 headerTemplateURL: this.createGetterSetter(false),98 headerTitle: this.createGetterSetter(''),99 sortable: this.createGetterSetter(false),100 show: this.createGetterSetter(true),101 title: this.createGetterSetter(''),102 titleAlt: this.createGetterSetter('')103 };104 }105 private createGetterSetter(initialValue: any) {106 let value = initialValue;107 const getterSetter = function getterSetter(/*[value] || [$scope, locals]*/) {108 if (arguments.length === 1 && !isScopeLike(arguments[0])) {109 (getterSetter as any).assign(null, arguments[0]);110 } else {111 return value;112 }113 };114 (getterSetter as any).assign = function ($scope: IScope, newValue: any) {115 value = newValue;116 };117 return getterSetter;118 }...

Full Screen

Full Screen

getset-006.js

Source:getset-006.js Github

copy

Full Screen

1/*2* The contents of this file are subject to the Netscape Public3* License Version 1.1 (the "License"); you may not use this file4* except in compliance with the License. You may obtain a copy of5* the License at http://www.mozilla.org/NPL/6*7* Software distributed under the License is distributed on an "AS IS" 8* basis, WITHOUT WARRANTY OF ANY KIND, either expressed9* or implied. See the License for the specific language governing10* rights and limitations under the License.11*12* The Original Code is mozilla.org code.13*14* The Initial Developer of the Original Code is Netscape15* Communications Corporation. Portions created by Netscape are16* Copyright (C) 1998 Netscape Communications Corporation. All17* Rights Reserved.18*19* Contributor(s): pschwartau@netscape.com20* Date: 14 April 200121*22* SUMMARY: Testing obj.__lookupGetter__(), obj.__lookupSetter__()23* See http://bugzilla.mozilla.org/show_bug.cgi?id=71992 24*25* Brendan: "I see no need to provide more than the minimum: 26* o.__lookupGetter__('p') returns the getter function for o.p, 27* or undefined if o.p has no getter. Users can wrap and layer."28*/29//-------------------------------------------------------------------------------------------------30var UBound = 0;31var bug = 71992;32var summary = 'Testing obj.__lookupGetter__(), obj.__lookupSetter__()';33var statprefix = 'Status: ';34var status = '';35var statusitems = [ ];36var actual = '';37var actualvalues = [ ];38var expect= '';39var expectedvalues = [ ];40var cnName = 'name';41var cnColor = 'color';42var cnNonExistingProp = 'ASDF_#_$%';43var cnDEFAULT = 'default name';44var cnFRED = 'Fred';45var cnRED = 'red';46var obj = {};47var obj2 = {};48var s;49 50// The only setter and getter functions we'll use in the three sections below -51var cnNameSetter = function(newValue) {this._name=newValue; this.nameSETS++;};52var cnNameGetter = function() {this.nameGETS++; return this._name;};53// SECTION1: define getter/setter directly on an object (not its prototype)54obj = new Object();55obj.nameSETS = 0;56obj.nameGETS = 0;57obj.__defineSetter__(cnName, cnNameSetter);58obj.__defineGetter__(cnName, cnNameGetter);59obj.name = cnFRED;60obj.color = cnRED;61status ='In SECTION1 of test; looking up extant getter/setter';62actual = [obj.__lookupSetter__(cnName), obj.__lookupGetter__(cnName)];63expect = [cnNameSetter, cnNameGetter];64addThis();65status = 'In SECTION1 of test; looking up nonexistent getter/setter';66actual = [obj.__lookupSetter__(cnColor), obj.__lookupGetter__(cnColor)];67expect = [undefined, undefined];68addThis();69status = 'In SECTION1 of test; looking up getter/setter on nonexistent property';70actual = [obj.__lookupSetter__(cnNonExistingProp), obj.__lookupGetter__(cnNonExistingProp)];71expect = [undefined, undefined];72addThis();73// SECTION2: define getter/setter in Object.prototype74Object.prototype.nameSETS = 0;75Object.prototype.nameGETS = 0;76Object.prototype.__defineSetter__(cnName, cnNameSetter);77Object.prototype.__defineGetter__(cnName, cnNameGetter);78obj = new Object();79obj.name = cnFRED;80obj.color = cnRED;81status = 'In SECTION2 of test looking up extant getter/setter';82actual = [obj.__lookupSetter__(cnName), obj.__lookupGetter__(cnName)];83expect = [cnNameSetter, cnNameGetter];84addThis();85status = 'In SECTION2 of test; looking up nonexistent getter/setter';86actual = [obj.__lookupSetter__(cnColor), obj.__lookupGetter__(cnColor)];87expect = [undefined, undefined];88addThis();89status = 'In SECTION2 of test; looking up getter/setter on nonexistent property';90actual = [obj.__lookupSetter__(cnNonExistingProp), obj.__lookupGetter__(cnNonExistingProp)];91expect = [undefined, undefined];92addThis();93// SECTION 3: define getter/setter in prototype of user-defined constructor94function TestObject()95{96}97TestObject.prototype.nameSETS = 0;98TestObject.prototype.nameGETS = 0;99TestObject.prototype.__defineSetter__(cnName, cnNameSetter);100TestObject.prototype.__defineGetter__(cnName, cnNameGetter);101TestObject.prototype.name = cnDEFAULT;102obj = new TestObject();103obj.name = cnFRED;104obj.color = cnRED;105status = 'In SECTION3 of test looking up extant getter/setter';106actual = [obj.__lookupSetter__(cnName), obj.__lookupGetter__(cnName)];107expect = [cnNameSetter, cnNameGetter];108addThis();109status = 'In SECTION3 of test; looking up non-existent getter/setter';110actual = [obj.__lookupSetter__(cnColor), obj.__lookupGetter__(cnColor)];111expect = [undefined, undefined];112addThis();113status = 'In SECTION3 of test; looking up getter/setter on nonexistent property';114actual = [obj.__lookupSetter__(cnNonExistingProp), obj.__lookupGetter__(cnNonExistingProp)];115expect = [undefined, undefined];116addThis();117//---------------------------------------------------------------------------------118test();119//---------------------------------------------------------------------------------120function addThis()121{122 statusitems[UBound] = status;123 actualvalues[UBound] = actual.toString();124 expectedvalues[UBound] = expect.toString();125 UBound++;126}127function test()128{129 enterFunc ('test');130 printBugNumber (bug);131 printStatus (summary);132 133 for (var i = 0; i < UBound; i++)134 {135 reportCompare(expectedvalues[i], actualvalues[i], getStatus(i));136 }137 exitFunc ('test');138}139function getStatus(i)140{141 return statprefix + statusitems[i];...

Full Screen

Full Screen

allgettersetters.js

Source:allgettersetters.js Github

copy

Full Screen

1/*2 * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4 *5 * This code is free software; you can redistribute it and/or modify it6 * under the terms of the GNU General Public License version 2 only, as7 * published by the Free Software Foundation.8 *9 * This code is distributed in the hope that it will be useful, but WITHOUT10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12 * version 2 for more details (a copy is included in the LICENSE file that13 * accompanied this code).14 *15 * You should have received a copy of the GNU General Public License version16 * 2 along with this work; if not, write to the Free Software Foundation,17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18 *19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20 * or visit www.oracle.com if you need additional information or have any21 * questions.22 */23/**24 * Exercise all setters on standard objects.25 *26 * @test27 * @run28 */29function checkGetterSetter(obj, expectError) {30 while (obj != undefined && obj != null) {31 var properties = Object.getOwnPropertyNames(obj);32 for (var i in properties) {33 var prop = properties[i];34 try {35 if (!/\d.*/.test(prop)) {36 eval("obj." + prop + " = " + "obj." + prop + ";");37 }38 obj[prop] = obj[prop];39 } catch (e) {40 if (!expectError || !(e instanceof TypeError)) {41 fail(e + ": " + obj.toString() +"." + prop, e);42 }43 }44 }45 obj = Object.getPrototypeOf(obj);46 }47}48// objects49checkGetterSetter([2, 23]);50checkGetterSetter(new Boolean(true));51checkGetterSetter(new Date(0));52checkGetterSetter(new Error());53checkGetterSetter(new EvalError());54if (typeof JSAdapter != 'undefined') {55 checkGetterSetter(new JSAdapter({}));56}57if (typeof JavaImporter != 'undefined') {58 checkGetterSetter(new JavaImporter(java.io));59}60checkGetterSetter(function() {});61checkGetterSetter(new Number(42));62checkGetterSetter(new Object());63checkGetterSetter(new RangeError());64checkGetterSetter(new ReferenceError());65checkGetterSetter(/nashorn/);66checkGetterSetter(new String('hello'));67checkGetterSetter(new SyntaxError());68checkGetterSetter(new TypeError());69checkGetterSetter(new URIError());70// constructors and prototypes71checkGetterSetter(Array);72checkGetterSetter(Array.prototype);73checkGetterSetter(Boolean);74checkGetterSetter(Boolean.prototype);75checkGetterSetter(Error);76checkGetterSetter(Error.prototype);77checkGetterSetter(EvalError);78checkGetterSetter(EvalError.prototype);79checkGetterSetter(Function);80checkGetterSetter(Function.prototype);81if (typeof JSAdapter != 'undefined') {82 checkGetterSetter(JSAdapter);83 checkGetterSetter(JSAdapter.prototype);84}85if (typeof JavaImporter != 'undefined') {86 checkGetterSetter(JavaImporter);87 checkGetterSetter(JavaImporter.prototype);88}89checkGetterSetter(Number);90checkGetterSetter(Number.prototype);91checkGetterSetter(Object);92checkGetterSetter(Object.prototype);93checkGetterSetter(RangeError);94checkGetterSetter(RangeError.prototype);95checkGetterSetter(ReferenceError);96checkGetterSetter(ReferenceError.prototype);97checkGetterSetter(RegExp);98checkGetterSetter(RegExp.prototype);99checkGetterSetter(String);100checkGetterSetter(String.prototype);101checkGetterSetter(SyntaxError);102checkGetterSetter(SyntaxError.prototype);103checkGetterSetter(TypeError);104checkGetterSetter(TypeError.prototype);105checkGetterSetter(URIError);106checkGetterSetter(URIError.prototype);107// misc. objects108checkGetterSetter(this);109if (typeof Packages != 'undefined') {110 checkGetterSetter(Packages);111 checkGetterSetter(java);112 checkGetterSetter(javax);113}114if (typeof Java != 'undefined') {115 checkGetterSetter(Java);116 checkGetterSetter(Java.prototype);117}118if (typeof Debug != 'undefined') {119 checkGetterSetter(Debug);120}121checkGetterSetter((function() { return arguments; })());122// TypeError expected on certain property getter/setter for strict arguments123checkGetterSetter((function() { 'use strict'; return arguments; })(), true);124checkGetterSetter(JSON);125checkGetterSetter(JSON.prototype);126checkGetterSetter(Math);...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run autotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful