public abstract class PopupWindow
extends java.lang.Object
content
to load your components into the popup window and show(Component, int, int)
to make the popup visible.Modifier and Type | Field and Description |
---|---|
protected javax.swing.JPanel |
content
the content that contains the components of the popup window
|
Constructor and Description |
---|
PopupWindow()
Creates a new popup window in default size.
|
PopupWindow(int width,
int height)
Creates a new popup window.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the popup window (manually).
|
javax.swing.JPanel |
getContentPanel()
Gets the content panel of the popup window.
|
java.awt.Dimension |
getSize()
Gets the size of the popup window.
|
java.lang.String |
getTitle()
Gets the title of the popup window.
|
void |
setSize(java.awt.Dimension dimension)
Sets the size of the popup window.
|
void |
setSize(int width,
int height)
Sets the size of the popup window.
|
void |
setSize(javax.swing.JComponent component)
Sets the size of the popup window that orients oneself towards the preferred size of the component.
|
void |
setTitle(java.lang.String title)
Sets the title of the popup window.
|
void |
show(java.awt.Component component,
int x,
int y)
Displays the popup window.
|
void |
show(java.awt.Component component,
int x,
int y,
int delay)
Displays the popup window.
|
protected final javax.swing.JPanel content
public PopupWindow()
public PopupWindow(int width, int height) throws java.lang.IllegalArgumentException
width
- the width of the windowheight
- the height of the windowjava.lang.IllegalArgumentException
- < 0
< 0
public final javax.swing.JPanel getContentPanel()
content
public java.lang.String getTitle()
public void setTitle(java.lang.String title) throws java.lang.IllegalArgumentException
title
- the titlejava.lang.IllegalArgumentException
- public java.awt.Dimension getSize()
public void setSize(int width, int height)
width
- the widthheight
- the heightpublic void setSize(java.awt.Dimension dimension) throws java.lang.IllegalArgumentException
dimension
- the sizejava.lang.IllegalArgumentException
- public void setSize(javax.swing.JComponent component) throws java.lang.IllegalArgumentException
component
- the componentjava.lang.IllegalArgumentException
- public void show(java.awt.Component component, int x, int y)
component
- the component in whose space the popup window is to appearx
- the x position at which the popup is to be displayedy
- the y position at which the popup is to be displayedpublic void show(java.awt.Component component, int x, int y, int delay)
component
- the component in whose space the popup window is to appearx
- the x position at which the popup is to be displayedy
- the y position at which the popup is to be displayeddelay
- the delay in milliseconds the popup window is open or 0
if the window has now delaypublic void close()