Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jpicedt.graphic.view
Class DefaultViewFactory.CompositeView  view DefaultViewFactory.CompositeView download DefaultViewFactory.CompositeView.java

java.lang.Object
  extended byjpicedt.graphic.view.AbstractView
      extended byjpicedt.graphic.view.DefaultViewFactory.CompositeView
All Implemented Interfaces:
View
Enclosing class:
DefaultViewFactory

public class DefaultViewFactory.CompositeView
extends AbstractView

a CompositeView is a graphic representation of a BranchElement


Field Summary
protected  DefaultViewFactory producer
           
private  jpicedt.graphic.PicPoint ptLR
           
private  jpicedt.graphic.PicPoint ptUL
           
 
Fields inherited from class jpicedt.graphic.view.AbstractView
bounds, element
 
Fields inherited from interface jpicedt.graphic.view.View
BARBELL_SIZE, CLICK_DISTANCE
 
Constructor Summary
DefaultViewFactory.CompositeView(jpicedt.graphic.model.BranchElement e)
          construct a new View for the given PicGroup
 
Method Summary
 void changedUpdate(jpicedt.graphic.event.DrawingEvent.EventType eventType)
          Give notification from the model that a change occured for an element this view is responsible for rendering.
 HitInfo hitTest(jpicedt.graphic.event.PEMouseEvent e, boolean isHighlightVisible)
          Current implementation returns a HitInfo.Point if highlighter is visible and a click occured on an end-point ; return null otherwise.
 void paint(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, getParentView, getViewFactory, paintHighlighter, repaint, setElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ptUL

private jpicedt.graphic.PicPoint ptUL

ptLR

private jpicedt.graphic.PicPoint ptLR

producer

protected DefaultViewFactory producer
Constructor Detail

DefaultViewFactory.CompositeView

public DefaultViewFactory.CompositeView(jpicedt.graphic.model.BranchElement e)
construct a new View for the given PicGroup

Method Detail

changedUpdate

public void changedUpdate(jpicedt.graphic.event.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.


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.

Specified by:
paint in interface View
Overrides:
paint in class AbstractView
Since:
jPicEdt 1.3.2

hitTest

public HitInfo hitTest(jpicedt.graphic.event.PEMouseEvent e,
                       boolean isHighlightVisible)
Description copied from class: AbstractView
Current implementation returns a HitInfo.Point if highlighter is visible and a click occured on an end-point ; return null otherwise.

Specified by:
hitTest in interface View
Overrides:
hitTest in class AbstractView
Since:
jPicEdt 1.3.2