|
|||||||||
| Home >> All >> java >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.awt
Class Frame

java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.image.ImageObserver, MenuContainer, java.io.Serializable
- public class Frame
- extends Window
- implements MenuContainer
- extends Window
This class is a top-level window with a title bar and window decorations.
| Nested Class Summary | |
protected class |
Frame.AccessibleAWTFrame
Accessibility support for Frame. |
| Nested classes inherited from class java.awt.Window |
Window.AccessibleAWTWindow |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer, Container.GfxPaintAllVisitor, Container.GfxPaintVisitor, Container.GfxPrintAllVisitor, Container.GfxPrintVisitor, Container.GfxVisitor |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy, Component.HeavyweightInLightweightListener |
| Field Summary | |
static int |
CROSSHAIR_CURSOR
Deprecated. Use Cursor.CROSSHAIR_CURSOR instead. |
static int |
DEFAULT_CURSOR
Deprecated. Replaced by Cursor.DEFAULT_CURSOR instead. |
static int |
E_RESIZE_CURSOR
Deprecated. Use Cursor.E_RESIZE_CURSOR instead. |
private int |
frameSerializedDataVersion
|
static int |
HAND_CURSOR
Deprecated. Use Cursor.HAND_CURSOR instead. |
private Image |
icon
|
static int |
ICONIFIED
|
static int |
MAXIMIZED_BOTH
|
static int |
MAXIMIZED_HORIZ
|
static int |
MAXIMIZED_VERT
|
private Rectangle |
maximizedBounds
Maximized bounds for this frame. |
private boolean |
mbManagement
|
private MenuBar |
menuBar
|
static int |
MOVE_CURSOR
Deprecated. Use Cursor.MOVE_CURSOR instead. |
static int |
N_RESIZE_CURSOR
Deprecated. Use Cursor.N_RESIZE_CURSOR instead. |
static int |
NE_RESIZE_CURSOR
Deprecated. Use Cursor.NE_RESIZE_CURSOR instead. |
private static long |
next_frame_number
|
static int |
NORMAL
|
static int |
NW_RESIZE_CURSOR
Deprecated. Use Cursor.NW_RESIZE_CURSOR instead. |
(package private) java.util.Vector |
ownedWindows
|
private boolean |
resizable
|
static int |
S_RESIZE_CURSOR
Deprecated. Use Cursor.S_RESIZE_CURSOR instead. |
static int |
SE_RESIZE_CURSOR
Deprecated. Use Cursor.SE_RESIZE_CURSOR instead. |
private static long |
serialVersionUID
|
(package private) int |
state
|
static int |
SW_RESIZE_CURSOR
Deprecated. Use Cursor.SW_RESIZE_CURSOR instead. |
static int |
TEXT_CURSOR
Deprecated. Use Cursor.TEXT_CURSOR instead. |
private java.lang.String |
title
|
private boolean |
undecorated
This field indicates whether the frame is undecorated or not. |
static int |
W_RESIZE_CURSOR
Deprecated. Use Cursor.W_RESIZE_CURSOR instead. |
static int |
WAIT_CURSOR
Deprecated. Use Cursor.WAIT_CURSOR. |
private static java.util.ArrayList |
weakFrames
|
| Fields inherited from class java.awt.Window |
windowFocusOwner |
| Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, focusCycleRoot, focusTraversalKeys, layoutMgr, maxSize, ncomponents |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
Frame()
Initializes a new instance of Frame that is not visible
and has no title. |
|
Frame(GraphicsConfiguration gc)
|
|
Frame(java.lang.String title)
Initializes a new instance of Frame that is not visible
and has the specified title. |
|
Frame(java.lang.String title,
GraphicsConfiguration gc)
|
|
| Method Summary | |
void |
addNotify()
Creates the native peer for this window. |
(package private) java.lang.String |
generateName()
Generate a unique name for this frame. |
javax.accessibility.AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this Frame. |
int |
getCursorType()
Deprecated. Use Component.getCursor() instead. |
int |
getExtendedState()
|
static Frame[] |
getFrames()
|
Image |
getIconImage()
Returns this frame's icon. |
Rectangle |
getMaximizedBounds()
Returns the maximized bounds of this frame. |
MenuBar |
getMenuBar()
Returns this frame's menu bar. |
int |
getState()
|
java.lang.String |
getTitle()
Returns this frame's title string. |
private static long |
getUniqueLong()
|
boolean |
isResizable()
Tests whether or not this frame is resizable. |
boolean |
isUndecorated()
Returns whether this frame is undecorated or not. |
private static void |
noteFrame(Frame f)
|
protected java.lang.String |
paramString()
Returns a debugging string describing this window. |
void |
remove(MenuComponent menu)
Removes the specified menu component from this frame. |
void |
removeNotify()
Called when this container is removed from its parent container to inform it to destroy its peer. |
void |
setCursor(int type)
Deprecated. Use Component.setCursor(Cursor) instead. |
void |
setExtendedState(int state)
|
void |
setIconImage(Image icon)
Sets this frame's icon to the specified value. |
void |
setMaximizedBounds(Rectangle maximizedBounds)
|
void |
setMenuBar(MenuBar menuBar)
Sets this frame's menu bar. |
void |
setResizable(boolean resizable)
Sets the resizability of this frame to the specified value. |
void |
setState(int state)
|
void |
setTitle(java.lang.String title)
Sets this frame's title to the specified value. |
void |
setUndecorated(boolean undecorated)
Disables or enables decorations for this frame. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
| Field Detail |
DEFAULT_CURSOR
public static final int DEFAULT_CURSOR
- Deprecated. Replaced by
Cursor.DEFAULT_CURSORinstead.- Constant for the default cursor.
- See Also:
- Constant Field Values
- Constant for the default cursor.
CROSSHAIR_CURSOR
public static final int CROSSHAIR_CURSOR
- Deprecated. Use
Cursor.CROSSHAIR_CURSORinstead.- Constant for a cross-hair cursor.
- See Also:
- Constant Field Values
- Constant for a cross-hair cursor.
TEXT_CURSOR
public static final int TEXT_CURSOR
- Deprecated. Use
Cursor.TEXT_CURSORinstead.- Constant for a cursor over a text field.
- See Also:
- Constant Field Values
- Constant for a cursor over a text field.
WAIT_CURSOR
public static final int WAIT_CURSOR
- Deprecated. Use
Cursor.WAIT_CURSOR.- Constant for a cursor to display while waiting for an action to complete.
- See Also:
- Constant Field Values
- Constant for a cursor to display while waiting for an action to complete.
SW_RESIZE_CURSOR
public static final int SW_RESIZE_CURSOR
- Deprecated. Use
Cursor.SW_RESIZE_CURSORinstead.- Cursor used over SW corner of window decorations.
- See Also:
- Constant Field Values
- Cursor used over SW corner of window decorations.
SE_RESIZE_CURSOR
public static final int SE_RESIZE_CURSOR
- Deprecated. Use
Cursor.SE_RESIZE_CURSORinstead.- Cursor used over SE corner of window decorations.
- See Also:
- Constant Field Values
- Cursor used over SE corner of window decorations.
NW_RESIZE_CURSOR
public static final int NW_RESIZE_CURSOR
- Deprecated. Use
Cursor.NW_RESIZE_CURSORinstead.- Cursor used over NW corner of window decorations.
- See Also:
- Constant Field Values
- Cursor used over NW corner of window decorations.
NE_RESIZE_CURSOR
public static final int NE_RESIZE_CURSOR
- Deprecated. Use
Cursor.NE_RESIZE_CURSORinstead.- Cursor used over NE corner of window decorations.
- See Also:
- Constant Field Values
- Cursor used over NE corner of window decorations.
N_RESIZE_CURSOR
public static final int N_RESIZE_CURSOR
- Deprecated. Use
Cursor.N_RESIZE_CURSORinstead.- Cursor used over N edge of window decorations.
- See Also:
- Constant Field Values
- Cursor used over N edge of window decorations.
S_RESIZE_CURSOR
public static final int S_RESIZE_CURSOR
- Deprecated. Use
Cursor.S_RESIZE_CURSORinstead.- Cursor used over S edge of window decorations.
- See Also:
- Constant Field Values
- Cursor used over S edge of window decorations.
E_RESIZE_CURSOR
public static final int E_RESIZE_CURSOR
- Deprecated. Use
Cursor.E_RESIZE_CURSORinstead.- Cursor used over E edge of window decorations.
- See Also:
- Constant Field Values
- Cursor used over E edge of window decorations.
W_RESIZE_CURSOR
public static final int W_RESIZE_CURSOR
- Deprecated. Use
Cursor.W_RESIZE_CURSORinstead.- Cursor used over W edge of window decorations.
- See Also:
- Constant Field Values
- Cursor used over W edge of window decorations.
HAND_CURSOR
public static final int HAND_CURSOR
- Deprecated. Use
Cursor.HAND_CURSORinstead.- Constant for a hand cursor.
- See Also:
- Constant Field Values
- Constant for a hand cursor.
MOVE_CURSOR
public static final int MOVE_CURSOR
- Deprecated. Use
Cursor.MOVE_CURSORinstead.- Constant for a cursor used during window move operations.
- See Also:
- Constant Field Values
- Constant for a cursor used during window move operations.
ICONIFIED
public static final int ICONIFIED
- See Also:
- Constant Field Values
MAXIMIZED_BOTH
public static final int MAXIMIZED_BOTH
- See Also:
- Constant Field Values
MAXIMIZED_HORIZ
public static final int MAXIMIZED_HORIZ
- See Also:
- Constant Field Values
MAXIMIZED_VERT
public static final int MAXIMIZED_VERT
- See Also:
- Constant Field Values
NORMAL
public static final int NORMAL
- See Also:
- Constant Field Values
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
frameSerializedDataVersion
private int frameSerializedDataVersion
icon
private Image icon
mbManagement
private boolean mbManagement
menuBar
private MenuBar menuBar
ownedWindows
java.util.Vector ownedWindows
resizable
private boolean resizable
state
int state
title
private java.lang.String title
maximizedBounds
private Rectangle maximizedBounds
- Maximized bounds for this frame.
undecorated
private boolean undecorated
- This field indicates whether the frame is undecorated or not.
next_frame_number
private static transient long next_frame_number
weakFrames
private static java.util.ArrayList weakFrames
| Constructor Detail |
Frame
public Frame()
- Initializes a new instance of
Framethat is not visible and has no title.
Frame
public Frame(java.lang.String title)
- Initializes a new instance of
Framethat is not visible and has the specified title.
Frame
public Frame(GraphicsConfiguration gc)
Frame
public Frame(java.lang.String title, GraphicsConfiguration gc)
| Method Detail |
getTitle
public java.lang.String getTitle()
- Returns this frame's title string.
setTitle
public void setTitle(java.lang.String title)
- Sets this frame's title to the specified value.
getIconImage
public Image getIconImage()
- Returns this frame's icon.
setIconImage
public void setIconImage(Image icon)
- Sets this frame's icon to the specified value.
getMenuBar
public MenuBar getMenuBar()
- Returns this frame's menu bar.
setMenuBar
public void setMenuBar(MenuBar menuBar)
- Sets this frame's menu bar. Removes any existing menu bar. If the
given menu bar is part of another frame it will be removed from
that frame.
isResizable
public boolean isResizable()
- Tests whether or not this frame is resizable. This will be
trueby default.
setResizable
public void setResizable(boolean resizable)
- Sets the resizability of this frame to the specified value.
getCursorType
public int getCursorType()
- Deprecated. Use
Component.getCursor()instead.- Returns the cursor type of the cursor for this window. This will be one of the constants in this class.
- Returns the cursor type of the cursor for this window. This will be one of the constants in this class.
setCursor
public void setCursor(int type)
- Deprecated. Use
Component.setCursor(Cursor)instead.- Sets the cursor for this window to the specified type. The specified type should be one of the constants in this class.
- Sets the cursor for this window to the specified type. The specified type should be one of the constants in this class.
remove
public void remove(MenuComponent menu)
- Removes the specified menu component from this frame. If it is
the current MenuBar it is removed from the frame. If it is a
Popup it is removed from this component. If it is any other menu
component it is ignored.
- Specified by:
removein interfaceMenuContainer- Overrides:
removein classComponent
addNotify
public void addNotify()
- Description copied from class:
Window - Creates the native peer for this window.
removeNotify
public void removeNotify()
- Description copied from class:
Container - Called when this container is removed from its parent container to
inform it to destroy its peer. This causes the peers of all child
component to be destroyed as well.
- Overrides:
removeNotifyin classContainer
paramString
protected java.lang.String paramString()
- Returns a debugging string describing this window.
- Overrides:
paramStringin classContainer
noteFrame
private static void noteFrame(Frame f)
getFrames
public static Frame[] getFrames()
setState
public void setState(int state)
getState
public int getState()
setExtendedState
public void setExtendedState(int state)
- Since:
- 1.4
getExtendedState
public int getExtendedState()
- Since:
- 1.4
setMaximizedBounds
public void setMaximizedBounds(Rectangle maximizedBounds)
- Since:
- 1.4
getMaximizedBounds
public Rectangle getMaximizedBounds()
- Returns the maximized bounds of this frame.
- Since:
- 1.4
isUndecorated
public boolean isUndecorated()
- Returns whether this frame is undecorated or not.
- Since:
- 1.4
setUndecorated
public void setUndecorated(boolean undecorated)
- Disables or enables decorations for this frame. This method can only be
called while the frame is not displayable.
- Since:
- 1.4
generateName
java.lang.String generateName()
- Generate a unique name for this frame.
- Overrides:
generateNamein classWindow
getUniqueLong
private static long getUniqueLong()
getAccessibleContext
public javax.accessibility.AccessibleContext getAccessibleContext()
- Gets the AccessibleContext associated with this
Frame. The context is created, if necessary.- Specified by:
getAccessibleContextin interfacejavax.accessibility.Accessible- Overrides:
getAccessibleContextin classWindow
|
|||||||||
| Home >> All >> java >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC