com.alee.extended.window
Class WebPopOver

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by com.alee.laf.rootpane.WebDialog
                          extended by com.alee.extended.window.WebPopOver
All Implemented Interfaces:
LanguageContainerMethods, LanguageMethods, SettingsMethods, Styleable, SwingMethods, WindowMethods<WebDialog>, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class WebPopOver
extends WebDialog
implements Styleable

Custom stylish pop-over dialog with a special corner that follows invoker component. It may also act as a simple dialog with custom styling if configured so.

Author:
Mikle Garin
See Also:
WebDialog, WebPopupPainter, PopOverSourcePoint, PopOverDirection, PopOverAlignment, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  boolean attached
          Whether WebPopOver is attached to invoker component or not.
protected  WebPanel container
          WebPopOver components container.
protected  PopOverDirection currentDirection
          Current display direction.
protected  boolean movable
          Whether WebPopOver should be movable or not.
protected  java.util.List<PopOverListener> popOverListeners
          WebPopOver state listeners.
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.
 
Fields inherited from class com.alee.laf.rootpane.WebDialog
closeOnFocusLoss, focusTracker
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
WebPopOver()
          Constructs new WebPopOver dialog.
WebPopOver(java.awt.Component owner)
          Constructs new WebPopOver dialog.
WebPopOver(java.awt.Component owner, java.lang.String title)
          Constructs new WebPopOver dialog.
WebPopOver(java.awt.Dialog owner)
          Constructs new WebPopOver dialog.
WebPopOver(java.awt.Dialog owner, java.lang.String title)
          Constructs new WebPopOver dialog.
WebPopOver(java.awt.Frame owner)
          Constructs new WebPopOver dialog.
WebPopOver(java.awt.Frame owner, java.lang.String title)
          Constructs new WebPopOver dialog.
WebPopOver(java.awt.Window owner)
          Constructs new WebPopOver dialog.
WebPopOver(java.awt.Window owner, java.lang.String title)
          Constructs new WebPopOver dialog.
 
Method Summary
 void addPopOverListener(PopOverListener listener)
          Adds pop-over listener.
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 firePopOverClosed()
          Informs that this pop-over was closed.
 void firePopOverDetached()
          Informs that this pop-over was detached from invoker component.
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.
 java.awt.Color getBorderColor()
          Returns popup menu border color.
 java.awt.Color getContentBackground()
          Returns WebPopOver content background color.
protected  int getCornerAlignment()
          Returns dropdown corner alignment.
protected  int getCornerSide()
          Returns dropdown style corner side.
 int getCornerWidth()
          Returns popup menu dropdown style corner width.
 PopOverDirection getCurrentDirection()
          Returns current display direction.
 java.awt.Insets getMargin()
          Returns WebPopOver container margin.
 WebPopOverPainter getPainter()
          Returns base WebPopOver painter.
 PopOverSourcePoint getPopOverSourcePoint()
          Returns popup display source point.
protected  PopupStyle getPopupStyle()
          Returns popup style.
 PopOverDirection getPreferredDirection()
          Returns preferred direction in which WebPopOver should be displayed.
protected  int getRelativeCorner()
          Returns relative dropdown corner position.
protected  int getRelativeCorner(java.awt.Rectangle ib, PopOverDirection actualDirection, java.awt.Point actualLocation)
          Returns relative corner position.
 int getRound()
          Returns popup menu border corners rounding.
 float getShadeTransparency()
          Returns popup menu shade transparency.
 int getShadeWidth()
          Returns popup menu shade width.
 java.lang.String getStyleId()
          Returns component style ID.
 float getTransparency()
          Returns popup menu background transparency.
protected  void initialize()
          WebPopOver settings initialization.
protected  void installPopOverLocationUpdater(java.awt.Component invoker, DataProvider<java.awt.Rectangle> invokerBoundsProvider)
          Installs listeners to update WebPopOver location.
 boolean isMovable()
          Returns whether this WebPopOver is movable or not.
 boolean isPopOverFocused()
          Returns whether this WebPopOver is focus owner or not.
 void removePopOverListener(PopOverListener listener)
          Removes pop-over listener.
 void setBorderColor(java.awt.Color color)
          Sets popup menu border color.
 void setContentBackground(java.awt.Color color)
          Sets WebPopOver content background color.
protected  void setCornerAlignment(int cornerAlignment)
          Sets dropdown corner alignment.
protected  void setCornerSide(int cornerSide)
          Sets dropdown style corner side.
 void setCornerWidth(int width)
          Sets popup menu dropdown style corner width.
 void setCurrentDirection(PopOverDirection direction)
          Sets current display direction.
 WebPopOver setMargin(java.awt.Insets margin)
          Sets WebPopOver container margin.
 WebPopOver setMargin(int margin)
          Sets WebPopOver container margin.
 WebPopOver setMargin(int top, int left, int bottom, int right)
          Sets WebPopOver container margin.
 void setMovable(boolean movable)
          Sets whether this WebPopOver should be movable or not.
 void setPainter(WebPopOverPainter painter)
          Sets base WebPopOver painter.
 void setPopOverFocused(boolean focused)
          Sets whether this WebPopOver is focus owner or not.
 void setPopOverSourcePoint(PopOverSourcePoint popOverSourcePoint)
          Sets popup display source point.
protected  void setPopupStyle(PopupStyle style)
          Sets popup style.
 void setPreferredDirection(PopOverDirection direction)
          Sets preferred direction in which WebPopOver should be displayed.
protected  void setRelativeCorner(int relativeCorner)
          Sets relative dropdown corner position.
 void setRound(int round)
          Sets popup menu border corners rounding.
 void setShadeTransparency(float transparency)
          Sets popup menu shade transparency.
 void setShadeWidth(int width)
          Sets popup menu shade width.
 void setStyleId(java.lang.String id)
          Sets custom component style ID.
 void setTransparency(float transparency)
          Sets popup menu background transparency.
 WebPopOver show(java.awt.Component invoker)
          Displays WebPopOver attached to the invoker component and faced to preferred direction.
 WebPopOver show(java.awt.Component invoker, DataProvider<java.awt.Rectangle> boundsProvider)
          Displays WebPopOver attached to the invoker component area and faced to specified direction.
 WebPopOver show(java.awt.Component invoker, DataProvider<java.awt.Rectangle> boundsProvider, PopOverDirection direction)
          Displays WebPopOver attached to the invoker component area and faced to specified direction.
 WebPopOver show(java.awt.Component invoker, DataProvider<java.awt.Rectangle> boundsProvider, PopOverDirection direction, PopOverAlignment alignment)
          Displays WebPopOver attached to the invoker component area and faced to specified direction.
 WebPopOver show(java.awt.Component invoker, int x, int y)
          Displays WebPopOver attached to the invoker component coordinates and faced to specified direction.
 WebPopOver show(java.awt.Component invoker, int x, int y, int w, int h)
          Displays WebPopOver attached to the invoker component area and faced to specified direction.
 WebPopOver show(java.awt.Component invoker, int x, int y, int w, int h, PopOverDirection direction)
          Displays WebPopOver attached to the invoker component area and faced to specified direction.
 WebPopOver show(java.awt.Component invoker, int x, int y, int w, int h, PopOverDirection direction, PopOverAlignment alignment)
          Displays WebPopOver attached to the invoker component area and faced to specified direction.
 WebPopOver show(java.awt.Component invoker, int x, int y, PopOverDirection direction)
          Displays WebPopOver attached to the invoker component coordinates and faced to specified direction.
 WebPopOver show(java.awt.Component invoker, int x, int y, PopOverDirection direction, PopOverAlignment alignment)
          Displays WebPopOver attached to the invoker component coordinates and faced to specified direction.
 WebPopOver show(java.awt.Component invoker, PopOverDirection direction)
          Displays WebPopOver attached to the invoker component and faced to specified direction.
 WebPopOver show(java.awt.Component invoker, PopOverDirection direction, PopOverAlignment alignment)
          Displays WebPopOver attached to the invoker component and faced to specified direction.
 WebPopOver show(int x, int y)
          Displays unattached WebPopOver at the specified location.
 WebPopOver show(java.awt.Point location)
          Displays unattached WebPopOver at the specified location.
 WebPopOver show(PopOverLocation location)
          Displays unattached WebPopOver at the specified screen location.
protected  void updatePopOverLocation(java.awt.Component invoker)
          Updates WebPopOver location on screen.
protected  void updatePopOverLocation(java.awt.Component invoker, DataProvider<java.awt.Rectangle> invokerBoundsProvider)
          Updates WebPopOver location on screen.
protected  void updatePopOverLocation(java.awt.Rectangle invokerBounds)
          Updates WebPopOver location on screen.
 
Methods inherited from class com.alee.laf.rootpane.WebDialog
center, center, center, center, getEmptyTitleText, getInactiveShadeWidth, getLanguageContainerKey, getMaxTitleWidth, getMiddleBg, getResizeCorner, getTitleComponent, getTopBg, getWatermark, getWebRootPaneUI, getWindowButtons, getWindowOpacity, isAttachButtons, isCloseOnFocusLoss, isDrawWatermark, isGroupButtons, isLanguageSet, isShowCloseButton, isShowMaximizeButton, isShowMenuBar, isShowMinimizeButton, isShowResizeCorner, isShowTitleComponent, isShowWindowButtons, isWindowOpaque, loadSettings, packAndCenter, packAndCenter, packToHeight, packToWidth, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, removeLanguage, removeLanguageContainerKey, removeLanguageUpdater, saveSettings, setAttachButtons, setCloseOnFocusLoss, setDrawWatermark, setEmptyTitleText, setGroupButtons, setInactiveShadeWidth, setLanguage, setLanguageContainerKey, setLanguageUpdater, setMaxTitleWidth, setMiddleBg, setShowCloseButton, setShowMaximizeButton, setShowMenuBar, setShowMinimizeButton, setShowResizeCorner, setShowTitleComponent, setShowWindowButtons, setTitleComponent, setTopBg, setWatermark, setWindowOpacity, setWindowOpaque, unregisterSettings, updateLanguage, updateLanguage
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

movable

protected boolean movable
Whether WebPopOver should be movable or not.


popOverSourcePoint

protected PopOverSourcePoint popOverSourcePoint
WebPopOver display source point.


container

protected WebPanel container
WebPopOver components container.


attached

protected boolean attached
Whether WebPopOver is attached to invoker component or not.


preferredDirection

protected PopOverDirection preferredDirection
Preferred direction in which WebPopOver should be displayed.


currentDirection

protected PopOverDirection currentDirection
Current display direction.


preferredAlignment

protected PopOverAlignment preferredAlignment
Preferred WebPopOver alignment relative to display source point.


popOverListeners

protected java.util.List<PopOverListener> popOverListeners
WebPopOver state listeners.

Constructor Detail

WebPopOver

public WebPopOver()
Constructs new WebPopOver dialog.


WebPopOver

public WebPopOver(java.awt.Frame owner)
Constructs new WebPopOver dialog.

Parameters:
owner - dialog owner frame

WebPopOver

public WebPopOver(java.awt.Frame owner,
                  java.lang.String title)
Constructs new WebPopOver dialog.

Parameters:
owner - dialog owner frame
title - dialog title (might not be displayed depending on styling)

WebPopOver

public WebPopOver(java.awt.Dialog owner)
Constructs new WebPopOver dialog.

Parameters:
owner - dialog owner dialog

WebPopOver

public WebPopOver(java.awt.Dialog owner,
                  java.lang.String title)
Constructs new WebPopOver dialog.

Parameters:
owner - dialog owner dialog
title - dialog title (might not be displayed depending on styling)

WebPopOver

public WebPopOver(java.awt.Component owner)
Constructs new WebPopOver dialog.

Parameters:
owner - dialog owner component

WebPopOver

public WebPopOver(java.awt.Component owner,
                  java.lang.String title)
Constructs new WebPopOver dialog.

Parameters:
owner - dialog owner component
title - dialog title (might not be displayed depending on styling)

WebPopOver

public WebPopOver(java.awt.Window owner)
Constructs new WebPopOver dialog.

Parameters:
owner - dialog owner window

WebPopOver

public WebPopOver(java.awt.Window owner,
                  java.lang.String title)
Constructs new WebPopOver dialog.

Parameters:
owner - dialog owner window
title - dialog title (might not be displayed depending on styling)
Method Detail

initialize

protected void initialize()
WebPopOver settings initialization.

Overrides:
initialize in class WebDialog

getStyleId

public java.lang.String getStyleId()
Returns component style ID. Custom ID can be specified to override default component style using "setStyleId" method. If style for such custom ID is not found in skin descriptor then default style for that component is used.

Specified by:
getStyleId in interface Styleable
Returns:
component style ID

setStyleId

public void setStyleId(java.lang.String id)
Sets custom component style ID. If style for such custom ID is not found in skin descriptor default style will be used for that component. This method forces component to instantly use component style with the specified ID.

Specified by:
setStyleId in interface Styleable
Parameters:
id - custom component style ID

setContentBackground

public void setContentBackground(java.awt.Color color)
Sets WebPopOver content background color.

Parameters:
color - new content background color

getContentBackground

public java.awt.Color getContentBackground()
Returns WebPopOver content background color.

Returns:
WebPopOver content background color

getMargin

public java.awt.Insets getMargin()
Returns WebPopOver container margin.

Returns:
WebPopOver container margin

setMargin

public WebPopOver setMargin(java.awt.Insets margin)
Sets WebPopOver container margin.

Parameters:
margin - margin insets
Returns:
WebPopOver

setMargin

public WebPopOver setMargin(int top,
                            int left,
                            int bottom,
                            int right)
Sets WebPopOver container margin.

Parameters:
top - top margin
left - left margin
bottom - bottom margin
right - right margin
Returns:
WebPopOver

setMargin

public WebPopOver setMargin(int margin)
Sets WebPopOver container margin.

Parameters:
margin - sides margin
Returns:
WebPopOver

getPainter

public WebPopOverPainter getPainter()
Returns base WebPopOver painter.

Returns:
base WebPopOver painter

setPainter

public void setPainter(WebPopOverPainter painter)
Sets base WebPopOver painter.

Parameters:
painter - base WebPopOver painter

isMovable

public boolean isMovable()
Returns whether this WebPopOver is movable or not.

Returns:
true if this WebPopOver is movable, false otherwise

setMovable

public void setMovable(boolean movable)
Sets whether this WebPopOver should be movable or not.

Parameters:
movable - whether this WebPopOver should be movable or not

getPopOverSourcePoint

public PopOverSourcePoint getPopOverSourcePoint()
Returns popup display source point.

Returns:
popup display source point

setPopOverSourcePoint

public void setPopOverSourcePoint(PopOverSourcePoint popOverSourcePoint)
Sets popup display source point.

Parameters:
popOverSourcePoint - popup display source point

getBorderColor

public java.awt.Color getBorderColor()
Returns popup menu border color.

Returns:
popup menu border color

setBorderColor

public void setBorderColor(java.awt.Color color)
Sets popup menu border color.

Parameters:
color - new popup menu border color

getRound

public int getRound()
Returns popup menu border corners rounding.

Overrides:
getRound in class WebDialog
Returns:
popup menu border corners rounding

setRound

public void setRound(int round)
Sets popup menu border corners rounding.

Overrides:
setRound in class WebDialog
Parameters:
round - new popup menu border corners rounding

getShadeWidth

public int getShadeWidth()
Returns popup menu shade width.

Overrides:
getShadeWidth in class WebDialog
Returns:
popup menu shade width

setShadeWidth

public void setShadeWidth(int width)
Sets popup menu shade width.

Overrides:
setShadeWidth in class WebDialog
Parameters:
width - new popup menu shade width

getShadeTransparency

public float getShadeTransparency()
Returns popup menu shade transparency.

Returns:
popup menu shade transparency

setShadeTransparency

public void setShadeTransparency(float transparency)
Sets popup menu shade transparency.

Parameters:
transparency - new popup menu shade transparency

getCornerWidth

