|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmvp.View
scheduler.scheduler_ui.SchedulerUI
public class SchedulerUI
Class SchedulerUI is a companion view to the Scheduler model class. The window component of the SchedulerUI is a free-floating JMenuBar, containing JMenus for the pulldown command menus.
SchedulerUI contains an instance of the view classes that are companion to each of the Scheduler Model classes. Here is the correspondence:
Model Class Companion View Class ----------------------------------------------- file.File file_ui.FileUI edit.Edit edit_ui.EditUI view.View view_ui.ViewUI help.Help help_ui.HelpUIEach of these view classes contains all of the interface components needed for UI access to their companion model's methods and data.
SchedulerUI extends the abstract View class as follows. First, the constructor is sent a Screen and Scheduler model. The screen and model inputs come from the top-level Main function, which calls the SchedulerUI constructor. These inputs are passed up to the parent View constructor, which initializes the inherited screen and model data fields, respectively. The SchedulerUI constructor then creates its own JMenuBar and calls the constructors for each of the component views. These component view constructors in turn call the constructors for their components, and so on until all interface components are constructed.
SchedulerUI specializes the View.compose method to compose its own top-level window with the menubar. SchedulerUI.compose then calls the compose methods for each of its component views, which in turn do their own composition, call their components' compose methods, and so on until all interface components are composed.
Displaywise, all of the subviews are autonomous units that are not controlled by the top-level SchedulerUI. All that this top-level class does is construct and compose the menubar, construct and compose the subviews, and set up the initial display state.
See also the companion model class Scheduler.
Field Summary | |
---|---|
protected EditUI |
editUI
The pulldown Edit menu. |
protected FileUI |
fileUI
The pulldown File menu. |
protected HelpUI |
helpUI
The pulldown Help menu. |
protected javax.swing.JMenuBar |
menuBar
The top-level menu bar. |
protected scheduler.schedule.schedule_ui.ScheduleUI |
scheduleUI
|
protected ViewUI |
viewUI
The pulldown View menu. |
Fields inherited from class mvp.View |
---|
closeAdapter, editable, model, screen, shown, widget, window |
Constructor Summary | |
---|---|
SchedulerUI(mvp.Screen screen,
scheduler.Scheduler scheduler)
Construct this with the given UI screen and Scheduler model. |
Method Summary | |
---|---|
java.awt.Component |
compose()
Compose this by (1) creating a new window, (2) setting the window's menubar to this' menubar, (3) populating the menubar with the menus, (4) calling compose in turn for each menu, and (5) setting the window title. |
protected java.awt.Component |
composeHelpSpacing()
Compose a piece of horizontal glue to be inserted between the options menu and the help menu in the menubar. |
protected void |
composeMenuBar()
Compose this' menubar by adding each composed menu to it. |
protected void |
constructSubviews(SchedulerUI this2)
Call the constructor for each of the component views. |
mvp.Window |
getTopLevelWindow()
|
protected void |
initialize()
Configure the initial display based on the tool's option settings. |
Methods inherited from class mvp.View |
---|
getModel, getWidget, getWindow, hide, isEditable, isShown, run, setEditable, setExitOnClose, setModel, show, show, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.swing.JMenuBar menuBar
protected FileUI fileUI
protected EditUI editUI
protected ViewUI viewUI
protected HelpUI helpUI
protected scheduler.schedule.schedule_ui.ScheduleUI scheduleUI
Constructor Detail |
---|
public SchedulerUI(mvp.Screen screen, scheduler.Scheduler scheduler)
Method Detail |
---|
public java.awt.Component compose()
Since this is the top-level window, call setExitOnClose(true) to have a close of this window exit the entire application. This means that the companion model must implement the exit method to do the right thing.
compose
in class mvp.View
public mvp.Window getTopLevelWindow()
protected void constructSubviews(SchedulerUI this2)
protected void composeMenuBar()
protected java.awt.Component composeHelpSpacing()
protected void initialize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |