Default renderer for {@link goog.ui.DimensionPicker}s. Renders the palette as two divs, one with the un-highlighted background, and one with the highlighted background.
extends goog.ui.ControlRenderer| Instance Method Summary | |
addElementContents_(?goog.ui.DimensionPicker palette, ?Element element)Adds the appropriate content elements to the given outer DIV. | |
adjustParentDirection_(?goog.ui.DimensionPicker palette, ?Element element)This function adjusts the positioning from 'left' and 'top' to 'right' and 'top' as appropriate for RTL control. This is so when the dimensionpicker grow in width, the containing element grow to the left instead of right. This won't be necessary if goog.ui.SubMenu rendering code would position RTL control with 'right' and 'top'. | |
canDecorate(?Element element) ⇒ booleanOverrides {@link goog.ui.ControlRenderer#canDecorate} to allow decorating empty DIVs only. | |
createDom(?goog.ui.DimensionPicker palette) ⇒ ?ElementCreates a div and adds the appropriate contents to it. | |
decorate(?goog.ui.DimensionPicker palette, ?Element element) ⇒ ?ElementOverrides {@link goog.ui.ControlRenderer#decorate} to decorate empty DIVs. | |
getCssClass() ⇒ stringReturns the CSS class to be applied to the root element of components rendered using this renderer. | |
getGridOffsetX(?goog.ui.DimensionPicker palette, number x) ⇒ numberReturns the x offset in to the grid for the given mouse x position. | |
getGridOffsetY(?goog.ui.DimensionPicker palette, number y) ⇒ numberReturns the y offset in to the grid for the given mouse y position. | |
getHighlightDiv_(?Element element) ⇒ ?ElementReturn the highlight div for the given outer element. | |
getMouseCatcher_(?Element element) ⇒ ?ElementReturn the invisible mouse catching div for the given outer element. | |
getMouseMoveElement(?goog.ui.DimensionPicker palette) ⇒ ?ElementGet the element to listen for mouse move events on. | |
getStatusDiv_(?Element element) ⇒ ?ElementReturn the status message div for the given outer element. | |
getUnderlyingDiv_(?Element element) ⇒ ?ElementReturn the underlying div for the given outer element. | |
initializeDom(?goog.ui.DimensionPicker palette)Initializes the control's DOM when the control enters the document. Called from {@link goog.ui.Control#enterDocument}. | |
positionMouseCatcher(?goog.ui.DimensionPicker palette)Position the mouse catcher such that it receives mouse events past the selectedsize up to the maximum size. Takes care to not introduce scrollbars. Should be called on enter document and when the window changes size. | |
setHighlightedSize(?goog.ui.DimensionPicker palette, number columns, number rows)Sets the highlighted size. | |
updateSize(?goog.ui.DimensionPicker palette, ?Element element)Scales various elements in order to update the palette's size. | |