|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.latexdraw.glib.views.AbstractView<S>
net.sf.latexdraw.glib.views.Java2D.impl.LShapeView<S>
net.sf.latexdraw.glib.views.Java2D.impl.LRectangularView<S>
abstract class LRectangularView<S extends IRectangularShape>
Defines a view of the IRectangularView 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/01/2010
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 |
LRectangularView(S model)
Initialises a rectangular view. |
Method Summary | |
---|---|
protected double |
getBorderGap()
|
protected static void |
getRotatedRectangle(double tlx,
double tly,
double width,
double height,
double angle,
IPoint gravityCentre,
IPoint tl,
IPoint br)
Gives the top-left and the bottom-right points of the rotated rectangle. |
protected abstract 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. |
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. |
private void |
updateGeneralPath(double gap)
Update the path of the rectangular shape. |
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, 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.IAbstractView |
---|
getShape |
Constructor Detail |
---|
protected LRectangularView(S model)
model
- The rectangular model.Method Detail |
---|
protected double getBorderGap()
protected static void getRotatedRectangle(double tlx, double tly, double width, double height, double angle, IPoint gravityCentre, IPoint tl, IPoint br)
tlx
- The top-left x-coordinate of the rectangle to rotate.tly
- The top-left y-coordinate of the rectangle to rotate.width
- The width of the rectangle to rotate.height
- The height of the rectangle to rotate.angle
- The rotation angle.gravityCentre
- The gravity centre used for the rotation.tl
- The resulting top-left point. Must not be null.br
- The resulting bottom-right point. Must not be null.public void updateBorder()
IViewShape
updateBorder
in interface IViewShape
updateBorder
in class LShapeView<S extends IRectangularShape>
protected void updateGeneralPathInside()
LShapeView
updateGeneralPathInside
in class LShapeView<S extends IRectangularShape>
protected void updateGeneralPathMiddle()
LShapeView
updateGeneralPathMiddle
in class LShapeView<S extends IRectangularShape>
protected void updateGeneralPathOutside()
LShapeView
updateGeneralPathOutside
in class LShapeView<S extends IRectangularShape>
private void updateGeneralPath(double gap)
gap
- The value removed from the height and the width of the shape. Can equal 0.protected abstract void setRectangularShape(java.awt.geom.Path2D path, double tlx, double tly, double width, double height)
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.protected void updateDblePathInside()
LShapeView
updateDblePathInside
in class LShapeView<S extends IRectangularShape>
protected void updateDblePathMiddle()
LShapeView
updateDblePathMiddle
in class LShapeView<S extends IRectangularShape>
protected void updateDblePathOutside()
LShapeView
updateDblePathOutside
in class LShapeView<S extends IRectangularShape>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |