|
|||||||||
Home >> All >> jpicedt >> graphic >> [ view overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
jpicedt.graphic.view
Class DefaultViewFactory.TextView

java.lang.Objectjpicedt.graphic.view.AbstractView
jpicedt.graphic.view.DefaultViewFactory.LeafElementView
jpicedt.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 classDefaultViewFactory.LeafElementView
syncBounds
protected void syncBounds()
- Synchronizes bounding box with the model ;
- Overrides:
syncBounds
in classDefaultViewFactory.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 interfaceView
- Overrides:
paint
in classDefaultViewFactory.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 interfaceView
- Overrides:
hitTest
in classDefaultViewFactory.LeafElementView
- Since:
- jPicEdt 1.3.2
|
|||||||||
Home >> All >> jpicedt >> graphic >> [ view overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |