|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Canvas
|
+--edu.brook.ascape.view.CanvasView
|
+--edu.brook.ascape.view.BaseCellView
A generic base class for views that draw some kind of spatial view of a group of cells. Cell views have a default draw feature that draws a background for the cell, using the cell color feature.
| Field Summary | |
protected int |
borderSize
Size of border around each cell. |
protected ColorFeature |
cellColorFeature
The color feature used to set the cell draw color |
protected CellCustomizer |
cellCustomizer
The panel responsible for customizing a selected cell. |
DrawFeature |
cells_fill_draw_feature
Draws the provided object, assumed to be a cell, by filling it using the cell color feature. |
DrawFeature |
cells_fill_draw_inset_feature
Draws the provided object, assumed to be a cell, by filling it using the cell color feature. |
protected int |
cellSize
Size of each individual cell, typically in pixels. |
protected VectorSelection |
drawSelection
The draw features that have been selected to draw. |
protected boolean |
updateAllRequested
Has an update all been requested? |
protected ViewCustomizer |
viewCustomizer
The panel responsible for customizing this view. |
| Fields inherited from class edu.brook.ascape.view.CanvasView |
awaitingUpdate,
bufferedGraphics,
bufferedImage,
currentUpdate,
drawEveryNUpdates,
frame,
name,
recorder,
recordNext,
scape |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
| Constructor Summary | |
BaseCellView()
Constructs a BaseCellView, adding a listener to present a settings frame when the user double-clicks on the view. |
|
| Method Summary | |
void |
build()
Builds the view. |
Cell |
cellAtPixel(int x,
int y)
|
void |
displayCellCustomizer()
Displays a window for altering the setting for this view. |
void |
displayViewCustomizer()
Displays a window for altering the setting for this view. |
protected void |
drawSelectedCell(java.awt.Graphics g)
|
int |
getBorderSize()
Returns a one-dimension size in pixels of the cell border. |
ColorFeature |
getCellColorFeature()
Returns the color feature that will be used for determining cell color. |
int |
getCellSize()
Returns a one-dimension size of pixels used to represent each cell. |
Cell |
getCustomizeCell()
|
VectorSelection |
getDrawSelection()
Returns the selection of draw features for this view. |
void |
hideCellCustomizer()
Hides window for altering the setting for this view. |
void |
onUpdate()
On notification of a scape update, draws the actual overhead view. |
void |
requestUpdateAll()
Requests that all cells be updated, irregardless of wether they have requested it or not. |
void |
setBorderSize(int borderSize)
Sets the border size in pixels. |
void |
setCellColorFeature(ColorFeature cellColorFeature)
Set the color feature that will be used for determining cell color. |
void |
setCellSize(int cellSize)
Sets the number of pixels used to represent each cell. |
void |
setCustomizeCell(Cell cell)
|
| Methods inherited from class edu.brook.ascape.view.CanvasView |
addNotify,
addScape,
finalize,
getDrawEveryNUpdates,
getGraphicsRecorder,
getName,
getPreferredSize,
getScape,
getViewFrame,
initializeBuffer,
onIterate,
onSetup,
onStart,
onStop,
paint,
removeScape,
scapeUpdated,
setDrawEveryNUpdates,
setGraphicsRecorder,
setName,
setViewFrame,
toString,
update,
updated |
| Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
disableEvents,
dispatchEvent,
doLayout,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getMinimumSize,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
layout,
list,
list,
list,
list,
list,
locate,
location,
lostFocus,
minimumSize,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
paramString,
postEvent,
preferredSize,
prepareImage,
prepareImage,
print,
printAll,
processComponentEvent,
processEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setFont,
setForeground,
setLocale,
setLocation,
setLocation,
setSize,
setSize,
setVisible,
show,
show,
size,
transferFocus,
validate |
| Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public final DrawFeature cells_fill_draw_feature
public final DrawFeature cells_fill_draw_inset_feature
protected int cellSize
protected int borderSize
protected ColorFeature cellColorFeature
protected VectorSelection drawSelection
protected boolean updateAllRequested
protected ViewCustomizer viewCustomizer
protected CellCustomizer cellCustomizer
| Constructor Detail |
public BaseCellView()
| Method Detail |
public Cell getCustomizeCell()
public void setCustomizeCell(Cell cell)
public void build()
public void onUpdate()
scapeEvent - a scape event update, usually unspecifiedpublic void displayViewCustomizer()
public void displayCellCustomizer()
public Cell cellAtPixel(int x,
int y)
protected void drawSelectedCell(java.awt.Graphics g)
public void hideCellCustomizer()
public VectorSelection getDrawSelection()
public ColorFeature getCellColorFeature()
public void setCellColorFeature(ColorFeature cellColorFeature)
cellColorFeature - the color feature, whose object is assumed to be a cell populating this latticepublic int getCellSize()
public void setCellSize(int cellSize)
cellSize - number of pixels per edgepublic int getBorderSize()
public void setBorderSize(int borderSize)
cellSize - number of pixelspublic void requestUpdateAll()
|
(c) 1998-2000 The Brookings Insitution Webpage |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||