Logo Search packages:      
Sourcecode: latexdraw version File versions  Download package

latexDraw::figures::Line Class Reference

Inheritance diagram for latexDraw::figures::Line:

latexDraw::figures::LaTeXDrawPolygon latexDraw::figures::properties::Arrowable latexDraw::figures::Figure latexDraw::figures::properties::DoubleBoundaryable latexDraw::figures::properties::Drawable

List of all members.


Detailed Description

This class defines a line.

This file is part of LaTeXDraw
Copyright (c) 2005-2008 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.

01/20/06
Author:
Arnaud BLOUIN
Version:
2.0.0

Definition at line 39 of file Line.java.


Public Member Functions

boolean addPoint (LaTeXDrawPoint2D pt)
boolean addPointAt (LaTeXDrawPoint2D pt, int id)
synchronized void addRotationAngle (double theta)
boolean canBeFilled ()
boolean canBeHatched ()
synchronized boolean canHaveArrow ()
boolean canHaveShadow ()
synchronized void changeMeter ()
Object clone () throws CloneNotSupportedException
double computeRotationAngle (Point formerPt, Point newPt) throws IllegalArgumentException
Shape createNonRotatedShape2D ()
Shape createShadowShape ()
Shape createShape2D ()
void draw (Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
LaTeXDrawPoint2D[] findPoints (double x, double y, double distance) throws LaTeXDrawException
LaTeXDrawPoint2D[] findPoints (LaTeXDrawPoint2D p, double distance) throws LaTeXDrawException
LaTeXDrawPoint2D[] findPoints (Point p, double distance) throws LaTeXDrawException
double getA ()
synchronized String getArrow1Style ()
synchronized String getArrow2Style ()
ArrowHead getArrowHead1 ()
ArrowHead getArrowHead2 ()
double getB ()
synchronized float getBlackDashLength ()
LaTeXDrawRectangle getBorders ()
LaTeXDrawPoint2D getBordersPoint (int id)
synchronized String getBordersPosition ()
LaTeXDrawRectangle getBoundBorders ()
synchronized String getCodePSTricks (DrawBorders drawBorders, float ppc)
Shape[] getDbleBoundariesInside (Shape classicBord)
Shape[] getDbleBoundariesMiddle (Shape classicBord)
Shape[] getDbleBoundariesOutInOrMiddle (Shape classicBord)
Shape[] getDbleBoundariesOutside (Shape classicBord)
synchronized float getDotSep ()
synchronized Color getDoubleColor ()
synchronized double getDoubleSep ()
synchronized double getGradientAngle ()
synchronized Color getGradientEndColor ()
synchronized double getGradientMidPoint ()
synchronized Color getGradientStartColor ()
synchronized LaTeXDrawPoint2D getGravityCenter ()
synchronized double getHatchingAngle ()
synchronized Color getHatchingColor ()
synchronized double getHatchingSep ()
synchronized String getHatchingStyle ()
synchronized float getHatchingWidth ()
Shape getInsideOutsideOrMiddleBorders ()
synchronized Color getInteriorColor ()
LaTeXDrawPoint2D getIntersection (Line l)
LaTeXDrawPoint2D getIntersectsSegment (Line l)
synchronized LaTeXDrawPoint2D getLastPoint ()
synchronized Color getLinesColor ()
synchronized String getLineStyle ()
LaTeXDrawPoint2D getMiddlePt ()
int getNbPoints ()
synchronized int getNumber ()
Line getPerpendicularLine (LaTeXDrawPoint2D pt, boolean increaseMeter)
synchronized LaTeXDrawPoint2D getPoint (int id)
Vector< LaTeXDrawPoint2DgetPoints ()
String getPSTricksCodeFilling (float ppc)
String getPSTricksCodeLine (float ppc)
LaTeXDrawPoint2D getPt1 ()
LaTeXDrawPoint2D getPt2 ()
synchronized double getRotationAngle ()
int getSelectedDelimitorOrientation ()
synchronized double getShadowAngle ()
synchronized Color getShadowColor ()
synchronized double getShadowSize ()
synchronized Shape getShape ()
LaTeXDrawPoint2D getTheNWBoundPoint ()
LaTeXDrawPoint2D getTheNWNonRotatedBoundPoint ()
LaTeXDrawPoint2D getTheNWPoint ()
LaTeXDrawPoint2D getTheNWRotatedPoint ()
LaTeXDrawPoint2D getTheSEBoundPoint ()
LaTeXDrawPoint2D getTheSENonRotatedBoundPoint ()
LaTeXDrawPoint2D getTheSEPoint ()
LaTeXDrawPoint2D getTheSERotatedPoint ()
synchronized float getThickness ()
synchronized float getWhiteDashLength ()
double getXWithEquation (double y)
double getYWithEquation (double x)
synchronized boolean hasDoubleBoundary ()
synchronized boolean hasGradient ()
int hashCode ()
synchronized boolean hasShadow ()
boolean hasTwoLeftArrows ()
boolean intersected (Rectangle2D.Double r)
synchronized boolean isADelimitorSelected ()
synchronized boolean isBordersMovable ()
synchronized boolean isCustomizable ()
synchronized boolean isDashableOrDotable ()
boolean isDelimitorSelected ()
synchronized boolean isDoubleBoundaryable ()
synchronized boolean isFilled ()
synchronized boolean isHatched ()
boolean isIn (Point pt)
boolean isIn (LaTeXDrawPoint2D pt)
boolean isOnRotation ()
boolean isParametersEquals (Figure f, boolean considerShadow, boolean considerArrow)
synchronized boolean isResizable ()
synchronized boolean isSelected ()
synchronized boolean isThicknessable ()
boolean isTooSmallToBeRescaled ()
 Line (LaTeXDrawPoint2D p1, LaTeXDrawPoint2D p2, boolean increaseMeter)
 Line (double x1, double y1, double x2, double y2, boolean increaseMeter)
 Line (Line2D.Double l, boolean increaseMeter)
 Line (double b, LaTeXDrawPoint2D p1, boolean increaseMeter)
 Line (double a, double b, boolean increaseMeter)
 Line (boolean increaseMeter)
void mirrorHorizontal (LaTeXDrawPoint2D origin)
void mirrorVertical (LaTeXDrawPoint2D origin)
void onClick (Point pt)
synchronized void onDelimitorRelease ()
void onDragged (Point formerPt, Point newPt) throws Exception
synchronized void onRelease ()
void removePointAt (int id)
void rescaleX (double formerX, double newX, double percent, LaTeXDrawRectangle bound)
void rescaleY (double formerY, double newY, double percent, LaTeXDrawRectangle bound)
void rotate (LaTeXDrawPoint2D gravityC, double angle)
void rotate (Point formerPt, Point newPt) throws IllegalArgumentException
LaTeXDrawPoint2D rotateInvertPoint (Point p)
LaTeXDrawPoint2D rotateInvertPoint (LaTeXDrawPoint2D p)
LaTeXDrawPoint2D rotatePoint (Point p)
synchronized LaTeXDrawPoint2D rotatePoint (LaTeXDrawPoint2D p, double theta)
LaTeXDrawPoint2D rotatePoint (LaTeXDrawPoint2D p)
synchronized void setArrow1Style (String style)
synchronized void setArrow2Style (String style)
synchronized void setBlackDashLength (float blackDashLength)
synchronized void setBordersPosition (String doubleLinePosition)
synchronized void setCustomizable (boolean isCustomizable)
synchronized void setDotSep (float dotSep)
synchronized void setDoubleColor (Color doublecolor)
synchronized void setDoubleSep (double doubleSep)
synchronized void setFirstPoint (double x, double y)
synchronized void setFirstPoint (LaTeXDrawPoint2D pt)
synchronized void setGradientAngle (double gradientAngle)
synchronized void setGradientEndColor (Color gradientEndColor)
synchronized void setGradientMidPoint (double gradientMidPoint)
synchronized void setGradientStartColor (Color gradientStartColor)
synchronized void setHasDoubleBoundary (boolean hasDoubleBoundary)
synchronized void setHasShadow (boolean hasShadow)
synchronized void setHatchingAngle (double hatchingAngle)
synchronized void setHatchingColor (Color color)
synchronized void setHatchingSep (double hatchSep)
synchronized void setHatchingStyle (String style)
synchronized void setHatchingWidth (float width)
synchronized void setInteriorColor (Color c)
void setIsFilled (boolean filled)
synchronized void setLastPoint (Point pt)
synchronized void setLastPoint (double x, double y)
synchronized void setLastPoint (LaTeXDrawPoint2D pt)
synchronized void setLinesColor (Color c)
synchronized void setLineStyle (String style)
void setNewNumber ()
synchronized void setNumber (int number)
synchronized void setOnRotation (boolean on)
void setPoint (double x, double y, int id)
synchronized void setPointAt (LaTeXDrawPoint2D pt, int id)
synchronized void setResizable (boolean isResizable)
synchronized void setRotationAngle (double theta)
synchronized void setSelected (boolean state)
synchronized void setShadowAngle (double shadowAngle)
synchronized void setShadowColor (Color shadowColor)
synchronized void setShadowSize (double shadowSize)
synchronized void setThickness (float val)
synchronized void setWhiteDashLength (float whiteDashLength)
boolean shadowFillsShape ()
void shift (Point formerPt, Point newPt)
void shift (LaTeXDrawPoint2D formerPt, LaTeXDrawPoint2D newPt)
void shift (double shiftX, double shiftY)
Line2D toLine2D ()
String toString ()
Line translate (double t, boolean increaseMeter)
void updateAandB ()
void updateBorders ()
void updateBorders (LaTeXDrawPoint2D pt)
void updateGravityCenter ()
void updateShape ()
void updateStyleOfDelimitors ()
void updateToGrid (MagneticGrid grid)

Static Public Member Functions

static double computeAngle (Point pt, LaTeXDrawPoint2D gravityC)
static LaTeXDrawComboBox createBordersPositionChoice ()
static LaTeXDrawComboBox createFillChoice ()
static LaTeXDrawComboBox createStyleLineChoice ()
static double getCornerGap (Point2D a, Point2D b, Point2D c, double gap)
static boolean isValidBordersPosition (String pos)
static boolean isValidStyle (String style)
static LaTeXDrawPoint2D rotatePoint (LaTeXDrawPoint2D p, LaTeXDrawPoint2D gravityC, double theta)

Public Attributes

double rotationAngle

Static Public Attributes

static final String DECREPETED_FILL_CROSS = "Cross hatch"
static final String DECREPETED_FILL_HORIZ = "Horizontal hatch"
static final String DECREPETED_FILL_NO = "No hatch"
static final String DECREPETED_FILL_VERT = "Vertical hatch"
static final float DEFAULT_BLACK_DASH_LGTH = 8
static final Color DEFAULT_BORDERS_COL = Color.BLACK
static final String DEFAULT_BORDERS_POSITION = PSTricksConstants.BORDERS_INSIDE
static final float DEFAULT_DOT_SEP = 8
static final Color DEFAULT_DOUBLE_COLOR = PSTricksConstants.DEFAULT_DOUBLE_COLOR
static final boolean DEFAULT_DOUBLELINE = false
static final double DEFAULT_DOUBLESEP = 6
static final double DEFAULT_GRADIENT_ANGLE = Math.toRadians(PSTricksConstants.DEFAULT_GRADIENT_ANGLE)
static final double DEFAULT_GRADIENT_MID_POINT = 1
static final boolean DEFAULT_HAS_DOUBLE_BOUNDARY = false
static final double DEFAULT_HATCH_ANGLE = 0.
static final Color DEFAULT_HATCH_COL = Color.BLACK
static final double DEFAULT_HATCH_SEP = PSTricksConstants.DEFAULT_HATCH_SEP*PPC
static final String DEFAULT_HATCH_STYLE = PSTricksConstants.TOKEN_FILL_NONE
static final float DEFAULT_HATCH_WIDTH = DEFAULT_THICKNESS
static final Color DEFAULT_INTERIOR_COL = Color.WHITE
static final boolean DEFAULT_IS_BORDERS_MOVABLE = true
static final boolean DEFAULT_IS_CUSTOMISABLE = true
static final boolean DEFAULT_IS_FILLED = false
static final boolean DEFAULT_IS_HATCHED = false
static final boolean DEFAULT_IS_THICKNESSABLE = true
static final boolean DEFAULT_ISRESIZABLE = true
static final String DEFAULT_LINE_STYLE = PSTricksConstants.LINE_NONE_STYLE
static final double DEFAULT_ROTATION_ANGLE = 0.
static final double DEFAULT_SHADOW_ANGLE = Math.toRadians(PSTricksConstants.DEFAULT_SHADOW_ANGLE)
static final Color DEFAULT_SHADOW_COLOR = PSTricksConstants.DEFAULT_SHADOW_COLOR
static final boolean DEFAULT_SHADOW_HAS = PSTricksConstants.DEFAULT_SHADOW
static final double DEFAULT_SHADOW_SIZE = PSTricksConstants.DEFAULT_SHADOW_SIZE*PPC
static final float DEFAULT_THICKNESS = 2
static final float DEFAULT_WHITE_DASH_LGTH = 8
static final short DELIMITOR_ORIENTATION_EAST = 2
static final short DELIMITOR_ORIENTATION_NE = 6
static final short DELIMITOR_ORIENTATION_NONE = -1
static final short DELIMITOR_ORIENTATION_NORTH = 3
static final short DELIMITOR_ORIENTATION_NW = 4
static final short DELIMITOR_ORIENTATION_SE = 7
static final short DELIMITOR_ORIENTATION_SOUTH = 8
static final short DELIMITOR_ORIENTATION_SW = 5
static final short DELIMITOR_ORIENTATION_WEST = 0
static final short DELIMITOR_ROTATION = 9
static final String LABEL_BORDERS_POSITION_CHOICE = LaTeXDrawLang.getOthersString("Figure.boundPos")
static final String LABEL_HATCH_CHOICE = "Hatch choice"
static final String LABEL_HATCH_WIDTH = "Hatch width"
static final short LINE_NB_POINTS = 2
static final int PPC = 50

Protected Member Functions

void fillFigure (Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering, Shape s)
GeneralPath getBorders (double gap, boolean into)
Shape getTooSmallShape (Shape s)
void setHasGradient ()

Protected Attributes

float blackDashLength
LaTeXDrawRectangle borders
String bordersPosition
boolean canBeFilled
boolean canHaveArrow
boolean canHaveShadow
Vector< Delimitordelimiters
float dotSep
Color doubleColor
double doubleSep
Delimitor dSelected
double gradientAngle
Color gradientEndColor
double gradientMidPoint
Color gradientStartColor
LaTeXDrawPoint2D gravityCenter
boolean hasDoubleBoundary
boolean hasShadow
double hatchingAngle
Color hatchingColor
double hatchingSep
String hatchingStyle
float hatchingWidth
Color interiorColor
boolean isBordersMovable
boolean isCustomizable
boolean isDashableOrDotable
boolean isDoubleBoundaryable
boolean isFilled
boolean isOnRotation
boolean isResizable
boolean isSelected
boolean isThicknessable
Color linesColor
String lineStyle
int number
Vector< LaTeXDrawPoint2Dpts
double shadowAngle
Color shadowColor
double shadowSize
transient Shape shape
float thickness
float whiteDashLength

Private Member Functions

void readObject (ObjectInputStream ois) throws IOException, ClassNotFoundException

Private Attributes

double a
ArrowHead arrowHeadL
ArrowHead arrowHeadR
double b

Static Private Attributes

static final long serialVersionUID = 1L

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index