cib.cad.kernel
Interface ViewController

All Superinterfaces:
View
All Known Implementing Classes:
BasicViewController

public interface ViewController
extends View

A view controller manages a component's views. A component may have more than one view. Since the views are stored in lists they can be mapped to the respective elements of the component's chains. The view controller is responsible for showing the component's mark status. The views of a view controller are frequently transformed according to the model to view transformation.

Version:
$Revision: 1684 $, $Author: svn-firmenich $, $Date: 2011-08-12 16:55:42 +0200 (Fri, 12 Aug 2011) $
Author:
Berthold Firmenich

Method Summary
 Component getComponent()
          Returns the component associated to this View Controller.
 void setComponent(Component c, Marker m)
          Assigns a component to this View Controller.
 void updateViews(java.awt.geom.AffineTransform modelToView, java.awt.geom.Rectangle2D panelBounds, int panelFlags, java.awt.Graphics g)
          This method is called if the view should be updated.
 java.util.ListIterator<View> viewIterator()
          An iterator over the views of this view controller.
 
Methods inherited from interface cib.cad.kernel.View
draw, getBounds, intersects
 

Method Detail

getComponent

Component getComponent()
Returns the component associated to this View Controller.

Returns:
the Component

setComponent

void setComponent(Component c,
                  Marker m)
Assigns a component to this View Controller.

Parameters:
c - the Component
m - the Marker indicating the selection status

updateViews

void updateViews(java.awt.geom.AffineTransform modelToView,
                 java.awt.geom.Rectangle2D panelBounds,
                 int panelFlags,
                 java.awt.Graphics g)
This method is called if the view should be updated. Implementing classes are free to ignore this request, for instance if the view controller lies outside the visible area.

Parameters:
modelToView - the model to view transformation
panelBounds - the panel bounds
panelFlags - the panel flags
g - the Graphics

viewIterator

java.util.ListIterator<View> viewIterator()
An iterator over the views of this view controller.

Returns:
the list iterator