Package jpicedt.graphic.view
Class CompositeView
- java.lang.Object
-
- jpicedt.graphic.view.AbstractView
-
- jpicedt.graphic.view.CompositeView
-
- All Implemented Interfaces:
View,ViewConstants
public class CompositeView extends AbstractView
a CompositeView is a graphic representation of a BranchElement- Since:
- jpicedt 1.4
- Version:
- $Id: CompositeView.java,v 1.4.2.1 2007/09/02 11:56:29 reynal Exp $
- Author:
- Sylvain Reynal
-
-
Field Summary
-
Fields inherited from class jpicedt.graphic.view.AbstractView
bounds, element, highlighter
-
Fields inherited from interface jpicedt.graphic.view.ViewConstants
BARBELL_SIZE, CLICK_DISTANCE
-
-
Constructor Summary
Constructors Constructor Description CompositeView(BranchElement e)construct a new View for the given PicGroup
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangedUpdate(DrawingEvent.EventType eventType)Give notification from the model that a change occured for an element this view is responsible for rendering.HitInfohitTest(PEMouseEvent e)Returns a HitInfo corresponding to the given mouse-event.voidpaint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D a)Render the View for the graphic element to the given graphic context.-
Methods inherited from class jpicedt.graphic.view.AbstractView
getBounds, getContainer, getDrawing, getElement, getGraphics, getHighlighter, getParentView, getViewFactory, hitTest, paintHighlighter, repaint, setElement, setHighlighter
-
-
-
-
Constructor Detail
-
CompositeView
public CompositeView(BranchElement e)
construct a new View for the given PicGroup
-
-
Method Detail
-
changedUpdate
public void changedUpdate(DrawingEvent.EventType eventType)
Give notification from the model that a change occured for an element this view is responsible for rendering. This implementation update the view's bounds from the element's bounding box, delegating highlighter's bounds to the current Highlighter delegate..
-
paint
public void paint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D a)Render the View for the graphic element to the given graphic context. This called "paint" on each child's view if its bounds rectangle intersects the clip.- Parameters:
allocation- the current graphic clip
-
hitTest
public HitInfo hitTest(PEMouseEvent e)
Description copied from class:AbstractViewReturns a HitInfo corresponding to the given mouse-event. Only the view's shape should be included in this test.- Specified by:
hitTestin classAbstractView- Returns:
- a HitInfo corresponding to the given click-point in model-coordinate.
-
-