net.sf.latexdraw.glib.views.Java2D.impl
Class LArcView<M extends IArc>

java.lang.Object
  extended by net.sf.latexdraw.glib.views.AbstractView<S>
      extended by net.sf.latexdraw.glib.views.Java2D.impl.LShapeView<S>
          extended by net.sf.latexdraw.glib.views.Java2D.impl.LRectangularView<S>
              extended by net.sf.latexdraw.glib.views.Java2D.impl.LEllipseView<IArc>
                  extended by net.sf.latexdraw.glib.views.Java2D.impl.LArcView<M>
All Implemented Interfaces:
IAbstractView, IViewArc, IViewShape, Pickable
Direct Known Subclasses:
LCircleArcView

 class LArcView<M extends IArc>
extends LEllipseView<IArc>
implements IViewArc

Defines a view of the IArc 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/20/2008

Since:
3.0
Author:
Arnaud BLOUIN

Field Summary
 
Fields inherited from class net.sf.latexdraw.glib.views.Java2D.impl.LEllipseView
POINTS, U
 
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 LArcView(IArc model)
          Creates an initialises the Java view of a LArc.
 
Method Summary
protected  int getJava2DArcStyle()
           
static void setArcPath(java.awt.geom.Path2D path, double tlx, double tly, double width, double height, double startAngle, double endAngle, int style)
          Appends an arc to the given path.
protected  void setRectangularShape(java.awt.geom.Path2D path, double tlx, double tly, double width, double height)
          Creates a rectangular shape in the given path using the given information.
 void updateBorder()
          Update the border of the shape view.
 
Methods inherited from class net.sf.latexdraw.glib.views.Java2D.impl.LEllipseView
curveQuarter, setEllipsePath
 
Methods inherited from class net.sf.latexdraw.glib.views.Java2D.impl.LRectangularView
getBorderGap, getRotatedRectangle, updateDblePathInside, updateDblePathMiddle, updateDblePathOutside, updateGeneralPathInside, updateGeneralPathMiddle, updateGeneralPathOutside
 
Methods inherited from class net.sf.latexdraw.glib.views.Java2D.impl.LShapeView
beginRotation, contains, contains, endRotation, flush, getBorder, getPath, getPicker, getRotatedShape2D, getRotatedShape2D, getStroke, getStrokeThickness, intersects, paint, 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.Java2D.interfaces.IViewShape
contains, contains, flush, getBorder, getPath, getRotatedShape2D, getStroke, intersects, paint, paintBorders, paintFilling, paintShadow, paintShowPointsDots, paintShowPointsLines, updatePath
 
Methods inherited from interface net.sf.latexdraw.glib.views.IAbstractView
getShape, update
 
Methods inherited from interface org.malai.picking.Pickable
getPicker
 

Constructor Detail

LArcView

protected LArcView(IArc model)
Creates an initialises the Java view of a LArc.

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

setRectangularShape

protected void setRectangularShape(java.awt.geom.Path2D path,
                                   double tlx,
                                   double tly,
                                   double width,
                                   double height)
Description copied from class: LRectangularView
Creates a rectangular shape in the given path using the given information. The path is not cleared.

Overrides:
setRectangularShape in class LEllipseView<IArc>
Parameters:
path - The path to fill.
tlx - The X-coordinate of the top-left of the rectangular shape to draw.
tly - The Y-coordinate of the top-left of the rectangular shape to draw.
width - The width of the rectangular shape.
height - The height of the rectangular shape.

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 LRectangularView<IArc>

getJava2DArcStyle

protected int getJava2DArcStyle()

setArcPath

public static void setArcPath(java.awt.geom.Path2D path,
                              double tlx,
                              double tly,
                              double width,
                              double height,
                              double startAngle,
                              double endAngle,
                              int style)
Appends an arc to the given path.

Parameters:
path - The path to fill.
tlx - The top-left point of the arc.
tly - The bottom right point of the arc.
width - The width of the arc.
height - The height of the arc.
startAngle - The start angle of the arc.
endAngle - The end angle of the arc.
style - The style of the arc. See Arc2D.OPEN etc.
Since:
3.0