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

Quick Search    Search Deep

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

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

public class DefaultViewFactory.TextView
extends DefaultViewFactory.LeafElementView

a View for rendering Text's


Field Summary
protected  double strx
          TextLayout location
protected  double stry
          TextLayout location
protected  java.awt.font.TextLayout textLayout
          the TextLayout that renders the text string of this TextEditable
 
Fields inherited from class jpicedt.graphic.view.DefaultViewFactory.LeafElementView
interiorPaint, lineWidth, outlinePaint, outlineStroke, shape
 
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.TextView(jpicedt.graphic.model.PicText te)
          construct a new View for the given PicRectangle
 
Method Summary
 HitInfo hitTest(jpicedt.graphic.event.PEMouseEvent e, boolean isHighlightVisible)
          This implementation calls super.hitTest and returns the result if non-null (this should be a HitInfo.Point), then returns a HitInfo.Interior if the mouse-click occured inside the text bound (as defined by text layout)
 void paint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D a)
          Render the View to the given graphic context.
protected  void syncBounds()
          Synchronizes bounding box with the model ;
protected  void syncFrame()
          synchronize frame shape and location
protected  void syncShape()
          Synchronize the textLayout and the shape (=frame box, by calling syncFrame) with the model
protected  void syncStringLocationX()
          update strx
protected  void syncStringLocationY()
          update stry
 
Methods inherited from class jpicedt.graphic.view.DefaultViewFactory.LeafElementView
changedUpdate, getViewFactory, syncAttributes
 
Methods inherited from class jpicedt.graphic.view.AbstractView
getBounds, getContainer, getDrawing, getElement, getGraphics, getParentView, paintHighlighter, repaint, setElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textLayout

protected java.awt.font.TextLayout textLayout
the TextLayout that renders the text string of this TextEditable


strx

protected double strx
TextLayout location


stry

protected double stry
TextLayout location

Constructor Detail

DefaultViewFactory.TextView

public DefaultViewFactory.TextView(jpicedt.graphic.model.PicText te)
construct a new View for the given PicRectangle

Method Detail

syncShape

protected void syncShape()
Synchronize the textLayout and the shape (=frame box, by calling syncFrame) with the model

Overrides:
syncShape in class DefaultViewFactory.LeafElementView

syncBounds

protected void syncBounds()
Synchronizes bounding box with the model ;

Overrides:
syncBounds in class DefaultViewFactory.LeafElementView

syncFrame

protected void syncFrame()
synchronize frame shape and location


syncStringLocationX

protected void syncStringLocationX()
update strx


syncStringLocationY

protected void syncStringLocationY()
update stry


paint

public void paint(java.awt.Graphics2D g,
                  java.awt.geom.Rectangle2D a)
Render the View to the given graphic context. This implementation render the interior first, then the outline.

Specified by:
paint in interface View
Overrides:
paint in class DefaultViewFactory.LeafElementView
Since:
jPicEdt 1.3.2

hitTest

public HitInfo hitTest(jpicedt.graphic.event.PEMouseEvent e,
                       boolean isHighlightVisible)
This implementation calls super.hitTest and returns the result if non-null (this should be a HitInfo.Point), then returns a HitInfo.Interior if the mouse-click occured inside the text bound (as defined by text layout)

Specified by:
hitTest in interface View
Overrides:
hitTest in class DefaultViewFactory.LeafElementView
Since:
jPicEdt 1.3.2