public int getCornerWidth()
Returns popup menu dropdown style corner width.

Returns:
popup menu dropdown style corner width

setCornerWidth

public void setCornerWidth(int width)
Sets popup menu dropdown style corner width.

Parameters:
width - popup menu dropdown style corner width

getTransparency

public float getTransparency()
Returns popup menu background transparency.

Returns:
popup menu background transparency

setTransparency

public void setTransparency(float transparency)
Sets popup menu background transparency.

Parameters:
transparency - popup menu background transparency

getPopupStyle

protected PopupStyle getPopupStyle()
Returns popup style. This method is made protected because requesting style is necessary only within the WebPopOver.

Returns:
popup style

setPopupStyle

protected void setPopupStyle(PopupStyle style)
Sets popup style. This method is made protected because modifying style is necessary only within the WebPopOver.

Parameters:
style - new popup style

getCornerSide

protected int getCornerSide()
Returns dropdown style corner side.

Returns:
dropdown style corner side

setCornerSide

protected void setCornerSide(int cornerSide)
Sets dropdown style corner side.

Parameters:
cornerSide - dropdown style corner side

getRelativeCorner

protected int getRelativeCorner()
Returns relative dropdown corner position.

Returns:
relative dropdown corner position

setRelativeCorner

protected void setRelativeCorner(int relativeCorner)
Sets relative dropdown corner position.

Parameters:
relativeCorner - relative dropdown corner position

getCornerAlignment

protected int getCornerAlignment()
Returns dropdown corner alignment.

Returns:
dropdown corner alignment

setCornerAlignment

protected void setCornerAlignment(int cornerAlignment)
Sets dropdown corner alignment.

Parameters:
cornerAlignment - dropdown corner alignment

isPopOverFocused

public boolean isPopOverFocused()
Returns whether this WebPopOver is focus owner or not.

Returns:
true if this WebPopOver is focus owner, false otherwise

setPopOverFocused

public void setPopOverFocused(boolean focused)
Sets whether this WebPopOver is focus owner or not.

Parameters:
focused - whether this WebPopOver is focus owner or not

show

public WebPopOver show(PopOverLocation location)
Displays unattached WebPopOver at the specified screen location.

Parameters:
location - WebPopOver location on screen
Returns:
displayed WebPopOver

show

public WebPopOver show(java.awt.Point location)
Displays unattached WebPopOver at the specified location.

Parameters:
location - WebPopOver location
Returns:
displayed WebPopOver

show

public WebPopOver show(int x,
                       int y)
Displays unattached WebPopOver at the specified location.

Parameters:
x - WebPopOver X location
y - WebPopOver Y location
Returns:
displayed WebPopOver

show

public WebPopOver show(java.awt.Component invoker)
Displays WebPopOver attached to the invoker component and faced to preferred direction. WebPopOver opened in this way will always auto-follow invoker's ancestor window.

Parameters:
invoker - invoker component
Returns:
displayed WebPopOver

show

public WebPopOver show(java.awt.Component invoker,
                       PopOverDirection direction)
Displays WebPopOver attached to the invoker component and faced to specified direction. WebPopOver opened in this way will always auto-follow invoker's ancestor window.

Parameters:
invoker - invoker component
direction - preferred display direction
Returns:
displayed WebPopOver

show

public WebPopOver show(java.awt.Component invoker,
                       PopOverDirection direction,
                       PopOverAlignment alignment)
Displays WebPopOver attached to the invoker component and faced to specified direction. It will also be aligned using the specified alignment type when possible. WebPopOver opened in this way will always auto-follow invoker's ancestor window.

Parameters:
invoker - invoker component
direction - preferred display direction
alignment - preferred display alignment
Returns:
displayed WebPopOver

show

public WebPopOver show(java.awt.Component invoker,
                       int x,
                       int y)
Displays WebPopOver attached to the invoker component coordinates and faced to specified direction. It will also be aligned using the specified alignment type when possible. WebPopOver opened in this way will always auto-follow invoker's ancestor window.

Parameters:
invoker - invoker component
x - source area X coordinate in invoker's component coordinate system
y - source area Y coordinate in invoker's component coordinate system
Returns:
displayed WebPopOver

show

public WebPopOver show(java.awt.Component invoker,
                       int x,
                       int y,
                       PopOverDirection direction)
Displays WebPopOver attached to the invoker component coordinates and faced to specified direction. It will also be aligned using the specified alignment type when possible. WebPopOver opened in this way will always auto-follow invoker's ancestor window.

Parameters:
invoker - invoker component
x - source area X coordinate in invoker's component coordinate system
y - source area Y coordinate in invoker's component coordinate system
direction - preferred display direction
Returns:
displayed WebPopOver

show

public WebPopOver show(java.awt.Component invoker,
                       int x,
                       int y,
                       PopOverDirection direction,
                       PopOverAlignment alignment)
Displays WebPopOver attached to the invoker component coordinates and faced to specified direction. It will also be aligned using the specified alignment type when possible. WebPopOver opened in this way will always auto-follow invoker's ancestor window.

Parameters:
invoker - invoker component
x - source area X coordinate in invoker's component coordinate system
y - source area Y coordinate in invoker's component coordinate system
direction - preferred display direction
alignment - preferred display alignment
Returns:
displayed WebPopOver

show

public WebPopOver show(java.awt.Component invoker,
                       int x,
                       int y,
                       int w,
                       int h)
Displays WebPopOver attached to the invoker component area and faced to specified direction. It will also be aligned using the specified alignment type when possible. WebPopOver opened in this way will always auto-follow invoker's ancestor window.

Parameters:
invoker - invoker component
x - source area X coordinate in invoker's component coordinate system
y - source area Y coordinate in invoker's component coordinate system
w - source area width
h - source area height
Returns:
displayed WebPopOver

show

public WebPopOver show(java.awt.Component invoker,
                       int x,
                       int y,
                       int w,
                       int h,
                       PopOverDirection direction)
Displays WebPopOver attached to the invoker component area and faced to specified direction. It will also be aligned using the specified alignment type when possible. WebPopOver opened in this way will always auto-follow invoker's ancestor window.

Parameters:
invoker - invoker component
x - source area X coordinate in invoker's component coordinate system
y - source area Y coordinate in invoker's component coordinate system
w - source area width
h - source area height
direction - preferred display direction
Returns:
displayed WebPopOver

show

public WebPopOver show(java.awt.Component invoker,
                       int x,
                       int y,
                       int w,
                       int h,
                       PopOverDirection direction,
                       PopOverAlignment alignment)
Displays WebPopOver attached to the invoker component area and faced to specified direction. It will also be aligned using the specified alignment type when possible. WebPopOver opened in this way will always auto-follow invoker's ancestor window.

Parameters:
invoker - invoker component
x - source area X coordinate in invoker's component coordinate system
y - source area Y coordinate in invoker's component coordinate system
w - source area width
h - source area height
direction - preferred display direction
alignment - preferred display alignment
Returns:
displayed WebPopOver

show

public WebPopOver show(java.awt.Component invoker,
                       DataProvider<java.awt.Rectangle> boundsProvider)
Displays WebPopOver attached to the invoker component area and faced to specified direction. It will also be aligned using the specified alignment type when possible. WebPopOver opened in this way will always auto-follow invoker's ancestor window.

Parameters:
invoker - invoker component
boundsProvider - source area provider
Returns:
displayed WebPopOver

show

public WebPopOver show(java.awt.Component invoker,
                       DataProvider<java.awt.Rectangle> boundsProvider,
                       PopOverDirection direction)
Displays WebPopOver attached to the invoker component area and faced to specified direction. It will also be aligned using the specified alignment type when possible. WebPopOver opened in this way will always auto-follow invoker's ancestor window.

Parameters:
invoker - invoker component
boundsProvider - source area provider
direction - preferred display direction
Returns:
displayed WebPopOver

show

public WebPopOver show(java.awt.Component invoker,
                       DataProvider<java.awt.Rectangle> boundsProvider,
                       PopOverDirection direction,
                       PopOverAlignment alignment)
