public class FrameView extends View
Modifier and Type | Field and Description |
---|---|
static String |
MAIN_FRAME_NAME |
Constructor and Description |
---|
FrameView(Application application) |
Modifier and Type | Method and Description |
---|---|
JFrame |
getFrame()
Return the JFrame used to show this View
|
JRootPane |
getRootPane()
Gets the
JRootPane for this View. |
void |
setFrame(JFrame frame)
Sets the JFrame use to show this View
|
getApplication, getComponent, getContext, getMenuBar, getResourceMap, getStatusBar, getToolBar, getToolBars, setComponent, setMenuBar, setStatusBar, setToolBar, setToolBars
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
public static final String MAIN_FRAME_NAME
public FrameView(Application application)
public JFrame getFrame()
This 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()); }
public void setFrame(JFrame frame)
This 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. If frame
is null, an IllegalArgumentException
is thrown.
This property is bound.
frame
- the new value of the frame propertygetFrame()
public JRootPane getRootPane()
View
JRootPane
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's component
, menuBar
, toolBar
,
and statusBar
properties.getRootPane
in class View
rootPane
for this ViewView.setComponent(javax.swing.JComponent)
,
View.setMenuBar(javax.swing.JMenuBar)
,
View.setToolBar(javax.swing.JToolBar)
,
View.setStatusBar(javax.swing.JComponent)
Copyright © 2009–2019. All rights reserved.