|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.latexdraw.glib.views.Java2D.impl.LArrowView
class LArrowView
Defines a view of an arrow.
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.
08/03/2011
Field Summary | |
---|---|
protected IArrow |
model
The arrow model to view. |
protected java.awt.geom.Path2D |
path
The path of the view. |
Constructor Summary | |
---|---|
protected |
LArrowView(IArrow model)
Creates the view of the arrow. |
Method Summary | |
---|---|
private boolean |
isArrowInPositiveDirection(IPoint pt1,
IPoint pt2)
|
void |
paint(java.awt.Graphics2D g,
java.awt.Color fColour,
boolean asShadow)
Paints the arrow. |
protected void |
paintArrow(java.awt.Graphics2D g,
java.awt.Color lineColor)
|
protected void |
paintArrow(java.awt.Graphics2D g,
java.awt.Color fColour,
boolean asShadow)
|
protected void |
paintBarBracket(java.awt.Graphics2D g,
java.awt.Color lineColor)
|
protected void |
paintCircle(java.awt.Graphics2D g,
java.awt.Color fillColour,
java.awt.Color lineColour)
|
protected void |
paintDisk(java.awt.Graphics2D g,
java.awt.Color lineColour)
|
protected void |
paintRoundBracket(java.awt.Graphics2D g,
java.awt.Color lineColor)
|
void |
updatePath()
Updates the path of the arrow. |
private void |
updatePathArrow(double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
double x4,
double y4)
|
protected void |
updatePathBarEnd(double xRot,
double yRot)
|
protected void |
updatePathBarIn(double xRot,
double yRot,
IPoint pt1,
IPoint pt2,
double[] xs,
double[] ys)
|
protected void |
updatePathDiskCircleEnd(double xRot,
double yRot)
|
protected void |
updatePathDiskCircleIn(double xRot,
double yRot,
IPoint pt1,
IPoint pt2)
|
protected void |
updatePathDoubleLeftRightArrow(double xRot,
double yRot,
IPoint pt1,
IPoint pt2)
|
protected void |
updatePathRightLeftArrow(double xRot,
double yRot,
IPoint pt1,
IPoint pt2)
|
protected void |
updatePathRightLeftSquaredBracket(double xRot,
double yRot,
IPoint pt1,
IPoint pt2)
|
protected void |
updatePathRoundIn(double xRot,
double yRot,
IPoint pt1,
IPoint pt2)
|
protected void |
updatePathRoundLeftRightBracket(double xRot,
double yRot,
IPoint pt1,
IPoint pt2)
|
protected void |
updatePathSquareRoundEnd(double xRot,
double yRot,
IPoint pt1,
IPoint pt2)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IArrow model
protected java.awt.geom.Path2D path
Constructor Detail |
---|
protected LArrowView(IArrow model)
model
- The model of the arrow.
java.lang.IllegalArgumentException
- If the given arrow is null.Method Detail |
---|
public void paint(java.awt.Graphics2D g, java.awt.Color fColour, boolean asShadow)
IViewArrow
paint
in interface IViewArrow
g
- The graphics into which the arrow will be painted.fColour
- The colour of the filling of the arrow.asShadow
- True: it is the shadow of a shape.protected void paintCircle(java.awt.Graphics2D g, java.awt.Color fillColour, java.awt.Color lineColour)
protected void paintDisk(java.awt.Graphics2D g, java.awt.Color lineColour)
protected void paintRoundBracket(java.awt.Graphics2D g, java.awt.Color lineColor)
protected void paintBarBracket(java.awt.Graphics2D g, java.awt.Color lineColor)
protected void paintArrow(java.awt.Graphics2D g, java.awt.Color lineColor)
protected void paintArrow(java.awt.Graphics2D g, java.awt.Color fColour, boolean asShadow)
protected void updatePathDiskCircleEnd(double xRot, double yRot)
protected void updatePathDiskCircleIn(double xRot, double yRot, IPoint pt1, IPoint pt2)
protected void updatePathRightLeftSquaredBracket(double xRot, double yRot, IPoint pt1, IPoint pt2)
protected void updatePathBarIn(double xRot, double yRot, IPoint pt1, IPoint pt2, double[] xs, double[] ys)
protected void updatePathBarEnd(double xRot, double yRot)
private void updatePathArrow(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)
protected void updatePathRightLeftArrow(double xRot, double yRot, IPoint pt1, IPoint pt2)
private boolean isArrowInPositiveDirection(IPoint pt1, IPoint pt2)
protected void updatePathRoundLeftRightBracket(double xRot, double yRot, IPoint pt1, IPoint pt2)
protected void updatePathDoubleLeftRightArrow(double xRot, double yRot, IPoint pt1, IPoint pt2)
protected void updatePathSquareRoundEnd(double xRot, double yRot, IPoint pt1, IPoint pt2)
protected void updatePathRoundIn(double xRot, double yRot, IPoint pt1, IPoint pt2)
public void updatePath()
updatePath
in interface IViewArrow
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |