Home

# Class goog.ui.DimensionPickerRenderer

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) ⇒ boolean` Overrides {@link goog.ui.ControlRenderer#canDecorate} to allow decorating empty DIVs only.
| `createDom(?goog.ui.DimensionPicker palette) ⇒ ?Element` Creates a div and adds the appropriate contents to it.
| `decorate(?goog.ui.DimensionPicker palette, ?Element element) ⇒ ?Element` Overrides {@link goog.ui.ControlRenderer#decorate} to decorate empty DIVs.
| `getCssClass() ⇒ string` Returns the CSS class to be applied to the root element of components rendered using this renderer.
| `getGridOffsetX(?goog.ui.DimensionPicker palette, number x) ⇒ number` Returns the x offset in to the grid for the given mouse x position.
| `getGridOffsetY(?goog.ui.DimensionPicker palette, number y) ⇒ number` Returns the y offset in to the grid for the given mouse y position.
| `getHighlightDiv_(?Element element) ⇒ ?Element` Return the highlight div for the given outer element.
| `getMouseCatcher_(?Element element) ⇒ ?Element` Return the invisible mouse catching div for the given outer element.
| `getMouseMoveElement(?goog.ui.DimensionPicker palette) ⇒ ?Element` Get the element to listen for mouse move events on.
| `getStatusDiv_(?Element element) ⇒ ?Element` Return the status message div for the given outer element.
| `getUnderlyingDiv_(?Element element) ⇒ ?Element` Return 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.