|
|
|||||||||
| 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
A base class for a panel that acts as an observer of scapes. Provides notification of scape updates.
| 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 boolean |
awaitingUpdate
Has the buffer been modified? Are we waiting for the paint method to update it to the onscreen image? |
protected ViewFrameBridge |
frame
The frame this view is displayed in. |
protected java.lang.String |
name
The name of the view. |
protected GraphicsRecorder |
recorder
A recorder for the graphic of this view. |
protected boolean |
recordNext
Are we waiting for a record to occur? |
protected Scape |
scape
The scape being viewed. |
| 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 | |
PanelView()
Constructs a panel view. |
|
PanelView(java.lang.String name)
Constructs a panel view. |
|
| Method Summary | |
void |
addScape(Scape scape)
Add a scape to the view. |
void |
build()
Called to create and layout the components of the component view, once the view's scape has been created. |
GraphicsRecorder |
getGraphicsRecorder()
Returns a recorder that can be used to record the graphics of this view. |
java.lang.String |
getName()
Returns a name for the view as defined by set name. |
Scape |
getScape()
Returns the scape this canvas views. |
ViewFrameBridge |
getViewFrame()
Returns the frame this view occupies, null if none. |
void |
onIterate()
Called when scape is iterated. |
void |
onSetup()
Method called when the scape is ready for setup. |
void |
onStart()
Method called when the scape is started. |
void |
onStop()
Method called when the scape is stopped. |
void |
onUpdate()
Called when scape reports an update event. |
void |
paint(java.awt.Graphics g)
Paints the panel. |
void |
removeScape(Scape scape)
Removes the scape from this listener. |
void |
scapeUpdated(ScapeEvent scapeEvent)
Notifies this view that its scape has been updated. |
void |
setGraphicsRecorder(GraphicsRecorder recorder)
Sets the recorder that can be used to record the graphics of this view. |
void |
setName(java.lang.String name)
Sets the name of this view. |
void |
setViewFrame(ViewFrameBridge frame)
Sets the frame this view appears in. |
java.lang.String |
toString()
Returns a short description of this view. |
void |
updated()
Called (automatically from paint) when this view has been 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 Scape scape
protected ViewFrameBridge frame
protected GraphicsRecorder recorder
protected boolean awaitingUpdate
protected java.lang.String name
protected boolean recordNext
| Constructor Detail |
public PanelView()
public PanelView(java.lang.String name)
name - a user relevant name for this view| Method Detail |
public Scape getScape()
public void addScape(Scape scape)
throws java.util.TooManyListenersException
scape - the scape to make this canvas the observer ofpublic void removeScape(Scape scape)
scape - the scape to removepublic ViewFrameBridge getViewFrame()
public void setViewFrame(ViewFrameBridge frame)
public void build()
public void onIterate()
public void onSetup()
public void onUpdate()
public void onStart()
public void onStop()
public void scapeUpdated(ScapeEvent scapeEvent)
scapeEvent - a scape event update, usually unspecifiedpublic void updated()
public java.lang.String getName()
public void setName(java.lang.String name)
name - a user relevant name for this viewpublic GraphicsRecorder getGraphicsRecorder()
public void setGraphicsRecorder(GraphicsRecorder recorder)
public java.lang.String toString()
public void paint(java.awt.Graphics g)
g - the graphics context.
|
(c) 1998-2000 The Brookings Insitution Webpage |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||