net.sf.latexdraw.glib.views.Java2D.impl
Class LPictureView

java.lang.Object
  extended by net.sf.latexdraw.glib.views.AbstractView<S>
      extended by net.sf.latexdraw.glib.views.Java2D.impl.LShapeView<IPicture>
          extended by net.sf.latexdraw.glib.views.Java2D.impl.LPictureView
All Implemented Interfaces:
IAbstractView, IViewShape, Pickable

 class LPictureView
extends LShapeView<IPicture>

Defines an abstract view of the IPicture model.

This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
LaTeXDraw is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

03/18/2008

Since:
3.0
Author:
Arnaud BLOUIN

Field Summary
 
Fields inherited from class net.sf.latexdraw.glib.views.Java2D.impl.LShapeView
arrows, border, path
 
Fields inherited from class net.sf.latexdraw.glib.views.AbstractView
shape
 
Constructor Summary
protected LPictureView(IPicture model)
          Initialises a view of a picture.
 
Method Summary
 boolean contains(double x, double y)
          Tests if the given point is into the pickable object.
 boolean intersects(java.awt.geom.Rectangle2D r)
           
 void paint(java.awt.Graphics2D g)
          Draws the shape within a Java2D graphics.
 void updateBorder()
          Update the border of the shape view.
protected  void updateDblePathInside()
          Updates the borders of the double boundary when position is inside.
protected  void updateDblePathMiddle()
          Updates the borders of the double boundary when position is middle.
protected  void updateDblePathOutside()
          Updates the borders of the double boundary when position is outside.
protected  void updateGeneralPathInside()
          Updates the borders of the shape as inside borders.
protected  void updateGeneralPathMiddle()
          Updates the borders of the shape as middle borders.
protected  void updateGeneralPathOutside()
          Updates the borders of the shape as outside borders.
 
Methods inherited from class net.sf.latexdraw.glib.views.Java2D.impl.LShapeView
beginRotation, contains, endRotation, flush, getBorder, getPath, getPicker, getRotatedShape2D, getRotatedShape2D, getStroke, getStrokeThickness, paintArrows, paintBorders, paintFilling, paintShadow, paintShowPointsDots, paintShowPointsLines, update, updatePath, updatePathArrows
 
Methods inherited from class net.sf.latexdraw.glib.views.AbstractView
getShape
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.latexdraw.glib.views.IAbstractView
getShape
 

Constructor Detail

LPictureView

protected LPictureView(IPicture model)
Initialises a view of a picture.

Parameters:
model - The model to view.
Since:
3.0
Method Detail

intersects

public boolean intersects(java.awt.geom.Rectangle2D r)
Specified by:
intersects in interface IViewShape
Overrides:
intersects in class LShapeView<IPicture>
Parameters:
r - The rectangle used to check the intersection.
Returns:
True if the given rectangle intersects the view.

contains

public boolean contains(double x,
                        double y)
Description copied from interface: Pickable
Tests if the given point is into the pickable object.

Specified by:
contains in interface IViewShape
Specified by:
contains in interface Pickable
Overrides:
contains in class LShapeView<IPicture>
Parameters:
x - The x-coordinate of the point to test.
y - The y-coordinate of the point to test.
Returns:
True if the given point is into the pickable object.

paint

public void paint(java.awt.Graphics2D g)
Description copied from interface: IViewShape
Draws the shape within a Java2D graphics.

Specified by:
paint in interface IViewShape
Overrides:
paint in class LShapeView<IPicture>
Parameters:
g - The graphics where the shape must be drawn.

updateBorder

public void updateBorder()
Description copied from interface: IViewShape
Update the border of the shape view.

Specified by:
updateBorder in interface IViewShape
Overrides:
updateBorder in class LShapeView<IPicture>

updateDblePathInside

protected void updateDblePathInside()
Description copied from class: LShapeView
Updates the borders of the double boundary when position is inside.

Specified by:
updateDblePathInside in class LShapeView<IPicture>

updateDblePathMiddle

protected void updateDblePathMiddle()
Description copied from class: LShapeView
Updates the borders of the double boundary when position is middle.

Specified by:
updateDblePathMiddle in class LShapeView<IPicture>

updateDblePathOutside

protected void updateDblePathOutside()
Description copied from class: LShapeView
Updates the borders of the double boundary when position is outside.

Specified by:
updateDblePathOutside in class LShapeView<IPicture>

updateGeneralPathInside

protected void updateGeneralPathInside()
Description copied from class: LShapeView
Updates the borders of the shape as inside borders.

Specified by:
updateGeneralPathInside in class LShapeView<IPicture>

updateGeneralPathMiddle

protected void updateGeneralPathMiddle()
Description copied from class: LShapeView
Updates the borders of the shape as middle borders.

Specified by:
updateGeneralPathMiddle in class LShapeView<IPicture>

updateGeneralPathOutside

protected void updateGeneralPathOutside()
Description copied from class: LShapeView
Updates the borders of the shape as outside borders.

Specified by:
updateGeneralPathOutside in class LShapeView<IPicture>