| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private KeyboardFocusManager | |
| protected static final boolean | |
| protected static final boolean | |
| private boolean | |
| private static final long | serialVersionUID
Use serialVersionUID from JDK 1.1 for interoperability.
|
| private boolean |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | addNotify()
Overrides java. Makes this Frame displayable by connecting it to a native screen resource. |
| private void | addTraversingOutListeners(KeyboardFocusManager kfm)
Register us as KeyEventDispatcher and property "managingFocus" listeners. |
| public boolean | dispatchKeyEvent(KeyEvent e)
Implements java. Need this method to detect when the focus may have chance to leave the focus cycle root which is EmbeddedFrame. |
| protected Rectangle | Returns: a rectangle indicating this embedded frame's boundsGets the bounds of this embedded frame as a rectangle specifying the width, height and location relative to the native parent component. |
| public Cursor | |
| protected Point | Returns: a point indicating this embedded frame's top-left cornerGets the location of this embedded frame as a point specifying the top-left corner relative to parent component. |
| public Container | getParent()
Overrides java. Block introspection of a parent window by this child. |
| public void | hide()
Overrides java. Needed to avoid memory leak: we register this EmbeddedFrame as a listener with the KeyboardFocusManager. |
| public boolean | |
| public boolean | isResizable()
Overrides java. Indicates whether this frame is resizable by the user. |
| public void | |
| public void | propertyChange(PropertyChangeEvent evt)
Implements java. Needed to track which KeyboardFocusManager is current. |
| public abstract void | |
| public void | registerListeners()
Those who want to use the functionality of traversing out of the EmbeddedFrame must call this method. |
| public void | remove(MenuComponent m)
Overrides java. Implements java. Removes the specified menu bar from this frame. |
| private void | removeTraversingOutListeners(KeyboardFocusManager kfm)
Deregister us as KeyEventDispatcher and property "managingFocus" listeners. |
| protected void | setBoundsPrivate(int
the new x-coordinate relative to the parent component x, int the new y-coordinate relative to the parent component y, int the new width, int width of this embedded framethe new height)height of this embedded frameMoves and resizes this embedded frame. |
| public void | |
| public void | setIconImage(Image image)
Overrides java. Sets the image to be displayed as the icon for this window. |
| public void | setIconImages(List<? extends Image> icons)
Overrides java. Sets the sequence of images to be displayed as the icon for this window. |
| protected void | setLocationPrivate(int
the new x-coordinate relative to the parent component x, int the new y-coordinate relative to the parent component y)Moves this embedded frame to a new location. |
| public void | setMenuBar(MenuBar mb)
Overrides java. Sets the menu bar for this frame to the specified menu bar. |
| protected void | |
| public void | setResizable(boolean resizable)
Overrides java. Sets whether this frame is resizable by the user. |
| public void | setTitle(String title)
Overrides java. Block modifying any frame attributes, since they aren't applicable for EmbeddedFrames. |
| public void | show()
Overrides java. Needed to avoid memory leak: we register this EmbeddedFrame as a listener with the KeyboardFocusManager. |
| public boolean | |
| public void | synthesizeWindowActivation(boolean
if doActivate)true, activates the window;
otherwise, deactivates the windowSynthesize native message to activate or deactivate EmbeddedFrame window
depending on the value of parameter |
| public void | toBack()
Overrides java. If this Window is visible, sends this Window to the back and may cause it to lose focus or activation if it is the focused or active Window. |
| public void | toFront()
Overrides java. If this Window is visible, brings this Window to the front and may make it the focused Window. |
| public boolean | Returns: true, if the EmbeddedFrame wants to get focus, false otherwise.FORWARD or BACKWARD direction)This method is called by the embedder when we should receive focus as element of the traversal chain. |
| protected boolean | Returns: true, if EmbeddedFrame wants the focus to leave it, false otherwise.FORWARD or BACKWARD direction)This method is called from dispatchKeyEvent in the following two cases: 1. |
| public abstract void |
| appKFM | back to summary |
|---|---|
private KeyboardFocusManager appKFM
| |
| BACKWARD | back to summary |
|---|---|
| protected static final boolean BACKWARD | |
| FORWARD | back to summary |
|---|---|
| protected static final boolean FORWARD | |
| isCursorAllowed | back to summary |
|---|---|
| private boolean isCursorAllowed | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. Use serialVersionUID from JDK 1.1 for interoperability. | |
| supportsXEmbed | back to summary |
|---|---|
| private boolean supportsXEmbed | |
| EmbeddedFrame | back to summary |
|---|---|
| protected EmbeddedFrame(boolean supportsXEmbed) | |
| EmbeddedFrame | back to summary |
|---|---|
| protected EmbeddedFrame() | |
| EmbeddedFrame | back to summary |
|---|---|
| protected EmbeddedFrame(int handle)
Deprecated This constructor will be removed in 1.5
| |
| EmbeddedFrame | back to summary |
|---|---|
| protected EmbeddedFrame(long handle) | |
| EmbeddedFrame | back to summary |
|---|---|
| protected EmbeddedFrame(long handle, boolean supportsXEmbed) | |
| addNotify | back to summary |
|---|---|
| public void addNotify() Overrides java. Doc from java. Makes this Frame displayable by connecting it to a native screen resource. Making a frame displayable will cause any of its children to be made displayable. This method is called internally by the toolkit and should not be called directly by programs. | |
| addTraversingOutListeners | back to summary |
|---|---|
| private void addTraversingOutListeners(KeyboardFocusManager kfm) Register us as KeyEventDispatcher and property "managingFocus" listeners. | |
| dispatchKeyEvent | back to summary |
|---|---|
| public boolean dispatchKeyEvent(KeyEvent e) Implements java. Need this method to detect when the focus may have chance to leave the focus cycle root which is EmbeddedFrame. Mostly, the code here is copied from DefaultKeyboardFocusManager.processKeyEvent with some minor modifications. | |
| getBoundsPrivate | back to summary |
|---|---|
| protected Rectangle getBoundsPrivate() Gets the bounds of this embedded frame as a rectangle specifying the width, height and location relative to the native parent component. setLocation() and setBounds() for EmbeddedFrame really don't move it within the native parent. These methods always put embedded frame to (0, 0) for backward compatibility. To allow getting location and size of embedded frames getLocationPrivate() and getBoundsPrivate() were introduced, and they work just the same way as getLocation() and getBounds() for usual, non-embedded components. Using usual get/setLocation() and get/setBounds() together with new get/setLocationPrivate() and get/setBoundsPrivate() is not recommended. For example, calling getBoundsPrivate() after setLocation() works fine, but getBounds() after setBoundsPrivate() may return unpredictable value.
| |
| getCursor | back to summary |
|---|---|
| public Cursor getCursor() Overrides java. Doc from java. Gets the cursor set in the component. If the component does
not have a cursor set, the cursor of its parent is returned.
If no cursor is set in the entire hierarchy,
| |
| getLocationPrivate | back to summary |
|---|---|
| protected Point getLocationPrivate() Gets the location of this embedded frame as a point specifying the top-left corner relative to parent component. setLocation() and setBounds() for EmbeddedFrame really don't move it within the native parent. These methods always put embedded frame to (0, 0) for backward compatibility. To allow getting location and size of embedded frame getLocationPrivate() and getBoundsPrivate() were introduced, and they work just the same way as getLocation() and getBounds() for usual, non-embedded components. Using usual get/setLocation() and get/setBounds() together with new get/setLocationPrivate() and get/setBoundsPrivate() is not recommended. For example, calling getBoundsPrivate() after setLocation() works fine, but getBounds() after setBoundsPrivate() may return unpredictable value.
| |
| getParent | back to summary |
|---|---|
| public Container getParent() Overrides java. Block introspection of a parent window by this child. | |
| hide | back to summary |
|---|---|
| public void hide() Overrides java. Needed to avoid memory leak: we register this EmbeddedFrame as a listener with the KeyboardFocusManager. We don't want the KFM to keep reference to our EmbeddedFrame forever if the Frame is no longer in use, so we add listeners in show() and remove them in hide().
| |
| isCursorAllowed | back to summary |
|---|---|
| public boolean isCursorAllowed() | |
| isResizable | back to summary |
|---|---|
| public boolean isResizable() Overrides java. Doc from java. Indicates whether this frame is resizable by the user. By default, all frames are initially resizable. | |
| notifyModalBlocked | back to summary |
|---|---|
| public void notifyModalBlocked(Dialog blocker, boolean blocked) This method should be overridden in subclasses. It is called when window this frame is within should be blocked by some modal dialog. | |
| propertyChange | back to summary |
|---|---|
| public void propertyChange(PropertyChangeEvent evt) Implements java. Needed to track which KeyboardFocusManager is current. We want to avoid memory leaks, so when KFM stops being current, we remove ourselves as listeners. | |
| registerAccelerator | back to summary |
|---|---|
| public abstract void registerAccelerator(AWTKeyStroke stroke) | |
| registerListeners | back to summary |
|---|---|
| public void registerListeners() Those who want to use the functionality of traversing out of the EmbeddedFrame must call this method. After that, all the changes can be handled automatically, including possible replacement of KeyboardFocusManager. | |
| remove | back to summary |
|---|---|
| public void remove(MenuComponent m) Overrides java. Implements java. Doc from java. Removes the specified menu bar from this frame. | |
| removeTraversingOutListeners | back to summary |
|---|---|
| private void removeTraversingOutListeners(KeyboardFocusManager kfm) Deregister us as KeyEventDispatcher and property "managingFocus" listeners. | |
| setBoundsPrivate | back to summary |
|---|---|
| protected void setBoundsPrivate(int x, int y, int width, int height) Moves and resizes this embedded frame. The new location of the top-left
corner is specified by setLocation() and setBounds() for EmbeddedFrame really don't move it within the native parent. These methods always put embedded frame to (0, 0) for backward compatibility. To allow moving embedded frames setLocationPrivate() and setBoundsPrivate() were introduced, and they work just the same way as setLocation() and setBounds() for usual, non-embedded components. Using usual get/setLocation() and get/setBounds() together with new get/setLocationPrivate() and get/setBoundsPrivate() is not recommended. For example, calling getBoundsPrivate() after setLocation() works fine, but getBounds() after setBoundsPrivate() may return unpredictable value.
| |
| setCursorAllowed | back to summary |
|---|---|
| public void setCursorAllowed(boolean isCursorAllowed) | |
| setIconImage | back to summary |
|---|---|
| public void setIconImage(Image image) Overrides java. Doc from java. Sets the image to be displayed as the icon for this window.
This method can be used instead of The following statement:
setIconImage(image);
is equivalent to:
ArrayList<Image> imageList = new ArrayList<Image>();
imageList.add(image);
setIconImages(imageList);
Note : Native windowing systems may use different images of differing dimensions to represent a window, depending on the context (e.g. window decoration, window list, taskbar, etc.). They could also use just a single image for all contexts or no image at all. | |
| setIconImages | back to summary |
|---|---|
| public void setIconImages(List<? extends Image> icons) Overrides java. Doc from java. Sets the sequence of images to be displayed as the icon
for this window. Subsequent calls to Depending on the platform capabilities one or several images of different dimensions will be used as the window's icon.
The
Ownerless windows with no icon specified use platform-default icon.
The icon of an owned window may be inherited from the owner
unless explicitly overridden.
Setting the icon to Note : Native windowing systems may use different images of differing dimensions to represent a window, depending on the context (e.g. window decoration, window list, taskbar, etc.). They could also use just a single image for all contexts or no image at all. | |
| setLocationPrivate | back to summary |
|---|---|
| protected void setLocationPrivate(int x, int y) Moves this embedded frame to a new location. The top-left corner of
the new location is specified by the setLocation() and setBounds() for EmbeddedFrame really don't move it within the native parent. These methods always put embedded frame to (0, 0) for backward compatibility. To allow moving embedded frame setLocationPrivate() and setBoundsPrivate() were introduced, and they work just the same way as setLocation() and setBounds() for usual, non-embedded components. Using usual get/setLocation() and get/setBounds() together with new get/setLocationPrivate() and get/setBoundsPrivate() is not recommended. For example, calling getBoundsPrivate() after setLocation() works fine, but getBounds() after setBoundsPrivate() may return unpredictable value.
| |
| setMenuBar | back to summary |
|---|---|
| public void setMenuBar(MenuBar mb) Overrides java. Doc from java. Sets the menu bar for this frame to the specified menu bar. | |
| setPeer | back to summary |
|---|---|
| protected void setPeer(final ComponentPeer p) | |
| setResizable | back to summary |
|---|---|
| public void setResizable(boolean resizable) Overrides java. Doc from java. Sets whether this frame is resizable by the user. | |
| setTitle | back to summary |
|---|---|
| public void setTitle(String title) Overrides java. Block modifying any frame attributes, since they aren't applicable for EmbeddedFrames. | |
| show | back to summary |
|---|---|
| public void show() Overrides java. Needed to avoid memory leak: we register this EmbeddedFrame as a listener with the KeyboardFocusManager. We don't want the KFM to keep reference to our EmbeddedFrame forever if the Frame is no longer in use, so we add listeners in show() and remove them in hide().
| |
| supportsXEmbed | back to summary |
|---|---|
| public boolean supportsXEmbed() | |
| synthesizeWindowActivation | back to summary |
|---|---|
| public void synthesizeWindowActivation(boolean doActivate) Synthesize native message to activate or deactivate EmbeddedFrame window
depending on the value of parameter
| |
| toBack | back to summary |
|---|---|
| public void toBack() Overrides java. Doc from java. If this Window is visible, sends this Window to the back and may cause it to lose focus or activation if it is the focused or active Window. Places this Window at the bottom of the stacking order and shows it behind any other Windows in this VM. No action will take place is this Window is not visible. Some platforms do not allow Windows which are owned by other Windows to appear below their owners. Every attempt will be made to move this Window as low as possible in the stacking order; however, developers should not assume that this method will move this Window below all other windows in every situation. Because of variations in native windowing systems, no guarantees about changes to the focused and active Windows can be made. Developers must never assume that this Window is no longer the focused or active Window until this Window receives a WINDOW_LOST_FOCUS or WINDOW_DEACTIVATED event. On platforms where the top-most window is the focused window, this method will probably cause this Window to lose focus. In that case, the next highest, focusable Window in this VM will receive focus. On platforms where the stacking order does not typically affect the focused window, this method will probably leave the focused and active Windows unchanged. | |
| toFront | back to summary |
|---|---|
| public void toFront() Overrides java. Doc from java. If this Window is visible, brings this Window to the front and may make it the focused Window. Places this Window at the top of the stacking order and shows it in front of any other Windows in this VM. No action will take place if this Window is not visible. Some platforms do not allow Windows which own other Windows to appear on top of those owned Windows. Some platforms may not permit this VM to place its Windows above windows of native applications, or Windows of other VMs. This permission may depend on whether a Window in this VM is already focused. Every attempt will be made to move this Window as high as possible in the stacking order; however, developers should not assume that this method will move this Window above all other windows in every situation. Developers must never assume that this Window is the focused or active Window until this Window receives a WINDOW_GAINED_FOCUS or WINDOW_ACTIVATED event. On platforms where the top-most window is the focused window, this method will probably focus this Window (if it is not already focused) under the following conditions:
If this method causes this Window to be focused, and this Window is a Frame or a Dialog, it will also become activated. If this Window is focused, but it is not a Frame or a Dialog, then the first Frame or Dialog that is an owner of this Window will be activated. If this window is blocked by modal dialog, then the blocking dialog is brought to the front and remains above the blocked window. | |
| traverseIn | back to summary |
|---|---|
| public boolean traverseIn(boolean direction) This method is called by the embedder when we should receive focus as element of the traversal chain. The method requests focus on: 1. the first Component of this EmbeddedFrame if user moves focus forward in the focus traversal cycle. 2. the last Component of this EmbeddedFrame if user moves focus backward in the focus traversal cycle. The direction parameter specifies which of the two mentioned cases is happening. Use FORWARD and BACKWARD constants defined in the EmbeddedFrame class to avoid confusing boolean values. A concrete implementation of this method is defined in the platform-dependent subclasses.
| |
| traverseOut | back to summary |
|---|---|
| protected boolean traverseOut(boolean direction) This method is called from dispatchKeyEvent in the following two cases: 1. The focus is on the first Component of this EmbeddedFrame and we are about to transfer the focus backward. 2. The focus in on the last Component of this EmbeddedFrame and we are about to transfer the focus forward. This is needed to give the opportunity for keyboard focus to leave the EmbeddedFrame. Override this method, initiate focus transfer in it and return true if you want the focus to leave EmbeddedFrame's cycle. The direction parameter specifies which of the two mentioned cases is happening. Use FORWARD and BACKWARD constants defined in EmbeddedFrame to avoid confusing boolean values.
| |
| unregisterAccelerator | back to summary |
|---|---|
| public abstract void unregisterAccelerator(AWTKeyStroke stroke) | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | emulateActivation(boolean activate)
Implements java. Requests the peer to emulate window activation. |
| public Rectangle | getBoundsPrivate()
Implements java. Returns the size and location for embedded frames. |
| public Component | |
| public int | |
| public boolean | |
| public boolean | |
| public void | |
| public void | setBoundsPrivate(int x, int y, int width, int height)
Implements java. Sets the size and location for embedded frames. |
| public void | |
| public void | setMaximizedBounds(Rectangle b)
Implements java. Sets the bounds of the frame when it becomes maximized. |
| public void | setMenuBar(MenuBar mb)
Implements java. Sets the menu bar for the frame. |
| public void | setModalBlocked(Dialog blocker, boolean blocked)
Implements java. Sets if this window is blocked by a modal dialog or not. |
| public void | setOpacity(float opacity)
Implements java. Sets the level of opacity for the window. |
| public void | setOpaque(boolean isOpaque)
Implements java. Enables the per-pixel alpha support for the window. |
| public void | setResizable(boolean resizeable)
Implements java. Sets if the frame should be resizable or not. |
| public void | |
| public void | |
| public void | toBack()
Implements java. Makes this window the bottommost window on the desktop. |
| public void | toFront()
Implements java. Makes this window the topmost window on the desktop. |
| public void | |
| public void | updateAlwaysOnTopState()
Implements java. Updates the window's always-on-top state. |
| public void | updateFocusableWindowState()
Implements java. Updates the window's focusable state. |
| public void | updateIconImages()
Implements java. Updates the icons for the window. |
| public void | updateMinimumSize()
Implements java. Updates the minimum size on the peer. |
| public void | updateWindow()
Implements java. Updates the native part of non-opaque window. |
| NullEmbeddedFramePeer | back to summary |
|---|---|
| private NullEmbeddedFramePeer() | |
| emulateActivation | back to summary |
|---|---|
| public void emulateActivation(boolean activate) Implements java. Doc from java. Requests the peer to emulate window activation. | |
| getBoundsPrivate | back to summary |
|---|---|
| public Rectangle getBoundsPrivate() Implements java. Doc from java. Returns the size and location for embedded frames. (On embedded frames, setLocation() and setBounds() always set the frame to (0,0) for backwards compatibility. | |
| getGlobalHeavyweightFocusOwner | back to summary |
|---|---|
| public Component getGlobalHeavyweightFocusOwner() | |
| getState | back to summary |
|---|---|
| public int getState() Implements java. Doc from java. Returns the current state of the frame. | |
| isRestackSupported | back to summary |
|---|---|
| public boolean isRestackSupported() | |
| requestWindowFocus | back to summary |
|---|---|
| public boolean requestWindowFocus() | |
| restack | back to summary |
|---|---|
| public void restack() | |
| setBoundsPrivate | back to summary |
|---|---|
| public void setBoundsPrivate(int x, int y, int width, int height) Implements java. Doc from java. Sets the size and location for embedded frames. (On embedded frames, setLocation() and setBounds() always set the frame to (0,0) for backwards compatibility. | |
| setIconImage | back to summary |
|---|---|
| public void setIconImage(Image im) | |
| setMaximizedBounds | back to summary |
|---|---|
| public void setMaximizedBounds(Rectangle b) Implements java. Doc from java. Sets the bounds of the frame when it becomes maximized. | |
| setMenuBar | back to summary |
|---|---|
| public void setMenuBar(MenuBar mb) Implements java. Doc from java. Sets the menu bar for the frame. | |
| setModalBlocked | back to summary |
|---|---|
| public void setModalBlocked(Dialog blocker, boolean blocked) Implements java. Doc from java. Sets if this window is blocked by a modal dialog or not. | |
| setOpacity | back to summary |
|---|---|
| public void setOpacity(float opacity) Implements java. Doc from java. Sets the level of opacity for the window. | |
| setOpaque | back to summary |
|---|---|
| public void setOpaque(boolean isOpaque) Implements java. Doc from java. Enables the per-pixel alpha support for the window. | |
| setResizable | back to summary |
|---|---|
| public void setResizable(boolean resizeable) Implements java. Doc from java. Sets if the frame should be resizable or not. | |
| setState | back to summary |
|---|---|
| public void setState(int state) Implements java. Doc from java. Changes the state of the frame. | |
| setTitle | back to summary |
|---|---|
| public void setTitle(String title) Implements java. Doc from java. Sets the title on the frame. | |
| toBack | back to summary |
|---|---|
| public void toBack() Implements java. Doc from java. Makes this window the bottommost window on the desktop. | |
| toFront | back to summary |
|---|---|
| public void toFront() Implements java. Doc from java. Makes this window the topmost window on the desktop. | |
| updateAlwaysOnTop | back to summary |
|---|---|
| public void updateAlwaysOnTop() | |
| updateAlwaysOnTopState | back to summary |
|---|---|
| public void updateAlwaysOnTopState() Implements java. Doc from java. Updates the window's always-on-top state. Sets if the window should always stay on top of all other windows or not. | |
| updateFocusableWindowState | back to summary |
|---|---|
| public void updateFocusableWindowState() Implements java. Doc from java. Updates the window's focusable state. | |
| updateIconImages | back to summary |
|---|---|
| public void updateIconImages() Implements java. Doc from java. Updates the icons for the window. | |
| updateMinimumSize | back to summary |
|---|---|
| public void updateMinimumSize() Implements java. Doc from java. Updates the minimum size on the peer. | |
| updateWindow | back to summary |
|---|---|
| public void updateWindow() Implements java. Doc from java. Updates the native part of non-opaque window. | |