|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent com.jidesoft.popup.JidePopup
public class JidePopup
JidePopup
is a popup window which can be resized, dragged and autohide if time out.
setDefaultFocusComponent(java.awt.Component)
to set a child component as the default focus component.
Nested Class Summary | |
---|---|
protected class |
JidePopup.AccessiblePopup
This class implements accessibility support for the Popup class. |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected Component |
_actualOwner
|
protected Point |
_actualOwnerLocation
|
protected boolean |
_detached
|
protected Insets |
_insets
|
protected ResizablePanel |
_panel
|
protected Dimension |
_previousSize
|
protected ResizableSupport |
_resizableSupport
|
protected ResizableWindow |
_window
|
static String |
ATTACHABLE_PROPERTY
Constrained property name indicating that the popup is attachable. |
static String |
CLIENT_PROPERTY_POPUP_ACTUAL_OWNER
If the popup shows a dialog and you don't want the popup to be hidden when the dialog is shown, you can use this special client property to do it. |
static String |
CLIENT_PROPERTY_POPUP_TYPE
|
static String |
CLIENT_PROPERTY_VALUE_POPUP_TYPE_COMBOBOX
|
static String |
CLIENT_PROPERTY_WINDOW_OPACITY
You can set client property to JidePopup control the window opacity (only when heavyweight popup is in use). |
static String |
CLIENT_PROPERTY_WINDOW_OPAQUE
You can set client property to JidePopup control the window opaque (only when heavyweight popup is in use) The value of the client property should be a boolean. |
static String |
CLIENT_PROPERTY_WINDOW_SHAPE
You can set client property to JidePopup control the window shape (only when heavyweight popup is in use) The value of the client property should be a Shape. |
static String |
CONTENT_PANE_PROPERTY
Bound property name. |
static String |
DETACHED_PROPERTY
Bound property name for if the popup is detached. |
int |
DISTANCE_TO_SCREEN_BORDER
The distance between alert and screen border. |
static int |
DO_NOTHING_ON_MOVED
Hides the popup when the owner is moved. |
static String |
GLASS_PANE_PROPERTY
Bound property name. |
static int |
HEAVY_WEIGHT_POPUP
|
static int |
HIDE_ON_MOVED
Hides the popup when the owner is moved. |
static String |
LAYERED_PANE_PROPERTY
Bound property name. |
static int |
LIGHT_WEIGHT_POPUP
Key used to indicate a light weight popup should be used. |
static String |
MENU_BAR_PROPERTY
Bound property name. |
static String |
MOVABLE_PROPERTY
Bound property name for gripper. |
static int |
MOVE_ON_MOVED
Moves the popup along with owner when the owner is moved. |
static String |
OWNER_PROPERTY
Bound property name for owner. |
static String |
PROPERTY_GRIPPER_LOCATION
|
static String |
RESIZABLE_PROPERTY
Bound property name for resizable. |
static String |
ROOT_PANE_PROPERTY
Bound property name. |
static String |
TRANSIENT_PROPERTY
|
static String |
VISIBLE_PROPERTY
Bound property name. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 | |
---|---|
JidePopup()
Creates a Popup. |
Method Summary | |
---|---|
void |
addExcludedComponent(Component component)
Adds a component as excluded component. |
protected void |
addImpl(Component comp,
Object constraints,
int index)
Ensures that, by default, children cannot be added directly to this component. |
void |
addPopupMenuListener(PopupMenuListener l)
Adds a PopupMenu listener which will listen to notification messages from the popup portion of the
combo box. |
protected void |
ancestorHidden()
This method will process component hidden event for the popup's ancestor. |
protected void |
ancestorMoved()
This method will process component moved event for the popup's ancestor. |
protected void |
beginDragging(JComponent f,
int mouseX,
int mouseY,
double relativeX,
double relativeY)
|
protected void |
contentResized()
|
protected ResizableWindow |
createHeavyweightPopupContainer(Component owner)
|
protected ResizablePanel |
createLightweightPopupContainer(Component owner)
Creates lightweight container for the popup. |
protected JRootPane |
createRootPane()
Called by the constructor to set up the JRootPane . |
protected void |
createWindow(Component owner,
int x,
int y)
|
protected void |
drag(JComponent f,
int newX,
int newY,
int mouseModifiers)
|
protected void |
endDragging()
|
void |
firePopupMenuCanceled()
Notifies PopupMenuListener s that the popup portion of the combo box has been canceled. |
void |
firePopupMenuWillBecomeInvisible()
Notifies PopupMenuListener s that the popup portion of the combo box has become invisible. |
void |
firePopupMenuWillBecomeVisible()
Notifies PopupMenuListener s that the popup portion of the combo box will become visible. |
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this Popup . |
protected Component |
getActualOwner()
Gets the actual owner. |
protected Rectangle |
getAdjustedRectangle(int x,
int y,
Component owner)
Gets the rectangle adjusted by preferred size and the monitor device settings. |
Insets |
getBackToOriginalInsets()
Get the insets so that when the JidePopup is dragged back to this area, the JidePopup will jump to its original position automatically. |
Container |
getContentPane()
Returns the content pane for this Popup. |
Component |
getDefaultFocusComponent()
Gets the default focus component. |
int |
getDefaultMoveOperation()
Gets the default operation when the owner is moved. |
protected Rectangle |
getDisplayScreenBounds(Component owner)
|
protected Point |
getDisplayStartLocation(Rectangle screenDim,
Dimension size,
int location)
Get the display start location of the popup. |
protected static Frame |
getFrame(Component c)
|
Component |
getGlassPane()
Returns the glass pane for this popup. |
int |
getGripperLocation()
|
JMenuBar |
getJMenuBar()
Returns the current JMenuBar for this Popup , or null if no menu bar has
been set. |
JLayeredPane |
getLayeredPane()
Returns the layered pane for this popup. |
Component |
getOwner()
Gets the owner of the popup. |
Border |
getPopupBorder()
Gets the popup border set by setPopupBorder(javax.swing.border.Border) . |
Rectangle |
getPopupBounds()
|
protected Point |
getPopupLocation(Point point,
Dimension size,
Component owner)
Calculates the popup location. |
PopupMenuListener[] |
getPopupMenuListeners()
Returns an array of all the PopupMenuListener s added to this JComboBox with addPopupMenuListener(). |
int |
getPopupType()
|
protected JComponent |
getRealParent(RootPaneContainer rootPaneContainer)
|
JRootPane |
getRootPane()
Returns the rootPane object for this popup. |
int |
getTimeout()
Gets the time out value, in milliseconds. |
static Component |
getTopLevelAncestor(Component component)
|
PopupUI |
getUI()
Returns the look-and-feel object that renders this component. |
String |
getUIClassID()
Returns the name of the look-and-feel class that renders this component. |
protected void |
handleComponentEvent(ComponentEvent e)
This method will process component event. |
protected void |
handleMouseDragged(MouseEvent e)
|
protected void |
handleMouseEntered(MouseEvent e)
|
protected void |
handleMouseExited(MouseEvent e)
|
protected void |
handleMousePressed(MouseEvent e)
|
protected void |
handleMouseReleased(MouseEvent e)
|
protected void |
handleWindowEvent(WindowEvent e)
|
void |
hidePopup()
|
void |
hidePopup(boolean cancelled)
|
void |
hidePopupImmediately()
Hides the popup immediately (compare to hidePopup() could use animation to hide the popup). |
void |
hidePopupImmediately(boolean cancelled)
|
protected void |
installBorder()
|
protected void |
installListeners()
|
protected void |
internalShowPopup(int x,
int y)
|
protected void |
internalShowPopup(int x,
int y,
Component owner)
|
boolean |
isAttachable()
Checks if the popup is attachable. |
boolean |
isClickOnPopup(MouseEvent e)
Checks if the mouse event is on the popup. |
boolean |
isDetached()
Checks if the popup is detached. |
protected boolean |
isDragging()
|
boolean |
isExcludedComponent(Component component)
Checks if a component is an excluded component. |
boolean |
isKeepPreviousSize()
Get the flag indicating if JidePopup should keep the size last time it was popped up. |
boolean |
isMovable()
Checks if the popup is movable. |
static boolean |
isPopupAncestorOf(JidePopup popup,
Component c)
|
boolean |
isPopupVisible()
|
boolean |
isResizable()
Checks if the popup is resizable. |
boolean |
isReturnFocusToOwner()
gets the flag. |
protected boolean |
isRootPaneCheckingEnabled()
Returns whether calls to add and setLayout cause an exception to be thrown. |
boolean |
isTransient()
Checks if the popup is transient. |
protected void |
movePopup()
|
void |
packPopup()
Packs the popup. |
void |
remove(Component comp)
Removes the specified component from this container. |
void |
removeAllExcludedComponents()
Removes all excluded components that were added before. |
void |
removeExcludedComponent(Component component)
Removes a component from the excluded component list. |
void |
removePopupMenuListener(PopupMenuListener l)
Removes a PopupMenuListener . |
void |
setAttachable(boolean attachable)
Sets the attachable option. |
void |
setBackToOriginalInsets(Insets backToOriginalInsets)
Set the insets so that when the JidePopup is dragged back to this area, the JidePopup will jump to its original position automatically. |
void |
setContentPane(Container c)
Sets this Popup 's contentPane property. |
void |
setDefaultFocusComponent(Component defaultFocusComponent)
Sets the default focus component. |
void |
setDefaultMoveOperation(int defaultMoveOperation)
Sets the default operation when the owner is moved. |
void |
setDetached(boolean detached)
Changes the popup's detached mode. |
void |
setDisplayStartLocation(Point startLocation)
Set the display start location of the popup. |
void |
setGlassPane(Component glass)
Sets this Popup 's glassPane property. |
void |
setGripperLocation(int gripperLocation)
Sets the gripper location. |
void |
setJMenuBar(JMenuBar m)
Sets the menuBar property for this Popup . |
void |
setKeepPreviousSize(boolean keepPreviousSize)
Set the flag indicating if JidePopup should keep the size last time it was popped up. |
void |
setLayeredPane(JLayeredPane layered)
Sets this Popup 's layeredPane property. |
void |
setLayout(LayoutManager manager)
Ensures that, by default, the layout of this component cannot be set. |
void |
setMovable(boolean movable)
Sets the movable attribute. |
void |
setOwner(Component owner)
Sets the owner of the popup. |
void |
setPopupBorder(Border popupBorder)
Sets the border for this popup. |
void |
setPopupType(int popupType)
|
void |
setPreferredPopupSize(Dimension size)
Sets the preferred popup size. |
void |
setResizable(boolean resizable)
Sets the resizable option. |
void |
setReturnFocusToOwner(boolean returnFocusToOwner)
Sets the flag to return focus to the owner when the popup is hidden. |
protected void |
setRootPane(JRootPane root)
Sets the rootPane property for this Popup . |
protected void |
setRootPaneCheckingEnabled(boolean enabled)
Determines whether calls to add and setLayout cause an exception to be thrown. |
void |
setTimeout(int timeout)
Sets the time out value, in milliseconds. |
void |
setTransient(boolean isTransient)
Sets the transient attribute. |
void |
setUI(PopupUI ui)
Sets the UI delegate for this Popup . |
void |
setupResizeCorner(int corner)
Setup Resizable's ResizeCorner. |
void |
setVisible(boolean visible)
Makes the component visible or invisible. |
protected boolean |
shouldAWTEventListenerBeUsed()
Returns whether the AWTEventEventListener should be used to handle event processing |
void |
showPopup()
Shows the popup. |
void |
showPopup(Component owner)
Shows the popup. |
void |
showPopup(Insets insets)
Shows the popup. |
void |
showPopup(Insets insets,
Component owner)
Shows the popup. |
void |
showPopup(int location)
Shows the popup at the specified location relative to the screen. |
void |
showPopup(int location,
Component owner)
Shows the popup at the specified location relative to the owner. |
void |
showPopup(int x,
int y)
Shows the popup at the specified x and y coordinates. |
void |
showPopup(int x,
int y,
Component owner)
Shows the popup at the specified x and y coordinates. |
protected void |
showPopupImmediately()
|
void |
updateUI()
Notification from the UIManager that the look and feel has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String CLIENT_PROPERTY_WINDOW_OPACITY
public static final String CLIENT_PROPERTY_WINDOW_OPAQUE
public static final String CLIENT_PROPERTY_WINDOW_SHAPE
public static final String CONTENT_PANE_PROPERTY
public static final String MENU_BAR_PROPERTY
public static final String LAYERED_PANE_PROPERTY
public static final String ROOT_PANE_PROPERTY
public static final String GLASS_PANE_PROPERTY
public static final String VISIBLE_PROPERTY
public static final String TRANSIENT_PROPERTY
public static final String ATTACHABLE_PROPERTY
public static final String MOVABLE_PROPERTY
public static final String DETACHED_PROPERTY
public static final String CLIENT_PROPERTY_POPUP_TYPE
public static final String CLIENT_PROPERTY_VALUE_POPUP_TYPE_COMBOBOX
protected boolean _detached
protected ResizableWindow _window
protected ResizablePanel _panel
protected ResizableSupport _resizableSupport
public static final String CLIENT_PROPERTY_POPUP_ACTUAL_OWNER
JComponent c = JideSwingUtilities.getFirstJComponent(dialog);
if(c != null) {
c.putClientProperty(JidePopup.CLIENT_PROPERTY_POPUP_ACTUAL_OWNER, component);
}
public static final String RESIZABLE_PROPERTY
public static final String OWNER_PROPERTY
public static final int DO_NOTHING_ON_MOVED
public static final int HIDE_ON_MOVED
public static final int MOVE_ON_MOVED
public int DISTANCE_TO_SCREEN_BORDER
public static final String PROPERTY_GRIPPER_LOCATION
protected Dimension _previousSize
protected Component _actualOwner
protected Point _actualOwnerLocation
public static final int LIGHT_WEIGHT_POPUP
public static final int HEAVY_WEIGHT_POPUP
protected Insets _insets
Constructor Detail |
---|
public JidePopup()
Method Detail |
---|
protected JRootPane createRootPane()
JRootPane
.
JRootPane
JRootPane
public PopupUI getUI()
PopupUI
object that renders this componentpublic void setUI(PopupUI ui)
Popup
.
ui
- the UI delegatepublic void updateUI()
UIManager
that the look and feel has changed. Replaces the current UI object
with the latest version from the UIManager
.
updateUI
in class JComponent
JComponent.updateUI()
public String getUIClassID()
getUIClassID
in class JComponent
JComponent.getUIClassID()
,
UIDefaults.getUI(javax.swing.JComponent)
protected boolean isRootPaneCheckingEnabled()
add
and setLayout
cause an exception to be thrown.
true
if add
and setLayout
are checkedaddImpl(java.awt.Component, java.lang.Object, int)
,
setLayout(java.awt.LayoutManager)
,
setRootPaneCheckingEnabled(boolean)
protected void setRootPaneCheckingEnabled(boolean enabled)
add
and setLayout
cause an exception to be thrown.
enabled
- a boolean value, true
if checking is to be enabled, which cause the exceptions to be
thrownaddImpl(java.awt.Component, java.lang.Object, int)
,
setLayout(java.awt.LayoutManager)
,
isRootPaneCheckingEnabled()
protected void addImpl(Component comp, Object constraints, int index)
thisComponent.getContentPane().add(child)An attempt to add to directly to this component will cause a runtime exception to be thrown. Subclasses can disable this behavior.
addImpl
in class Container
comp
- the Component
to be addedconstraints
- the object containing the constraints, if anyindex
- the index
Error
- if called with isRootPaneChecking
true
setRootPaneCheckingEnabled(boolean)
public void remove(Component comp)
remove
in class Container
comp
- the component to be removedContainer.add(java.awt.Component)
public void setLayout(LayoutManager manager)
thisComponent.getContentPane().setLayout(new GridLayout(1,2))An attempt to set the layout of this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.
setLayout
in class Container
manager
- the LayoutManager
Error
- if called with isRootPaneChecking
true
setRootPaneCheckingEnabled(boolean)
public JMenuBar getJMenuBar()
JMenuBar
for this Popup
, or null
if no menu bar has
been set.
JMenuBar
used by this Popup.setJMenuBar(javax.swing.JMenuBar)
public void setJMenuBar(JMenuBar m)
menuBar
property for this Popup
.
m
- the JMenuBar
to use in this Popup.getJMenuBar()
public Container getContentPane()
public void setContentPane(Container c)
Popup
's contentPane
property.
c
- the content pane for this popup.
IllegalComponentStateException
- (a runtime exception) if the content pane parameter is null
RootPaneContainer.getContentPane()
public JLayeredPane getLayeredPane()
JLayeredPane
objectRootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)
,
RootPaneContainer.getLayeredPane()
public void setLayeredPane(JLayeredPane layered)
Popup
's layeredPane
property.
layered
- the JLayeredPane
for this popup
IllegalComponentStateException
- (a runtime exception) if the layered pane parameter is null
RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)
public Component getGlassPane()
RootPaneContainer.setGlassPane(java.awt.Component)
public void setGlassPane(Component glass)
Popup
's glassPane
property.
glass
- the glass pane for this popupRootPaneContainer.getGlassPane()
public JRootPane getRootPane()
rootPane
object for this popup.
getRootPane
in class JComponent
rootPane
propertyRootPaneContainer.getRootPane()
protected void setRootPane(JRootPane root)
rootPane
property for this Popup
. This method is called by the constructor.
root
- the new JRootPane
objectpublic void setVisible(boolean visible)
Component.setVisible
.
setVisible
in class JComponent
visible
- true to make the component visible; false to make it invisiblepublic AccessibleContext getAccessibleContext()
AccessibleContext
associated with this Popup
. For popups, the
AccessibleContext
takes the form of an AccessiblePopup
object. A new
AccessiblePopup
instance is created if necessary.
getAccessibleContext
in interface Accessible
getAccessibleContext
in class JComponent
AccessiblePopup
that serves as the AccessibleContext
of this
Popup
JidePopup.AccessiblePopup
public boolean isKeepPreviousSize()
public void setKeepPreviousSize(boolean keepPreviousSize)
keepPreviousSize
- the flag.public Insets getBackToOriginalInsets()
public void setBackToOriginalInsets(Insets backToOriginalInsets)
backToOriginalInsets
- the insetspublic void showPopup()
public void showPopup(Component owner)
owner
- the popup window's owner; if unspecified, it will default to the RootPaneContainer(Applet) or
ContentContainerpublic void showPopup(Insets insets)
insets
- the popup's insets RootPaneContainer(Applet) or ContentContainerpublic void showPopup(Insets insets, Component owner)
insets
- the popup's insetsowner
- the popup window's owner; if unspecified, it will default to the RootPaneContainer(Applet) or
ContentContainerprotected Point getPopupLocation(Point point, Dimension size, Component owner)
point
- owner is top-left coordinate relative to screen.size
- the size of the popup window.owner
- the owner
public void setupResizeCorner(int corner)
corner
- the corner.public static Component getTopLevelAncestor(Component component)
public void showPopup(int location)
SwingConstants.CENTER
SwingConstants.SOUTH
SwingConstants.NORTH
SwingConstants.WEST
SwingConstants.EAST
SwingConstants.NORTH_EAST
SwingConstants.NORTH_WEST
SwingConstants.SOUTH_EAST
SwingConstants.SOUTH_WEST
DISTANCE_TO_SCREEN_BORDER
.
location
- the new location.public void showPopup(int location, Component owner)
SwingConstants.CENTER
SwingConstants.SOUTH
SwingConstants.NORTH
SwingConstants.WEST
SwingConstants.EAST
SwingConstants.NORTH_EAST
SwingConstants.NORTH_WEST
SwingConstants.SOUTH_EAST
SwingConstants.SOUTH_WEST
DISTANCE_TO_SCREEN_BORDER
.
location
- the new locationowner
- the popup window's owner; if unspecified, it will default to the RootPaneContainer(Applet) or
ContentContainerpublic void setDisplayStartLocation(Point startLocation)
startLocation
- the display start location.getDisplayStartLocation(java.awt.Rectangle, java.awt.Dimension, int)
protected Point getDisplayStartLocation(Rectangle screenDim, Dimension size, int location)
setDisplayStartLocation(java.awt.Point)
explicitly. It will just return the location if the
customer already set it.
screenDim
- the dimension of the screensize
- the size of the popuplocation
- the direction to show the popup
protected Rectangle getDisplayScreenBounds(Component owner)
public void packPopup()
protected void internalShowPopup(int x, int y)
protected void internalShowPopup(int x, int y, Component owner)
protected Rectangle getAdjustedRectangle(int x, int y, Component owner)
x
- the original xy
- the original yowner
- the owner component
protected void createWindow(Component owner, int x, int y)
public void showPopup(int x, int y)
x
- the x position. It is screen position.y
- the y position. It is screen position.public void showPopup(int x, int y, Component owner)
x
- the x position. It is screen position.y
- the y position. It is screen position.owner
- the popup window's owner; if unspecified, it will default to the RootPaneContainer(Applet) or
ContentContainerprotected static Frame getFrame(Component c)
protected ResizableWindow createHeavyweightPopupContainer(Component owner)
owner
- the owner for this popup container. It will be used to find the top level ancestor and use it as the
parent for this popup window.
protected ResizablePanel createLightweightPopupContainer(Component owner)
owner
- the owner for this popup container. This parameter is not used in this method. It was there mainly
because the corresponding createHeavyweightPopupContainer(java.awt.Component)
has this
parameter.
protected void installListeners()
protected void contentResized()
protected void installBorder()
protected void showPopupImmediately()
protected void movePopup()
protected void endDragging()
protected void beginDragging(JComponent f, int mouseX, int mouseY, double relativeX, double relativeY)
protected boolean isDragging()
protected void drag(JComponent f, int newX, int newY, int mouseModifiers)
protected void handleMousePressed(MouseEvent e)
protected void handleMouseReleased(MouseEvent e)
protected void handleMouseDragged(MouseEvent e)
protected void handleMouseEntered(MouseEvent e)
protected void handleMouseExited(MouseEvent e)
protected void handleWindowEvent(WindowEvent e)
protected JComponent getRealParent(RootPaneContainer rootPaneContainer)
protected void handleComponentEvent(ComponentEvent e)
getDefaultMoveOperation()
value.
e
- the ComponentEvent.protected void ancestorHidden()
protected void ancestorMoved()
public void hidePopup()
public void hidePopup(boolean cancelled)
public boolean isPopupVisible()
public Rectangle getPopupBounds()
public void hidePopupImmediately(boolean cancelled)
public void hidePopupImmediately()
hidePopup()
could use animation to hide the popup).
protected boolean shouldAWTEventListenerBeUsed()
public Component getOwner()
public void setOwner(Component owner)
removeExcludedComponent(java.awt.Component)
to remove it explicitly after setOwner is called.
owner
- the new owner.public boolean isMovable()
public void setMovable(boolean movable)
movable
- true or false.public boolean isResizable()
public void setResizable(boolean resizable)
resizable
- true or false.public boolean isAttachable()
public void setAttachable(boolean attachable)
attachable
- true or false.public boolean isDetached()
setOwner(java.awt.Component)
. When owner is moved, the popup will be moved. If
the owner is hidden, the popup will hidden. In the other word, it is attached with the owner. In detached mode,
popup becomes an independent floating window. It will stay at the same location regardless if owner is moved. It
could still be visible when owner is hidden.
public void setDetached(boolean detached)
detached
- true or false.public Border getPopupBorder()
setPopupBorder(javax.swing.border.Border)
.
public void setPopupBorder(Border popupBorder)
popupBorder
- the border for the popup.public boolean isTransient()
setTransient(boolean)
public void setTransient(boolean isTransient)
isTransient
- true or false.public int getTimeout()
public void setTimeout(int timeout)
timeout
- new time out value, in milliseconds. 0 if you don't want popup automatically hides.public Component getDefaultFocusComponent()
public void setDefaultFocusComponent(Component defaultFocusComponent)
defaultFocusComponent
- the default focus component.public void addPopupMenuListener(PopupMenuListener l)
PopupMenu
listener which will listen to notification messages from the popup portion of the
combo box.
For all standard look and feels shipped with Java 2, the popup list portion of combo box is implemented as a
JPopupMenu
. A custom look and feel may not implement it this way and will therefore not receive the
notification.
l
- the PopupMenuListener
to addpublic void removePopupMenuListener(PopupMenuListener l)
PopupMenuListener
.
l
- the PopupMenuListener
to removeaddPopupMenuListener(javax.swing.event.PopupMenuListener)
public PopupMenuListener[] getPopupMenuListeners()
PopupMenuListener
s added to this JComboBox with addPopupMenuListener().
PopupMenuListener
s added or an empty array if no listeners have been addedpublic void firePopupMenuWillBecomeVisible()
PopupMenuListener
s that the popup portion of the combo box will become visible.
This method is public but should not be called by anything other than the UI delegate.
addPopupMenuListener(javax.swing.event.PopupMenuListener)
public void firePopupMenuWillBecomeInvisible()
PopupMenuListener
s that the popup portion of the combo box has become invisible.
This method is public but should not be called by anything other than the UI delegate.
addPopupMenuListener(javax.swing.event.PopupMenuListener)
public void firePopupMenuCanceled()
PopupMenuListener
s that the popup portion of the combo box has been canceled.
This method is public but should not be called by anything other than the UI delegate.
addPopupMenuListener(javax.swing.event.PopupMenuListener)
public int getDefaultMoveOperation()
HIDE_ON_MOVED
, MOVE_ON_MOVED
or DO_NOTHING_ON_MOVED
.
public void setDefaultMoveOperation(int defaultMoveOperation)
HIDE_ON_MOVED
, MOVE_ON_MOVED
or DO_NOTHING_ON_MOVED
.
defaultMoveOperation
- the default operation when the owner is moved.public void addExcludedComponent(Component component)
JDialog dialog =new JDialog((Frame) JideSwingUtilities.getWindowForComponent(this), true);
dialog.add(new JTable(10, 4));
dialog.pack();
Container ancestorOfClass = SwingUtilities.getAncestorOfClass(JidePopup.class, this); // try
to find the JidePopup
if(ancestorOfClass instanceof JidePopup) {
((JidePopup) ancestorOfClass).addExcludedComponent(dialog);
}
dialog.setVisible(true);
if(ancestorOfClass instanceof JidePopup) {
((JidePopup) ancestorOfClass).removeExcludedComponent(dialog);
}
component
- the component should be excluded.public void removeExcludedComponent(Component component)
component
- the component was excluded before.public void removeAllExcludedComponents()
public boolean isExcludedComponent(Component component)
component
- a component.
public int getGripperLocation()
public void setGripperLocation(int gripperLocation)
SwingConstants.NORTH
, SwingConstants.SOUTH
,
SwingConstants.EAST
, and SwingConstants.WEST
.
gripperLocation
- the new gripper location.public int getPopupType()
public void setPopupType(int popupType)
public boolean isClickOnPopup(MouseEvent e)
e
- the mouse event
protected Component getActualOwner()
setOwner(java.awt.Component)
method. But when one of the
showPopup methods with owner parameter is called, the actual owner will be changed to this component.
public void setPreferredPopupSize(Dimension size)
size
- the size of the popup when it was shown last time.public static boolean isPopupAncestorOf(JidePopup popup, Component c)
public boolean isReturnFocusToOwner()
public void setReturnFocusToOwner(boolean returnFocusToOwner)
returnFocusToOwner
- true or false.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |