Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph v5.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jgraph.graph
Interface CellView

All Known Implementing Classes:
  AbstractCellView

public interface CellView

Defines the requirements for an object that represents a view for a model cell.

Method Summary
`void` | `childUpdated()`
`AttributeMap` | `getAllAttributes()`
`AttributeMap` | `getAttributes()` Returns all attributes of the view as a map.
`Rectangle2D` | `getBounds()` Returns the bounds for the view.
`Object` | `getCell()` Returns the model object that this view represents.
`CellView[]` | `getChildViews()` Returns the child views of this view.
`GraphCellEditor` | `getEditor()` Returns a cell editor for the view.
`CellHandle` | `getHandle(GraphContext context)` Returns a cell handle for the view.
`CellView` | `getParentView()` Returns the parent of view of this view.
`Component` | `getRendererComponent(JGraph graph, boolean selected, boolean focus, boolean preview)` Returns a renderer component, configured for the view.
`boolean` | `intersects(Graphics g, Rectangle2D rect)` Returns true if the view intersects the given rectangle.
`boolean` | `isLeaf()` Returns true if the view is a leaf.
`void` | `refresh(boolean createDependentViews)` Refresh this view based on the model cell.
`void` | `removeFromParent()` Removes this view from the list of childs of the parent.
`AttributeMap` | `setAttributes(AttributeMap map)` Apply the specified map of attributes on the view.
`void` | `update()` Update this view's attributes.

Method Detail

### getCell

    public Object getCell()

  Returns the model object that this view represents.

### refresh

    public void refresh(boolean createDependentViews)

  Refresh this view based on the model cell. This is messaged when the model cell has changed.

### update

    public void update()

  Update this view's attributes. This is messaged whenever refresh is messaged, and additionally when the context of the cell has changed, and during live-preview changes to the view.

### childUpdated

    public void childUpdated()

### getParentView

    public CellView getParentView()

  Returns the parent of view of this view.

### getChildViews

    public CellView[] getChildViews()

  Returns the child views of this view.

### removeFromParent

    public void removeFromParent()

  Removes this view from the list of childs of the parent.

### isLeaf

    public boolean isLeaf()

  Returns true if the view is a leaf.

### getBounds

    public Rectangle2D getBounds()

  Returns the bounds for the view.

### intersects

    public boolean intersects(Graphics g,
                              Rectangle2D rect)

  Returns true if the view intersects the given rectangle.

### setAttributes

    public AttributeMap setAttributes(AttributeMap map)

  Apply the specified map of attributes on the view.

### getAttributes

    public AttributeMap getAttributes()

  Returns all attributes of the view as a map.

### getAllAttributes

    public AttributeMap getAllAttributes()

### getRendererComponent

    public Component getRendererComponent(JGraph graph,
                                          boolean selected,
                                          boolean focus,
                                          boolean preview)

  Returns a renderer component, configured for the view.

### getHandle

    public CellHandle getHandle(GraphContext context)

  Returns a cell handle for the view.

### getEditor

    public GraphCellEditor getEditor()

  Returns a cell editor for the view.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph v5.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) 2003-2004 Gaudenz Alder. All rights reserved.