|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--edu.brook.ascape.view.PanelImp
|
+--edu.brook.ascape.view.PanelView
|
+--edu.brook.ascape.view.ControlBarView
A class providing a control bar for controlling a simulation. Provides start, stop, restart, pause, resume, quit, info, status, and new charts. Control views can be attached to any scape, and controls will typically affect the model (entire collection of scapes) as a whole. Use SimpleControlView if Swing is not available or if simple buttons are preferred to image buttons with tool-tips. Requires Swing.
| Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Field Summary | |
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction |
addHistAction
Scape control for creating a new histogram. |
protected javax.swing.JButton |
addHistButton
|
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction |
addPieAction
Scape control for creating a new pie chart. |
protected javax.swing.JButton |
addPieButton
|
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction |
addTSAction
Scape control for creating a new time series graph. |
protected javax.swing.JButton |
addTSButton
|
protected javax.swing.JLabel |
delayIcon
|
protected javax.swing.JPanel |
delayPanel
|
protected int |
delayScale
|
protected javax.swing.JSlider |
delaySlider
|
protected javax.swing.JComboBox |
frameList
|
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction |
infoAction
Scape control for getting information about a scape. |
protected javax.swing.JButton |
infoButton
|
protected boolean |
lastScapeAppearsPaused
Did the scape appear to be paused last iteration? |
protected boolean |
lastScapeAppearsRunning
Did the scape appear to be running last iteration? |
protected float |
maxDelayInSecs
|
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction |
openAction
Scape control for opening a new scape. |
protected javax.swing.JButton |
openButton
|
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction |
pauseToggleAction
Scape control for pausing a scape. |
protected javax.swing.JButton |
pauseToggleButton
|
protected javax.swing.JLabel |
periodLabel
|
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction |
quitAction
Scape control for quiting the model. |
protected javax.swing.JButton |
quitButton
|
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction |
recordAction
Scape control for starting and stopping a scape recording session. |
protected javax.swing.JButton |
recordButton
|
protected javax.swing.JDialog |
recordDialog
|
protected GraphicsRecorder |
recorder
|
protected ViewFrameBridge |
recordFrame
|
protected boolean |
recording
|
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction |
saveAction
Scape control for saving a scape. |
protected javax.swing.JButton |
saveButton
|
protected boolean |
scapeAppearsPaused
Does the scape appear to be paused? |
protected boolean |
scapeAppearsRunning
Does the scape appear to be running? |
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction |
settingsAction
Scape control for starting a scape. |
protected javax.swing.JButton |
settingsButton
|
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction |
startAction
Scape control for starting a scape. |
protected javax.swing.JButton |
startButton
|
protected javax.swing.JLabel |
statusLabel
|
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction |
stepAction
Scape control for stepping a scape one iteration. |
protected javax.swing.JButton |
stepButton
|
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction |
stopAction
Scape control for stoping a scape. |
protected javax.swing.JButton |
stopButton
|
protected javax.swing.JToolBar |
toolBar
|
protected boolean |
waitingForRecordSelection
|
| Fields inherited from class edu.brook.ascape.view.PanelView |
awaitingUpdate,
frame,
name,
recorder,
recordNext,
scape |
| Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
| Constructor Summary | |
ControlBarView()
Constructs the control view, creating and laying out its components. |
|
ControlBarView(java.lang.String name)
Constructs the control view, creating and laying out its components. |
|
| Method Summary | |
void |
build()
Constructs the tool bar buttons and actions, and places them within the toolbar. |
float |
getMaxDelayInSecs()
Returns the maximum delay that the control bar delay slider can cause. |
java.lang.String |
getName()
Returns a name for the view as defined by set name. |
protected void |
newChart(int chartType)
|
void |
onIterate()
Called on interation; delays models return by delay slider setting. |
void |
onUpdate()
Update the components. |
protected void |
recordingCancelStop()
Called to stop or cancel recording. |
protected void |
recordingCreate()
Called to create recording session and setup control dialog. |
protected void |
recordingStart(ViewFrameBridge frame)
Called to start recording. |
protected void |
recordingStatusUpdate()
Called to update recording. |
void |
setFrameSelection(java.lang.Object o)
|
void |
setIgnoreFrameSelection(boolean ignore)
|
void |
setMaxDelayInSecs(float name)
Sets the maximum delay that the control bar delay slider can cause. |
void |
setName(java.lang.String name)
Sets the name of this view. |
java.lang.String |
toString()
Returns a short description of this view. |
| Methods inherited from class edu.brook.ascape.view.PanelView |
addScape,
getGraphicsRecorder,
getScape,
getViewFrame,
onSetup,
onStart,
onStop,
paint,
removeScape,
scapeUpdated,
setGraphicsRecorder,
setViewFrame,
updated |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener,
addNotify,
addPropertyChangeListener,
addVetoableChangeListener,
computeVisibleRect,
contains,
createToolTip,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
fireVetoableChange,
getActionForKeyStroke,
getAlignmentX,
getAlignmentY,
getAutoscrolls,
getBorder,
getBounds,
getClientProperty,
getComponentGraphics,
getConditionForKeyStroke,
getDebugGraphicsOptions,
getGraphics,
getHeight,
getInsets,
getInsets,
getLocation,
getMaximumSize,
getMinimumSize,
getNextFocusableComponent,
getPreferredSize,
getRegisteredKeyStrokes,
getRootPane,
getSize,
getToolTipLocation,
getToolTipText,
getToolTipText,
getTopLevelAncestor,
getVisibleRect,
getWidth,
getX,
getY,
grabFocus,
hasFocus,
isDoubleBuffered,
isFocusCycleRoot,
isFocusTraversable,
isLightweightComponent,
isManagingFocus,
isOpaque,
isOptimizedDrawingEnabled,
isPaintingTile,
isRequestFocusEnabled,
isValidateRoot,
paintBorder,
paintChildren,
paintComponent,
paintImmediately,
paintImmediately,
processComponentKeyEvent,
processFocusEvent,
processKeyEvent,
processMouseMotionEvent,
putClientProperty,
registerKeyboardAction,
registerKeyboardAction,
removeAncestorListener,
removeNotify,
removePropertyChangeListener,
removeVetoableChangeListener,
repaint,
repaint,
requestDefaultFocus,
requestFocus,
resetKeyboardActions,
reshape,
revalidate,
scrollRectToVisible,
setAlignmentX,
setAlignmentY,
setAutoscrolls,
setBackground,
setBorder,
setDebugGraphicsOptions,
setDoubleBuffered,
setEnabled,
setFont,
setForeground,
setMaximumSize,
setMinimumSize,
setNextFocusableComponent,
setOpaque,
setPreferredSize,
setRequestFocusEnabled,
setToolTipText,
setUI,
setVisible,
unregisterKeyboardAction,
update |
| Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setLayout,
validate,
validateTree |
| Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocationOnScreen,
getParent,
getPeer,
getSize,
getToolkit,
getTreeLock,
gotFocus,
handleEvent,
hide,
imageUpdate,
inside,
isDisplayable,
isEnabled,
isLightweight,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processInputMethodEvent,
processMouseEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setLocale,
setLocation,
setLocation,
setSize,
setSize,
show,
show,
size,
transferFocus |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected javax.swing.JToolBar toolBar
protected javax.swing.JLabel periodLabel
protected javax.swing.JLabel statusLabel
protected javax.swing.JComboBox frameList
protected javax.swing.JPanel delayPanel
protected javax.swing.JSlider delaySlider
protected javax.swing.JLabel delayIcon
protected int delayScale
protected float maxDelayInSecs
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction openAction
protected javax.swing.JButton openButton
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction saveAction
protected javax.swing.JButton saveButton
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction startAction
protected javax.swing.JButton startButton
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction stopAction
protected javax.swing.JButton stopButton
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction pauseToggleAction
protected javax.swing.JButton pauseToggleButton
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction stepAction
protected javax.swing.JButton stepButton
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction settingsAction
protected javax.swing.JButton settingsButton
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction recordAction
protected javax.swing.JButton recordButton
protected boolean waitingForRecordSelection
protected boolean recording
protected GraphicsRecorder recorder
protected ViewFrameBridge recordFrame
protected javax.swing.JDialog recordDialog
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction infoAction
protected javax.swing.JButton infoButton
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction quitAction
protected javax.swing.JButton quitButton
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction addTSAction
protected javax.swing.JButton addTSButton
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction addHistAction
protected javax.swing.JButton addHistButton
protected edu.brook.ascape.view.ControlBarView.ScapeControlAction addPieAction
protected javax.swing.JButton addPieButton
protected boolean scapeAppearsRunning
protected boolean lastScapeAppearsRunning
protected boolean scapeAppearsPaused
protected boolean lastScapeAppearsPaused
| Constructor Detail |
public ControlBarView()
public ControlBarView(java.lang.String name)
name - a user relevant name for this view| Method Detail |
public void build()
protected void newChart(int chartType)
protected void recordingCancelStop()
protected void recordingStart(ViewFrameBridge frame)
protected void recordingCreate()
protected void recordingStatusUpdate()
public void setFrameSelection(java.lang.Object o)
public void setIgnoreFrameSelection(boolean ignore)
public void onIterate()
public void onUpdate()
public java.lang.String getName()
public void setName(java.lang.String name)
name - a user relevant name for this viewpublic float getMaxDelayInSecs()
public void setMaxDelayInSecs(float name)
maxDelayInSecs - the maximum time in seconds that the control bar can cause frames to delaypublic java.lang.String toString()
|
(c) 1998-2000 The Brookings Insitution Webpage |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||