|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
public class Frame
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/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
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. |
static int |
HAND_CURSOR
Deprecated. Use Cursor.HAND_CURSOR instead. |
static int |
ICONIFIED
|
static int |
MAXIMIZED_BOTH
|
static int |
MAXIMIZED_HORIZ
|
static int |
MAXIMIZED_VERT
|
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. |
static int |
NORMAL
|
static int |
NW_RESIZE_CURSOR
Deprecated. Use Cursor.NW_RESIZE_CURSOR instead. |
static int |
S_RESIZE_CURSOR
Deprecated. Use Cursor.S_RESIZE_CURSOR instead. |
static int |
SE_RESIZE_CURSOR
Deprecated. Use Cursor.SE_RESIZE_CURSOR instead. |
static int |
SW_RESIZE_CURSOR
Deprecated. Use Cursor.SW_RESIZE_CURSOR instead. |
static int |
TEXT_CURSOR
Deprecated. Use Cursor.TEXT_CURSOR instead. |
static int |
W_RESIZE_CURSOR
Deprecated. Use Cursor.W_RESIZE_CURSOR instead. |
static int |
WAIT_CURSOR
Deprecated. Use Cursor.WAIT_CURSOR . |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
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(String title)
Initializes a new instance of Frame that is not visible
and has the specified title. |
|
Frame(String title,
GraphicsConfiguration gc)
|
Method Summary | |
---|---|
void |
addNotify()
Creates the native peer for this window. |
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()
|
String |
getTitle()
Returns this frame's title string. |
boolean |
isResizable()
Tests whether or not this frame is resizable. |
boolean |
isUndecorated()
Returns whether this frame is undecorated or not. |
protected 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(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 |
---|
public static final int DEFAULT_CURSOR
Cursor.DEFAULT_CURSOR
instead.
public static final int CROSSHAIR_CURSOR
Cursor.CROSSHAIR_CURSOR
instead.
public static final int TEXT_CURSOR
Cursor.TEXT_CURSOR
instead.
public static final int WAIT_CURSOR
Cursor.WAIT_CURSOR
.
public static final int SW_RESIZE_CURSOR
Cursor.SW_RESIZE_CURSOR
instead.
public static final int SE_RESIZE_CURSOR
Cursor.SE_RESIZE_CURSOR
instead.
public static final int NW_RESIZE_CURSOR
Cursor.NW_RESIZE_CURSOR
instead.
public static final int NE_RESIZE_CURSOR
Cursor.NE_RESIZE_CURSOR
instead.
public static final int N_RESIZE_CURSOR
Cursor.N_RESIZE_CURSOR
instead.
public static final int S_RESIZE_CURSOR
Cursor.S_RESIZE_CURSOR
instead.
public static final int E_RESIZE_CURSOR
Cursor.E_RESIZE_CURSOR
instead.
public static final int W_RESIZE_CURSOR
Cursor.W_RESIZE_CURSOR
instead.
public static final int HAND_CURSOR
Cursor.HAND_CURSOR
instead.
public static final int MOVE_CURSOR
Cursor.MOVE_CURSOR
instead.
public static final int ICONIFIED
public static final int MAXIMIZED_BOTH
public static final int MAXIMIZED_HORIZ
public static final int MAXIMIZED_VERT
public static final int NORMAL
Constructor Detail |
---|
public Frame()
Frame
that is not visible
and has no title.
public Frame(String title)
Frame
that is not visible
and has the specified title.
title
- the title of this framepublic Frame(GraphicsConfiguration gc)
public Frame(String title, GraphicsConfiguration gc)
Method Detail |
---|
public String getTitle()
public void setTitle(String title)
title
- the new frame titlepublic Image getIconImage()
null
if this frame does not
have an iconpublic void setIconImage(Image icon)
public MenuBar getMenuBar()
null
if this frame
does not have a menu barpublic void setMenuBar(MenuBar menuBar)
menuBar
- the new menu bar for this framepublic boolean isResizable()
true
by default.
true
if this frame is resizable, false
otherwisepublic void setResizable(boolean resizable)
resizable
- true
to make the frame resizable,
false
to make it non-resizablepublic int getCursorType()
Component.getCursor()
instead.
public void setCursor(int type)
Component.setCursor(Cursor)
instead.
type
- the cursor typepublic void remove(MenuComponent menu)
remove
in interface MenuContainer
remove
in class Component
menu
- the menu component to removeComponent.add(PopupMenu)
public void addNotify()
Window
addNotify
in class Window
Component.isDisplayable()
,
Component.removeNotify()
public void removeNotify()
Container
removeNotify
in class Container
Component.isDisplayable()
,
Component.addNotify()
protected String paramString()
paramString
in class Container
public static Frame[] getFrames()
public void setState(int state)
public int getState()
public void setExtendedState(int state)
public int getExtendedState()
public void setMaximizedBounds(Rectangle maximizedBounds)
public Rectangle getMaximizedBounds()
public boolean isUndecorated()
public void setUndecorated(boolean undecorated)
IllegalComponentStateException
- if this frame is displayablepublic AccessibleContext getAccessibleContext()
Frame
.
The context is created, if necessary.
getAccessibleContext
in interface Accessible
getAccessibleContext
in class Window
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |