|
||||||||||
| 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
javax.swing.JFrame
org.jdesktop.swingx.JXFrame
public class JXFrame
JXFrame is an enhanced JFrame. While JXFrame can
replace any JFrame, it has features that make it particularly useful
as the "main" frame for an application.
Root pane: JXFrame uses JXRootPane as its default root pane.
The frame provide several convenience methods to provide easy access to the
additional features.
Idle: JXFrame offers an idle timer. Registering a
PropertyChangeListener for "idle" will notify when the
user has not interacted with the JVM. A primary use for this type of
functionality is to secure the application, blocking access and requiring the
user to login again.
Wait (busy) glass pane: The JXFrame can be configured with an
alternate glass pane. Typically, this glass pane is used to notify the user
that the application is busy, but the glass pane could be for any purpose.
This secondary glass pane can be quickly enabled or disabled by
setting the wait pane visible.
| Nested Class Summary | |
|---|---|
static class |
JXFrame.StartPosition
An enumeration of JXFrame starting locations. |
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
Frame.AccessibleAWTFrame |
| 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 |
|---|
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
|---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| 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, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JXFrame()
Creates a JXFrame with no title and standard closing behavior. |
|
JXFrame(String title)
Creates a JXFrame with the specified title and default closing
behavior. |
|
JXFrame(String title,
boolean exitOnClose)
Creates a JXFrame with the specified title and closing behavior. |
|
| Method Summary | |
|---|---|
protected JRootPane |
createRootPane()
Overridden to create a JXRootPane. |
JButton |
getCancelButton()
Returns the value of the cancel button property from the underlying JXRootPane. |
JButton |
getDefaultButton()
Returns the value of the default button property from the underlying JRootPane. |
long |
getIdleThreshold()
Returns the amount of time that must elapse before the frame automatically enters an idle state. |
boolean |
getKeyPreview()
Returns the value for the key preview. |
JXRootPane |
getRootPaneExt()
Return the extended root pane. |
JXFrame.StartPosition |
getStartPosition()
Returns the start position for this frame. |
JXStatusBar |
getStatusBar()
Returns the value of the status bar property from the underlying JXRootPane. |
JToolBar |
getToolBar()
Returns the value of the tool bar property from the underlying JXRootPane. |
Component |
getWaitPane()
Returns the current wait pane for this frame. |
boolean |
isIdle()
|
boolean |
isWaitCursorVisible()
Returns the state of the wait cursor visibility. |
boolean |
isWaiting()
Determines if the frame is in a wait state or not. |
boolean |
isWaitPaneVisible()
Returns the current visibility of the wait glass pane. |
void |
setCancelButton(JButton button)
Sets the cancel button property on the underlying JXRootPane. |
void |
setCursor(Cursor c)
Set the cursor image to a specified cursor. |
void |
setDefaultButton(JButton button)
Sets the default button property on the underlying JRootPane. |
void |
setIdle(boolean idle)
Sets the frame into an idle state or restores the frame from an idle state. |
void |
setIdleThreshold(long threshold)
Sets a threshold for user interaction before automatically placing the frame in an idle state. |
void |
setKeyPreview(boolean flag)
If enabled the KeyListeners will receive a preview of the KeyEvent prior to normal viewing. |
void |
setRootPane(JRootPane root)
Overridden to make this public. |
void |
setStartPosition(JXFrame.StartPosition position)
Sets the start position for this frame. |
void |
setStatusBar(JXStatusBar statusBar)
Sets the status bar property on the underlying JXRootPane. |
void |
setToolBar(JToolBar toolBar)
Sets the tool bar property on the underlying JXRootPane. |
void |
setVisible(boolean visible)
Shows or hides this component depending on the value of parameter b. |
void |
setWaitCursorVisible(boolean flag)
Switches the display cursor to or from the wait cursor. |
void |
setWaiting(boolean waiting)
Sets the frame into a wait state or restores the frame from a wait state. |
void |
setWaitPane(Component c)
Sets the component to use as a wait glass pane. |
void |
setWaitPaneVisible(boolean flag)
Enabled or disabled the display of the normal or wait glass pane. |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Constructor Detail |
|---|
public JXFrame()
JXFrame with no title and standard closing behavior.
public JXFrame(String title)
JXFrame with the specified title and default closing
behavior.
title - the frame title
public JXFrame(String title,
boolean exitOnClose)
JXFrame with the specified title and closing behavior.
title - the frame titleexitOnClose - true to override the default (JFrame) closing
behavior and use EXIT_ON_CLOSE
instead; false to use the default behavior| Method Detail |
|---|
public void setCancelButton(JButton button)
JXRootPane.
button - the JButton which is to be the cancel buttongetCancelButton(),
JXRootPane.setCancelButton(JButton)public JButton getCancelButton()
JXRootPane.
JButton which is the cancel button#setCancelButton(),
JXRootPane.getCancelButton()public void setDefaultButton(JButton button)
JRootPane.
button - the JButton which is to be the default buttongetDefaultButton(),
JRootPane.setDefaultButton(JButton)public JButton getDefaultButton()
JRootPane.
JButton which is the default buttonsetDefaultButton(JButton),
JRootPane.getDefaultButton()public void setKeyPreview(boolean flag)
KeyListeners will receive a preview of the KeyEvent prior to normal viewing.
flag - true to enable previewing; false otherwisegetKeyPreview(),
Component.addKeyListener(KeyListener)public final boolean getKeyPreview()
true previewing is enabled; otherwise it is notsetKeyPreview(boolean)public void setStartPosition(JXFrame.StartPosition position)
position - the position to display the frame atgetStartPosition(),
setVisible(boolean)public JXFrame.StartPosition getStartPosition()
setStartPosition(StartPosition)public void setWaitCursorVisible(boolean flag)
flag - true to enable the wait cursor; false to
enable the previous cursorisWaitCursorVisible(),
Cursor.WAIT_CURSORpublic boolean isWaitCursorVisible()
true if the current cursor is the wait cursor; false otherwisepublic void setCursor(Cursor c)
setCursor in class Windowc - One of the constants defined
by the Cursor class. If this parameter is null
then the cursor for this window will be set to the type
Cursor.DEFAULT_CURSOR.Component.getCursor(),
Cursorpublic void setWaitPane(Component c)
isWaitPaneVisible() == true.
c - the wait glass pane for this framegetWaitPane(),
setWaitPaneVisible(boolean)public Component getWaitPane()
setWaitPane(Component)public void setWaitPaneVisible(boolean flag)
true the wait pane is be displayed. Altering this property alters
the display hierarchy.
flag - true to display the wait glass pane; false to
display the normal glass paneisWaitPaneVisible(),
setWaitPane(Component)public boolean isWaitPaneVisible()
true if the wait glass pane is visible; false
otherwisepublic void setWaiting(boolean waiting)
waiting - true to place the frame in a wait state; false
otherwiseisWaiting(),
setWaitCursorVisible(boolean),
setWaitPaneVisible(boolean)public boolean isWaiting()
true if the frame is in the wait state; false
otherwisesetWaiting(boolean)public void setVisible(boolean visible)
b.
setVisible in class Componentvisible - if true, shows this component;
otherwise, hides this componentComponent.isVisible()public boolean isIdle()
public void setIdle(boolean idle)
waiting - true to place the frame in an idle state; false
otherwiseisIdle(),
setIdleThreshold(long)public void setIdleThreshold(long threshold)
threshold - the time (in milliseconds) to elapse before setting the frame
idlegetIdleThreshold(),
setIdle(boolean)public long getIdleThreshold()
public void setStatusBar(JXStatusBar statusBar)
JXRootPane.
statusBar - the JXStatusBar which is to be the status bargetStatusBar(),
JXRootPane.setStatusBar(JXStatusBar)public JXStatusBar getStatusBar()
JXRootPane.
JXStatusBar which is the current status barsetStatusBar(JXStatusBar),
JXRootPane.getStatusBar()public void setToolBar(JToolBar toolBar)
JXRootPane.
toolBar - the JToolBar which is to be the tool bargetToolBar(),
JXRootPane.setToolBar(JToolBar)public JToolBar getToolBar()
JXRootPane.
JToolBar which is the current tool barsetToolBar(JToolBar),
JXRootPane.getToolBar()protected JRootPane createRootPane()
createRootPane in class JFramepublic void setRootPane(JRootPane root)
setRootPane in class JFrameroot - the rootPane object for this frameJFrame.getRootPane()public JXRootPane getRootPaneExt()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||