Package org.jdesktop.application
Class FrameView
- java.lang.Object
-
- org.jdesktop.application.AbstractBean
-
- org.jdesktop.application.View
-
- org.jdesktop.application.FrameView
-
public class FrameView extends View
-
-
Constructor Summary
Constructors Constructor Description FrameView(Application application)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.JFrame
getFrame()
Return the JFrame used to show this Viewjavax.swing.JRootPane
getRootPane()
TheJRootPane
for this View.void
setFrame(javax.swing.JFrame frame)
Sets the JFrame use to show this View-
Methods inherited from class org.jdesktop.application.View
getApplication, getComponent, getContext, getMenuBar, getResourceMap, getStatusBar, getToolBar, getToolBars, setComponent, setMenuBar, setStatusBar, setToolBar, setToolBars
-
Methods inherited from class org.jdesktop.application.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
FrameView
public FrameView(Application application)
-
-
Method Detail
-
getFrame
public javax.swing.JFrame getFrame()
Return the JFrame used to show this ViewThis method may be called at any time; the JFrame is created lazily and cached. For example:
@Override protected void startup() { getFrame().setJMenuBar(createMenuBar()); show(createMainPanel()); }
- Returns:
- this application's main frame
-
setFrame
public void setFrame(javax.swing.JFrame frame)
Sets the JFrame use to show this ViewThis method should be called from the startup method by a subclass that wants to construct and initialize the main frame itself. Most applications can rely on the fact that {code getFrame} lazily constructs the main frame and initializes the
frame
property.If the main frame property was already initialized, either implicitly through a call to
getFrame
or by explicitly calling this method, an IllegalStateException is thrown. Ifframe
is null, an IllegalArgumentException is thrown.This property is bound.
- Parameters:
frame
- the new value of the frame property- See Also:
getFrame()
-
getRootPane
public javax.swing.JRootPane getRootPane()
Description copied from class:View
TheJRootPane
for this View. All of the components for this View must be added to its rootPane. Most applications will do so by setting the View'scomponent
,menuBar
,toolBar
, andstatusBar
properties.- Overrides:
getRootPane
in classView
- Returns:
- The
rootPane
for this View - See Also:
View.setComponent(javax.swing.JComponent)
,View.setMenuBar(javax.swing.JMenuBar)
,View.setToolBar(javax.swing.JToolBar)
,View.setStatusBar(javax.swing.JComponent)
-
-