Support class for handling overflow layout for a component. Note that if you use AdfOverflowSupport, you will need to call removeOverflowSupport from your component's ComponentRemoved method. The call to removeOverflowSupport should be before cleaning up any overflow elements, as removeOverflowSupport will be removing any components that were currently in an overflow popup when the parent component was removed.
Method Summary
|
public Object |
addDropListElements(Array elementArray)
-
For overflow supporting a droplist, add the elements to display in the droplist popup.
|
public Object |
addElement(HTMLElement element)
-
Adds an element to the last created step.
|
public Object |
addOverflowElement(HTMLElement element)
-
Adds an overflow element to the last created step.
|
private Boolean |
_binarySearchAdjustSteps(Object hasAvailableSpace, Object availableWidth, Object availableHeight, Object lowerRange, Object upperRange)
-
Binary search when removing/adding items to overflow to maximize performance.
|
private Object |
_closeOverflowPopups()
-
Close overflow popups
|
private Object |
_createOverflowPopupHints()
-
Initializes the hints used for showing an overflow container.
|
public Object |
createStep()
-
Creates a new overflow step.
|
public HTMLElement |
createSwapPosition(HTMLElement element)
-
Creates a swap position for an element in the component.
|
private Object |
_endOverflowButtonMouseOut(Event event)
-
Callback for when the end overflow button receives mouse out event.
|
private Object |
_endOverflowButtonMouseUp(Event event)
-
Callback for when the end overflow button receives mouse up event.
|
private Object |
_endOverflowButtonPressed(Event event)
-
Callback for when the end overflow button is pressed.
|
private Integer |
_getAvailableHeight()
-
Get the available height.
|
private Integer |
_getAvailableWidth()
|
private HTMLElement |
_getElement(String overflowId, String subString)
-
Returns a subElement.
|
public static AdfUIComponent |
getOverflowChildComponents(AdfUIComponent baseComponent, Array<AdfUIComponent> children)
-
Returns an array of overflow child components present in either the start or end overflow containers.
|
public Object |
handleResize()
-
Handles the showing and hiding of elements and corresponding overflow elements when the component is resized.
|
private Object |
_handleResizeTypeBoth(Object availableWidth, Object availableHeight)
-
Handles the showing and hiding of elements for type both overflow.
|
private Boolean |
_hasAvailableSpace(Object availableWidth, Object availableHeight)
-
Checks if the element that contains overflowing elements has available space.
|
private Object |
_hideAllSteps()
-
Hide all steps, regardless if there's actually room for them.
|
private Object |
_hideElements(Array elements)
-
Hides DOMElements by giving them a style display none.
|
private Object |
_hideEndContainer()
-
Callback invoked when the end contanier popup is hidden
|
private Object |
_hideEndStep()
-
Hides the last visible overflow step on the end side.
|
private Object |
_hideOneStep()
-
Hide one step.
|
private Object |
_hideOverflowButtons()
-
If overflow buttons are currently visible (based on our step values), then change css to make them invisible.
|
private Object |
_hideOverflowElements(Array elements, Boolean isStart)
-
Removes overflow elements from an overflow container.
|
private Object |
_hideStartContainer()
-
Callback invoked when the start contanier popup is hidden
|
private Object |
_hideStartStep()
-
Hides the last visible overflow step on the start side.
|
private Object |
_hideStep(Object step, Boolean isStart)
-
Hides an overflow step.
|
private Boolean |
_hideSteps(Object availableWidth, Object availableHeight, Object hasAvailableSpace)
-
Hide any steps that won't fit.
|
protected Object |
Init(String overflowId, AdfRichUIPeer peer, Object type, Object position, Object orientation)
-
Initializes an AdfOverflowSupport instance.
|
protected static Object |
InitClass()
-
Initializes the AdfOverflowSupport class
|
private Object |
_initEndButtonEventHandling()
-
Adds eventListeners to an end overflow indicator.
|
private Object |
_initStartButtonEventHandling()
-
Adds eventListeners to a start overflow indicator.
|
private Boolean |
_isActiveStepInOverflow()
-
For type 'both' overflow, we also track an activeStep.
|
public static Boolean |
needsOverflow(String overflowId)
-
Checks if overflow is needed.
|
private Object |
_numberOfVisibleSteps()
-
Returns the number of currently visible steps.
|
private Object |
_overflowButtonPressed(Object popupId, Object popupContainer, Object popupHints)
-
Overflow button pressed.
|
public Object |
removeAllItemsFromOverflow()
-
Remove all items from overflow, regardingless of the current size.
|
private Object |
_removeEndButtonCallbacks()
-
Removes event listeners from the end overflow indicator.
|
public Object |
removeOverflowSupport(Object ignoreOverflowComponentCleanup)
-
Removes all callbacks and references to DOMElements that were created by the overflow support instance.
|
private Object |
_removeStartButtonCallbacks()
-
Removes event listeners from the start overflow indicator.
|
private Object |
_removeSteps()
-
Removes all references to DomElements from all created steps.
|
private Object |
_setActiveStep()
-
Initializes the active step.
|
private Object |
_setDepressedStyle(HTMLElement targetElement, Boolean depressed)
-
Overflow buttons use the depressed pseudo state instead of active.
|
private Object |
_showAllSteps()
-
Show all steps, regardless if there's actually room for them.
|
private Object |
_showElements(Array elements)
-
Shows DOMElements by removing style display none.
|
private Object |
_showEndStep()
-
Shows the first overflow step on the end side that is currently not visible.
|
private Object |
_showOneStep()
-
Show one step.
|
private Object |
_showOverflowButtons(Object force)
-
If overflow buttons are needed (based on our step values), then change css to make them visible.
|
private Object |
_showOverflowElements(Array elements, Boolean isStart)
-
Adds overflow elements to an overflow container.
|
private Object |
_showStartStep()
-
Shows the first overflow step on the start side that is currently not visible.
|
private Object |
_showStep(Object step, Boolean isStart)
-
Shows an overflow step.
|
private Boolean |
_showSteps(Object availableWidth, Object availableHeight, Object hasAvailableSpace)
-
Show as many steps as will fit.
|
private Object |
_startOverflowButtonMouseOut(Event event)
-
Callback for when the start overflow button receives mouse out event.
|
private Object |
_startOverflowButtonMouseUp(Event event)
-
Callback for when the start overflow button receives mouse over event.
|
private Object |
_startOverflowButtonPressed(Event event)
-
Callback for when the start overflow button is pressed.
|
private Object |
_supportsBothOverflow()
-
Returns true if we are supporting both overflow (overflow type both or droplist)
|
private Object |
_supportsDroplist()
-
Returns true if we are supporting droplist button
|
private Object |
_supportsEndOverflow()
-
Returns true if we are supporting end overflow (overflow type end or both)
|
private Object |
_supportsStartOverflow()
-
Returns true if we are supporting start overflow (overflow type start or both)
|
private Object |
_swapElements(Array elements, Boolean show)
-
Swaps DOMElements from their normal position, to their position in the overflow container.
|