goog.graphics.ext.Group
Classgoog.graphics.ext.Group
> goog.graphics.ext.Element
> goog.events.EventTarget
> goog.Disposable
goog.graphics.ext.Group(group, opt_wrapper)
Wrapper for a graphics group.
group
{goog.graphics.ext.Group
}
opt_wrapper
{goog.graphics.GroupElement
=}
.addChild(element, opt_chain)
Add an element to the group. This should be treated as package local, as it is called by the draw* methods.
element
{!goog.graphics.ext.Element
}
opt_chain
{boolean
=}
.addEventListener(type, handler, opt_capture, opt_handlerScope)
Inherited from goog.events.EventTarget
.
Adds an event listener to the event target. The same handler can only be added once per the type. Even if you add the same handler multiple times using the same type then it will only be called once when the event is dispatched. Supported for legacy but use goog.events.listen(src, type, handler) instead.
type
{string
}
handler
{Function
|Object
}
opt_capture
{boolean
=}
opt_handlerScope
{Object
=}
.addOnDisposeCallback(callback, opt_scope)
Inherited from goog.Disposable
.
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.
callback
{!Function
}
opt_scope
{Object
=}
.checkParentDependent
[protected]Inherited from goog.graphics.ext.Element
.
Overridable function for subclass specific parent dependency.
boolean
}
.clear()
Remove all drawing elements from the group.
.creationStack
{string
}Inherited from goog.Disposable
.
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.
.dispatchEvent(e)
Inherited from goog.events.EventTarget
.
Dispatches an event (or event like object) and calls all listeners listening for events of this type. The type of the event is decided by the type property on the event object. If any of the listeners returns false OR calls preventDefault then this function will return false. If one of the capture listeners calls stopPropagation, then the bubble listeners won't fire.
e
{string
|Object
|goog.events.Event
}
boolean
}
.dispose()
Inherited from goog.Disposable
.
Disposes of the object. If the object hasn't already been disposed of, calls {@link #disposeInternal}. Classes that extend {@code goog.Disposable} should override {@link #disposeInternal} in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.
void
}
.disposeInternal()
[protected]Inherited from goog.graphics.ext.Element
.
Unattach listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners, it should be something like this:
MyClass.prototype.disposeInternal = function() { MyClass.superClass_.disposeInternal.call(this); // Dispose logic for MyClass };
.forEachChild(f, opt_obj)
Calls the given function on each of this component's children in order. If {@code opt_obj} is provided, it will be used as the 'this' object in the function when called. The function should take two arguments: the child component and its 0-based index. The return value is ignored.
f
{Function
}
opt_obj
{Object
=}
.getBottom()
Inherited from goog.graphics.ext.Element
.
number
}
.getCenter()
Inherited from goog.graphics.ext.Element
.
number
}
.getCoordinateHeight()
number
}
.getCoordinateWidth()
number
}
.getDisposed
[deprecated]Deprecated. Use {@link #isDisposed} instead.
Inherited from goog.Disposable
.
boolean
}
.getGraphics()
Inherited from goog.graphics.ext.Element
.
goog.graphics.ext.Element
|goog.graphics.ext.Graphics
}
.getGraphicsImplementation()
[protected]Inherited from goog.graphics.ext.Element
.
Returns the graphics implementation.
goog.graphics.AbstractGraphics
}
.getHeight()
Inherited from goog.graphics.ext.Element
.
number
}
.getLeft()
Inherited from goog.graphics.ext.Element
.
number
}
.getMaxX()
Inherited from goog.graphics.ext.Element
.
number
}
.getMaxY()
Inherited from goog.graphics.ext.Element
.
number
}
.getMiddle()
Inherited from goog.graphics.ext.Element
.
number
}
.getMinHeight()
Inherited from goog.graphics.ext.Element
.
number
}
.getMinWidth()
Inherited from goog.graphics.ext.Element
.
number
}
.getParent()
Inherited from goog.graphics.ext.Element
.
goog.graphics.ext.Group
|undefined
}
.getParentEventTarget()
Inherited from goog.events.EventTarget
.
Returns the parent of this event target to use for bubbling.
goog.events.EventTarget
}
.getPixelScaleX()
Inherited from goog.graphics.ext.Element
.
number
}
.getPixelScaleY()
Inherited from goog.graphics.ext.Element
.
number
}
.getRight()
Inherited from goog.graphics.ext.Element
.
number
}
.getRotation()
Inherited from goog.graphics.ext.Element
.
number
}
.getTop()
Inherited from goog.graphics.ext.Element
.
number
}
.getWidth()
Inherited from goog.graphics.ext.Element
.
number
}
.getWrapper
[protected]goog.graphics.GroupElement
}
.isDisposed()
Inherited from goog.Disposable
.
boolean
}
.isParentDependent()
Inherited from goog.graphics.ext.Element
.
Returns whether this element's bounds depend on its parents. This function should be treated as if it has package scope.
boolean
}
.isPendingTransform()
Inherited from goog.graphics.ext.Element
.
boolean
}
.parentTransform()
Inherited from goog.graphics.ext.Element
.
Called by the parent when the parent has transformed. Should be treated as package scope.
.redraw()
[protected]Called from the parent class, this method resets any pre-computed positions and sizes.
.registerDisposable(disposable)
Inherited from goog.Disposable
.
Associates a disposable object with this object so that they will be disposed together.
disposable
{goog.disposable.IDisposable
}
.removeChild(element)
Remove an element from the group.
element
{goog.graphics.ext.Element
}
.removeEventListener(type, handler, opt_capture, opt_handlerScope)
Inherited from goog.events.EventTarget
.
Removes an event listener from the event target. The handler must be the same object as the one added. If the handler has not been added then nothing is done.
type
{string
}
handler
{Function
|Object
}
opt_capture
{boolean
=}
opt_handlerScope
{Object
=}
.reset()
Reset the element.
.setBottom(bottom, opt_chain)
Inherited from goog.graphics.ext.Element
.
Sets the bottom coordinate of the element. Overwrites any previous value of top, middle, or bottom for this element.
bottom
{string
|number
}
opt_chain
{boolean
=}
.setBounds(left, top, width, height, opt_chain)
Inherited from goog.graphics.ext.Element
.
Shortcut for setting the left, top, width, and height.
left
{string
|number
}
top
{string
|number
}
width
{string
|number
}
height
{string
|number
}
opt_chain
{boolean
=}
.setCenter(center, opt_chain)
Inherited from goog.graphics.ext.Element
.
Sets the center coordinate of the element. Overwrites any previous value of left, center, or right for this element.
center
{string
|number
}
opt_chain
{boolean
=}
.setHeight(height, opt_chain)
Inherited from goog.graphics.ext.Element
.
Sets the height of the element.
height
{string
|number
}
opt_chain
{boolean
=}
.setLeft(left, opt_chain)
Inherited from goog.graphics.ext.Element
.
Sets the left coordinate of the element. Overwrites any previous value of left, center, or right for this element.
left
{string
|number
}
opt_chain
{boolean
=}
.setMiddle(middle, opt_chain)
Inherited from goog.graphics.ext.Element
.
Sets the middle coordinate of the element. Overwrites any previous value of top, middle, or bottom for this element
middle
{string
|number
}
opt_chain
{boolean
=}
.setMinHeight(minHeight)
Inherited from goog.graphics.ext.Element
.
Sets the minimum height of the element.
minHeight
{string
|number
}
.setMinWidth(minWidth)
Inherited from goog.graphics.ext.Element
.
Sets the minimum width of the element.
minWidth
{string
|number
}
.setParentEventTarget(parent)
Inherited from goog.events.EventTarget
.
Sets the parent of this event target to use for bubbling.
parent
{goog.events.EventTarget
?}
.setPosition(left, top, opt_chain)
Inherited from goog.graphics.ext.Element
.
Shortcut for setting the left and top position.
left
{string
|number
}
top
{string
|number
}
opt_chain
{boolean
=}
.setRight(right, opt_chain)
Inherited from goog.graphics.ext.Element
.
Sets the right coordinate of the element. Overwrites any previous value of left, center, or right for this element.
right
{string
|number
}
opt_chain
{boolean
=}
.setRotation(angle)
Inherited from goog.graphics.ext.Element
.
Set the rotation of this element.
angle
{number
}
.setSize(width, height, opt_chain)
Inherited from goog.graphics.ext.Element
.
Shortcut for setting the width and height.
width
{string
|number
}
height
{string
|number
}
opt_chain
{boolean
=}
.setTop(top, opt_chain)
Inherited from goog.graphics.ext.Element
.
Sets the top coordinate of the element. Overwrites any previous value of top, middle, or bottom for this element.
top
{string
|number
}
opt_chain
{boolean
=}
.setWidth(width, opt_chain)
Inherited from goog.graphics.ext.Element
.
Sets the width of the element.
width
{string
|number
}
opt_chain
{boolean
=}
.transformChildren()
[protected]Transform the children that need to be transformed.
.updateChildren()
As part of the reset process, update child elements.