Displays WebPopOver attached to the invoker component area and faced to specified direction. It will also be aligned using the specified alignment type when possible. WebPopOver opened in this way will always auto-follow invoker's ancestor window.

Parameters:
invoker - invoker component
boundsProvider - source area provider
direction - preferred display direction
alignment - preferred display alignment
Returns:
displayed WebPopOver

updatePopOverLocation

protected void updatePopOverLocation(java.awt.Component invoker,
                                     DataProvider<java.awt.Rectangle> invokerBoundsProvider)
Updates WebPopOver location on screen.

Parameters:
invoker - invoker component

updatePopOverLocation

protected void updatePopOverLocation(java.awt.Component invoker)
Updates WebPopOver location on screen.

Parameters:
invoker - invoker component

updatePopOverLocation

protected void updatePopOverLocation(java.awt.Rectangle invokerBounds)
Updates WebPopOver location on screen.

Parameters:
invokerBounds - invoker component bounds on screen

installPopOverLocationUpdater

protected void installPopOverLocationUpdater(java.awt.Component invoker,
                                             DataProvider<java.awt.Rectangle> invokerBoundsProvider)
Installs listeners to update WebPopOver location.

Parameters:
invoker - invoker component

getRelativeCorner

protected int getRelativeCorner(java.awt.Rectangle ib,
                                PopOverDirection actualDirection,
                                java.awt.Point actualLocation)
Returns relative corner position.

Parameters:
ib - invoker component bounds on screen
actualDirection - actual WebPopOver direction
actualLocation - actual WebPopOver location
Returns:
relative corner position

getActualLocation

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. Shade width is not yet taken into account within this location.

Parameters:
ib - invoker component bounds on screen
ltr - whether LTR orientation is active or not
round - corners round
cw - corner width
ps - WebPopOver size without shade widths
screenBounds - screen bounds
actualDirection - actual WebPopOver direction
Returns:
actual WebPopOver location

checkTopCollision

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.

Parameters:
location - approximate WebPopOver location
screenBounds - screen bounds
Returns:
either modified or unmodified WebPopOver location

checkBottomCollision

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.

Parameters:
location - approximate WebPopOver location
ps - WebPopOver size without shade widths
screenBounds - screen bounds
Returns:
either modified or unmodified WebPopOver location

checkLeftCollision

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.

Parameters:
location - approximate WebPopOver location
screenBounds - screen bounds
Returns:
either modified or unmodified WebPopOver location

checkRightCollision

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.

Parameters:
location - approximate WebPopOver location
ps - WebPopOver size without shade widths
screenBounds - screen bounds
Returns:
either modified or unmodified WebPopOver location

getActualDirection

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.

Parameters:
ib - invoker component bounds on screen
ltr - whether LTR orientation is active or not
cw - corner with
ps - WebPopOver size without shade widths
screenBounds - screen bounds
Returns:
actual WebPopOver direction

getActualSourcePoint

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.

Parameters:
ib - invoker component bounds on screen
ltr - whether LTR orientation is active or not
direction - WebPopOver direction @return actual source point

getPreferredDirection

public PopOverDirection getPreferredDirection()
Returns preferred direction in which WebPopOver should be displayed.

Returns:
preferred direction in which WebPopOver should be displayed

setPreferredDirection

public void setPreferredDirection(PopOverDirection direction)
Sets preferred direction in which WebPopOver should be displayed.

Parameters:
direction - preferred direction in which WebPopOver should be displayed

getCurrentDirection

public PopOverDirection getCurrentDirection()
Returns current display direction.

Returns:
current display direction

setCurrentDirection

public void setCurrentDirection(PopOverDirection direction)
Sets current display direction.

Parameters:
direction - current display direction

addPopOverListener

public void addPopOverListener(PopOverListener listener)
Adds pop-over listener.

Parameters:
listener - pop-over listener

removePopOverListener

public void removePopOverListener(PopOverListener listener)
Removes pop-over listener.

Parameters:
listener - pop-over listener

firePopOverDetached

public void firePopOverDetached()
Informs that this pop-over was detached from invoker component.


firePopOverClosed

public void firePopOverClosed()
Informs that this pop-over was closed.