Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.services.swingx

Class XAutoPopup

com.gentleware.services.swingx.XAutoPopup

public class XAutoPopup


Title: XAutoPopup

Description: A popup that shows a single component and is automatically hidden when focus is lost.

Copyright: Copyright (c) 2002

Company: Gentleware AG

Version:
1.0


 Inner Classifier Summary
public   XAutoPopup.CancelListener
 
private   XAutoPopup.MouseGrabber
Utility class to install listeners on all components of a window, so that the popup can be hidden if focus is lost. 
arrow_up
 

 Attribute Summary
private JComponent[]  _otherComponents
 
private JComponent  _owner
 
private Popup  _popup
 
private JComponent  _popupComponent
 
arrow_up
 

 Association Summary
private ActionListener  _escapeListener
 
private CancelListener  _listener
 
private MouseGrabber  _mouseGrabber
 
arrow_up
 

 Constructor Summary
public   XAutoPopup(JComponent owner, JComponent popupComponent, JComponent[] otherComponents, XAutoPopup.CancelListener listener)
Creates a new popup. 
arrow_up
 

 Method Summary
public Point   adjustLocationToScreenBounds(int x, int y)
 
private void   cancelPopup()
Hides the popup window  
private void   constrainBoundsLocation(Rectangle innerBounds, Rectangle outerBounds, Rectangle blockedBounds)
 
public void   hide()
Hides the popup window  
public boolean   isVisible()
 
private boolean   overlaps(int a0, int a1, int b0, int b1)
 
private boolean   overlaps(int left0, int right0, int top0, int bottom0, int left1, int right1, int top1, int bottom1)
 
public void   show(int x, int y)
 
arrow_up
 

Tagged Values
static false
gentleware-imported-line-number 20
gentleware-imported-package-statement-line-number 1
 

 Inner Classifier Detail

XAutoPopup.CancelListener

public  XAutoPopup.CancelListener

arrow_up


XAutoPopup.MouseGrabber

private  XAutoPopup.MouseGrabber

Utility class to install listeners on all components of a window, so that the popup can be hidden if focus is lost. Copied from BasicPopupMenuUI.MouseGrabber and adjusted heavily.  
arrow_up
 Attribute Detail

_otherComponents

private JComponent[] _otherComponents

arrow_up


_owner

private JComponent _owner

arrow_up


_popup

private Popup _popup

arrow_up


_popupComponent

private JComponent _popupComponent

arrow_up
 Association Detail

_escapeListener

private ActionListener _escapeListener

arrow_up


_listener

private CancelListener _listener

arrow_up


_mouseGrabber

private MouseGrabber _mouseGrabber

arrow_up
 Constructor Detail

XAutoPopup

public com.gentleware.services.swingx.XAutoPopup XAutoPopup(JComponent owner, JComponent popupComponent, JComponent[] otherComponents, XAutoPopup.CancelListener listener)


Creates a new popup. It is initially invisible and can be placed and shown by calling show().  
Parameters:
owner - parent window of the popup
popupComponent - the component shown as popup
otherComponents - components (besides popupComponent) that can have the focus while the popup shows. If any other component gets the focus the popup is hidden automatically.
listener -
Returns:
arrow_up
 Method Detail

adjustLocationToScreenBounds

public Point adjustLocationToScreenBounds(int x, int y)

Parameters:
x -
y -
Returns:
arrow_up


cancelPopup

private void cancelPopup()


Hides the popup window  
arrow_up


constrainBoundsLocation

private void constrainBoundsLocation(Rectangle innerBounds, Rectangle outerBounds, Rectangle blockedBounds)

Parameters:
innerBounds -
outerBounds -
blockedBounds -
arrow_up


hide

public void hide()


Hides the popup window  
arrow_up


isVisible

public boolean isVisible()

Returns:
true iff the popup is currently showing
arrow_up


overlaps

private boolean overlaps(int a0, int a1, int b0, int b1)

Parameters:
a0 -
a1 -
b0 -
b1 -
Returns:
arrow_up


overlaps

private boolean overlaps(int left0, int right0, int top0, int bottom0, int left1, int right1, int top1, int bottom1)

Parameters:
left0 -
right0 -
top0 -
bottom0 -
left1 -
right1 -
top1 -
bottom1 -
Returns:
arrow_up


show

public void show(int x, int y)

Parameters:
x - x position of the popup relative to owner
y - y position of the popup relative to owner
arrow_up
Created  2004 - 12 - 1

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.