Class: SC.ControlTestPane
Extends
SC.Pane.
Generates a pane that will display vertically stacked views for testing. You can use this class in test mode to easily create a palette with views configured in different ways.
Example
var pane = SC.ControlTestPane.design()
.add('basic', SC.CheckboxView.design({ title: "Hello World" }))
.add('disabled', SC.CheckboxView.design({
title: "Hello World", isEnabled: NO
}));
module("CheckboxView UI", pane);
test("basic", function() {
var view = pane.view('basic');
ok(view.get('isEnabled'), 'should be enabled');
});
Defined in: control_test_pane.js
- Since:
- SproutCore 1.0
Field Summary
- Fields borrowed from SC.Pane:
- acceptsKeyPane, currentWindowSize, firstResponder, isKeyPane, isMainPane, isPane, page, rootResponder, touchZ, wantsTouchIntercept, zIndex
- Fields borrowed from SC.View:
- acceptsFirstResponder, acceptsMultitouch, ariaHidden, ariaRole, attributeBindings, autoMixins, backgroundColor, childViewLayout, childViewLayoutOptions, childViews, childViewsNeedLayout, classNameBindings, classNames, concatenatedProperties, createdByParent, designMode, displayProperties, enabledState, firstKeyView, hasLayout, hasTouch, hasVisibility, isBuildingIn, isBuildingOut, isChildViewLayoutLive, isEnabled, isFixedHeight, isFixedPosition, isFixedSize, isFixedWidth, isKeyResponder, isTextSelectable, isView, isVisible, lastKeyView, layerLocationNeedsUpdate, layerNeedsUpdate, layout, modeAdjust, nextKeyView, pane, parentView, previousKeyView, renderDelegateName, shouldInheritCursor, shouldInheritEnabled, tagName, themeName, toolTip, touchBoundary, transitionAdjust, transitionAdjustOptions, transitionHide, transitionHideOptions, transitionIn, transitionInOptions, transitionOut, transitionOutOptions, transitionShow, transitionShowOptions, useStaticLayout
- Fields borrowed from SC.Responder:
- hasFirstResponder, isFirstResponder, responderContext
- Fields borrowed from SC.Object:
- isDestroyed, isObject, nextProperty, object, property, target, toInvalidate
- Fields borrowed from SC.Observable:
- isObservable
Class Methods
Instance Methods
- Methods borrowed from SC.Pane:
- append, appendTo, blurMainTo, blurTo, computeParentDimensions, didBecomeKeyPaneFrom, didBecomeKeyResponderFrom, didLoseKeyPaneTo, focusFrom, focusMainFrom, hasTouchIntercept, insert, isPaneAttached, makeFirstResponder, nextResponder, paneDidAttach, performKeyEquivalent, prependTo, recomputeDependentProperties, remove, removeFromParent, resignKeyPane, sendEvent, setBodyOverflowIfNeeded, unsetBodyOverflowIfNeeded, willBecomeKeyPaneFrom, willLoseKeyPaneTo, windowSizeDidChange
- Methods borrowed from SC.View:
- $, adjust, animate, appendChild, applyAttributesToContext, beginLiveResize, borderFrame, buildIn, buildInChild, buildInDidCancel, buildInDidFinish, buildInDidFinishFor, buildOut, buildOutChild, buildOutDidCancel, buildOutDidFinish, cancelAnimation, clippingFrame, computeFrameWithParentFrame, containerLayer, contextMenu, convertFrameFromView, convertFrameToView, createChildView, createChildViews, createLayer, cursor, destroy, destroyLayer, didLoseKeyResponderTo, displayDidChange, displayToolTip, emitDesign, encodeDesign, endLiveResize, findLayerInParentLayer, frame, init, insertBefore, insertText, interpretKeyEvents, invokeRenderDelegateMethod, isContextMenuEnabled, isDescendantOf, isEnabledInPane, isFixedLayout, layer, layerId, layerIdDidChange, layoutChildViews, layoutChildViewsIfNeeded, layoutDidChange, layoutDidChangeFor, layoutStyle, layoutView, nextValidKeyView, owner, parentViewDidChange, parentViewDidResize, previousValidKeyView, propertyDidChange, recomputeIsVisibleInWindow, removeAllChildren, removeChild, removeChildAndDestroy, render, renderChildViews, renderContext, renderDelegate, renderDelegateProxy, renderLayout, replaceAllChildren, replaceChild, replaceLayer, resetAnimation, resetBuild, resetBuildState, respondsTo, scrollToVisible, selectStart, theme, touchIsInBoundary, tryToPerform, updateDesignMode, updateLayer, updateLayerIfNeeded, updateLayerLocation, updateLayerLocationIfNeeded, updateLayout, viewDidResize, willBecomeKeyResponderFrom, willLoseKeyResponderTo
- Methods borrowed from SC.Responder:
- becomeFirstResponder, didBecomeFirstResponder, resignFirstResponder, willLoseFirstResponder
- Methods borrowed from SC.Object:
- activate, awake, deactivate, instanceOf, invokeLast, invokeLater, invokeNext, invokeOnce, invokeOnceLater, invokeWith, kindOf, mixin, notifyPropertyDidChange, superclass, toString
- Methods borrowed from SC.Observable:
- addObserver, addObservesHandler, addProbe, allPropertiesDidChange, automaticallyNotifiesObserversFor, beginPropertyChanges, bind, decrementProperty, destroyObservable, didChangeFor, endPropertyChanges, get, getEach, getPath, hasObserverFor, incrementProperty, initObservable, logProperty, notifyPropertyChange, observersForKey, propertyWillChange, registerDependentKey, removeObserver, removeObservesHandler, removeProbe, set, setIfChanged, setPath, setPathIfChanged, toggleProperty, unknownProperty
Field Detail
height NumberThe default height of each row. This will be used for a view unless you manually specify a height in the view's layout.
- Default value:
- 20
- Default value:
- 4
The starting top location for the first row. This will increment as views are added to the pane.
- Default value:
- 0
Class Method Detail
Adds a test view to the control pane design. The passed label will be used as the key which you can use to find the view layer. You can either pass a view that is already designed or pass an array of attributes that will be used to create a design on the view.
- Parameters:
- label String
- the view key name
- view SC.View
- a view class or view design
- attrs Hash
- optional attrs to use when designing the view
- Returns:
- SC.ControlTestPane
- receiver
Registers a final test that will instantiate the control test pane and display it. This allows the developer to interact with the controls once the test has completed.