E - component typeU - component UI typepublic class PopOverPainter<E extends javax.swing.JRootPane,U extends WebRootPaneUI> extends AbstractPopupPainter<E,U> implements IPopOverPainter<E,U>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
attached
Whether or not popover is attached to invoker component.
|
protected PopOverDirection |
currentDirection
Current display direction.
|
protected java.awt.event.WindowFocusListener |
focusListener |
protected ComponentMoveBehavior |
moveAdapter
Listeners.
|
protected boolean |
popOverFocused
Whether or not popover is focused.
|
protected PopOverSourcePoint |
popOverSourcePoint
WebPopOver display source point.
|
protected PopOverAlignment |
preferredAlignment
Preferred WebPopOver alignment relative to display source point.
|
protected PopOverDirection |
preferredDirection
Preferred direction in which WebPopOver should be displayed.
|
protected java.awt.event.ComponentAdapter |
resizeAdapter |
borderColor, cornerAlignment, cornerSide, cornerWidth, DROPDOWN_BORDER_SHAPE, DROPDOWN_FILL_SHAPE, opacity, popupStyle, relativeCorner, round, shade, shadeOpacity, shadeWidth, shaped, SIMPLE_BORDER_SHAPE, SIMPLE_FILL_SHAPEcomponent, listeners, ltr, propertyChangeListener, ui| Constructor and Description |
|---|
PopOverPainter() |
| Modifier and Type | Method and Description |
|---|---|
protected java.awt.Point |
checkBottomCollision(java.awt.Point location,
java.awt.Dimension ps,
java.awt.Rectangle screenBounds)
Checks whether WebPopOver will collide with bottom screen border and modifies location accordingly.
|
protected java.awt.Point |
checkLeftCollision(java.awt.Point location,
java.awt.Rectangle screenBounds)
Checks whether WebPopOver will collide with left screen border and modifies location accordingly.
|
protected java.awt.Point |
checkRightCollision(java.awt.Point location,
java.awt.Dimension ps,
java.awt.Rectangle screenBounds)
Checks whether WebPopOver will collide with right screen border and modifies location accordingly.
|
protected java.awt.Point |
checkTopCollision(java.awt.Point location,
java.awt.Rectangle screenBounds)
Checks whether WebPopOver will collide with top screen border and modifies location accordingly.
|
void |
configure(WebPopOver popOver,
java.awt.Component invoker,
com.alee.utils.swing.DataProvider<java.awt.Rectangle> boundsProvider,
PopOverDirection direction,
PopOverAlignment alignment)
Displays WebPopOver attached to the invoker component area and faced to specified direction.
|
void |
configure(WebPopOver popOver,
int x,
int y)
Displays unattached WebPopOver at the specified location.
|
void |
configure(WebPopOver popOver,
PopOverLocation location)
Displays unattached WebPopOver at the specified screen location.
|
protected PopOverDirection |
getActualDirection(java.awt.Rectangle ib,
boolean ltr,
int cw,
java.awt.Dimension ps,
java.awt.Rectangle screenBounds)
Returns actual direction depending on preferred WebPopOver direction, its sizes and source point.
|
protected java.awt.Point |
getActualLocation(java.awt.Rectangle ib,
boolean ltr,
int round,
int cw,
java.awt.Dimension ps,
java.awt.Rectangle screenBounds,
PopOverDirection actualDirection)
Returns actual WebPopOver location.
|
protected java.awt.Point |
getActualSourcePoint(java.awt.Rectangle ib,
boolean ltr,
PopOverDirection direction)
Returns actual source point depending on WebPopOver direction and invoker component location on screen.
|
PopOverDirection |
getCurrentDirection()
Returns current display direction.
|
protected float |
getCurrentShadeOpacity()
Returns current shade opacity.
|
protected WebPopOver |
getPopOver(E c)
Returns popover instance for the specified root pane.
|
PopOverSourcePoint |
getPopOverSourcePoint()
Returns popup display source point.
|
PopOverDirection |
getPreferredDirection()
Returns preferred direction in which WebPopOver should be displayed.
|
protected int |
getRelativeCorner(java.awt.Rectangle ib,
PopOverDirection actualDirection,
java.awt.Point actualLocation)
Returns relative corner position.
|
void |
install(E c,
U ui)
Called when painter is installed onto some component.
|
protected void |
installPopOverLocationUpdater(WebPopOver popOver,
java.awt.Component invoker,
com.alee.utils.swing.DataProvider<java.awt.Rectangle> boundsProvider)
Installs listeners to update WebPopOver location.
|
boolean |
isDecorated()
Returns whether or not this painter will provide appropriate window decoration.
|
boolean |
isPopOverFocused()
Returns whether this WebPopOver is focus owner or not.
|
void |
setCurrentDirection(PopOverDirection direction)
Sets current display direction.
|
void |
setPopOverFocused(boolean focused)
Sets whether this WebPopOver is focus owner or not.
|
void |
setPopOverSourcePoint(PopOverSourcePoint popOverSourcePoint)
Sets popup display source point.
|
void |
setPreferredDirection(PopOverDirection direction)
Sets preferred direction in which WebPopOver should be displayed.
|
void |
uninstall(E c,
U ui)
Called when painter is installed into some component.
|
protected void |
updatePopOverLocation(WebPopOver popOver,
java.awt.Component invoker)
Updates WebPopOver location on screen.
|
protected void |
updatePopOverLocation(WebPopOver popOver,
java.awt.Component invoker,
com.alee.utils.swing.DataProvider<java.awt.Rectangle> boundsProvider)
Updates WebPopOver location on screen.
|
protected void |
updatePopOverLocation(WebPopOver popOver,
java.awt.Component invoker,
java.awt.Rectangle invokerBounds)
Updates WebPopOver location on screen.
|
createDropdownCornerShape, createDropdownShape, createSimpleShape, getBackgroundColor, getBorderColor, getBorders, getBorderShape, getCachedShapeSettings, getComponentBackground, getCornerAlignment, getCornerSide, getCornerWidth, getDropdownCornerShape, getOpacity, getPopupStyle, getRelativeCorner, getRound, getShadeBounds, getShadeOpacity, getShadeWidth, getSideWidth, isOpaque, paint, paintBackground, paintBorder, paintShade, paintSimplePopup, paintTransparentPopup, provideShape, setBorderColor, setCornerAlignment, setCornerSide, setCornerWidth, setOpacity, setPopupStyle, setRelativeCorner, setRound, setShadeOpacity, setShadeWidthaddPainterListener, b, borderChange, getCompleteBorder, getPreferredSize, i, i, i, installPropertyChangeListener, isSectionPainter, isSettingsUpdateAllowed, orientationChange, p, propertyChange, removePainterListener, repaint, repaint, repaint, revalidate, saveOrientation, uninstallPropertyChangeListener, updateAll, updateBorder, updateOpacity, updateOrientationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPainterListener, getBorders, getPreferredSize, isOpaque, paint, removePainterListenerprotected ComponentMoveBehavior moveAdapter
protected java.awt.event.WindowFocusListener focusListener
protected java.awt.event.ComponentAdapter resizeAdapter
protected boolean popOverFocused
protected boolean attached
protected PopOverSourcePoint popOverSourcePoint
protected PopOverDirection preferredDirection
protected PopOverDirection currentDirection
protected PopOverAlignment preferredAlignment
public void install(E c, U ui)
Painterinstall in interface Painter<E extends javax.swing.JRootPane,U extends WebRootPaneUI>install in class AbstractPopupPainter<E extends javax.swing.JRootPane,U extends WebRootPaneUI>c - component this painter is being installed ontoui - component UIpublic void uninstall(E c, U ui)
Painteruninstall in interface Painter<E extends javax.swing.JRootPane,U extends WebRootPaneUI>uninstall in class AbstractPainter<E extends javax.swing.JRootPane,U extends WebRootPaneUI>c - component this painter is being uninstalled fromui - component UIpublic boolean isDecorated()
IRootPanePainterisDecorated in interface IRootPanePainter<E extends javax.swing.JRootPane,U extends WebRootPaneUI>public boolean isPopOverFocused()
public void setPopOverFocused(boolean focused)
focused - whether this WebPopOver is focus owner or notprotected float getCurrentShadeOpacity()
AbstractPopupPaintergetCurrentShadeOpacity in class AbstractPopupPainter<E extends javax.swing.JRootPane,U extends WebRootPaneUI>public PopOverSourcePoint getPopOverSourcePoint()
public void setPopOverSourcePoint(PopOverSourcePoint popOverSourcePoint)
popOverSourcePoint - popup display source pointpublic PopOverDirection getPreferredDirection()
public void setPreferredDirection(PopOverDirection direction)
direction - preferred direction in which WebPopOver should be displayedpublic PopOverDirection getCurrentDirection()
public void setCurrentDirection(PopOverDirection direction)
direction - current display directionpublic void configure(WebPopOver popOver, PopOverLocation location)
configure in interface IPopOverPainter<E extends javax.swing.JRootPane,U extends WebRootPaneUI>popOver - WebPopOver to configurelocation - WebPopOver location on screenpublic void configure(WebPopOver popOver, int x, int y)
configure in interface IPopOverPainter<E extends javax.swing.JRootPane,U extends WebRootPaneUI>popOver - WebPopOver to configurex - WebPopOver X locationy - WebPopOver Y locationpublic void configure(WebPopOver popOver, java.awt.Component invoker, com.alee.utils.swing.DataProvider<java.awt.Rectangle> boundsProvider, PopOverDirection direction, PopOverAlignment alignment)
configure in interface IPopOverPainter<E extends javax.swing.JRootPane,U extends WebRootPaneUI>popOver - WebPopOver to configureinvoker - invoker componentboundsProvider - source area bounds providerdirection - preferred display directionalignment - preferred display alignmentprotected void updatePopOverLocation(WebPopOver popOver, java.awt.Component invoker, com.alee.utils.swing.DataProvider<java.awt.Rectangle> boundsProvider)
popOver - WebPopOver to configureinvoker - invoker componentboundsProvider - source area bounds providerprotected void updatePopOverLocation(WebPopOver popOver, java.awt.Component invoker)
popOver - WebPopOver to configureinvoker - invoker componentprotected void updatePopOverLocation(WebPopOver popOver, java.awt.Component invoker, java.awt.Rectangle invokerBounds)
popOver - WebPopOver to configureinvoker - invoker componentinvokerBounds - invoker component bounds on screenprotected void installPopOverLocationUpdater(WebPopOver popOver, java.awt.Component invoker, com.alee.utils.swing.DataProvider<java.awt.Rectangle> boundsProvider)
popOver - WebPopOver to configureinvoker - invoker componentboundsProvider - source area bounds providerprotected int getRelativeCorner(java.awt.Rectangle ib,
PopOverDirection actualDirection,
java.awt.Point actualLocation)
ib - invoker component bounds on screenactualDirection - actual WebPopOver directionactualLocation - actual WebPopOver locationprotected java.awt.Point getActualLocation(java.awt.Rectangle ib,
boolean ltr,
int round,
int cw,
java.awt.Dimension ps,
java.awt.Rectangle screenBounds,
PopOverDirection actualDirection)
ib - invoker component bounds on screenltr - whether LTR orientation is active or notround - corners roundcw - corner widthps - WebPopOver size without shade widthsscreenBounds - screen boundsactualDirection - actual WebPopOver directionprotected java.awt.Point checkTopCollision(java.awt.Point location,
java.awt.Rectangle screenBounds)
location - approximate WebPopOver locationscreenBounds - screen boundsprotected java.awt.Point checkBottomCollision(java.awt.Point location,
java.awt.Dimension ps,
java.awt.Rectangle screenBounds)
location - approximate WebPopOver locationps - WebPopOver size without shade widthsscreenBounds - screen boundsprotected java.awt.Point checkLeftCollision(java.awt.Point location,
java.awt.Rectangle screenBounds)
location - approximate WebPopOver locationscreenBounds - screen boundsprotected java.awt.Point checkRightCollision(java.awt.Point location,
java.awt.Dimension ps,
java.awt.Rectangle screenBounds)
location - approximate WebPopOver locationps - WebPopOver size without shade widthsscreenBounds - screen boundsprotected PopOverDirection getActualDirection(java.awt.Rectangle ib, boolean ltr, int cw, java.awt.Dimension ps, java.awt.Rectangle screenBounds)
ib - invoker component bounds on screenltr - whether LTR orientation is active or notcw - corner withps - WebPopOver size without shade widthsscreenBounds - screen boundsprotected java.awt.Point getActualSourcePoint(java.awt.Rectangle ib,
boolean ltr,
PopOverDirection direction)
ib - invoker component bounds on screenltr - whether LTR orientation is active or notdirection - WebPopOver direction @return actual source pointprotected final WebPopOver getPopOver(E c)
c - root pane