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

latexDraw::figures::Square Class Reference

Inheritance diagram for latexDraw::figures::Square:

latexDraw::figures::LaTeXDrawRectangle latexDraw::figures::LaTeXDrawPolygon latexDraw::figures::properties::BordersMovable latexDraw::figures::Figure latexDraw::figures::properties::DoubleBoundaryable latexDraw::figures::properties::Drawable

List of all members.

Detailed Description

This class defines a square.

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.


Definition at line 37 of file Square.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 ()
Square clone () throws CloneNotSupportedException
double computeRotationAngle (Point formerPt, Point newPt) throws IllegalArgumentException
synchronized Shape createNonRotatedShape2D ()
Shape createShadowShape ()
synchronized Shape createShape2D ()
void draw (Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
void draw (Graphics2D g, boolean drawBorders, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
synchronized float getBlackDashLength ()
synchronized 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 getFrameArc ()
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 ()
synchronized double getHeight ()
Shape getInsideBorders ()
Shape getInsideOutsideOrMiddleBorders ()
synchronized Color getInteriorColor ()
synchronized LaTeXDrawPoint2D getLastPoint ()
synchronized Color getLinesColor ()
synchronized String getLineStyle ()
Shape getMiddleBorders ()
int getNbPoints ()
synchronized int getNumber ()
Shape getOutsideBorders ()
synchronized LaTeXDrawPoint2D getPoint (int id)
Vector< LaTeXDrawPoint2DgetPoints ()
String getPSTricksCodeFilling (float ppc)
String getPSTricksCodeLine (float ppc)
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 ()
synchronized double getWidth ()
synchronized boolean hasDoubleBoundary ()
synchronized boolean hasGradient ()
int hashCode ()
synchronized boolean hasShadow ()
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 p)
boolean isOnRotation ()
boolean isParametersEquals (Figure f, boolean considerShadow, boolean considerArrow)
synchronized boolean isResizable ()
synchronized boolean isRound ()
synchronized boolean isSelected ()
synchronized boolean isThicknessable ()
boolean isTooSmallToBeRescaled ()
void mirrorHorizontal (LaTeXDrawPoint2D origin)
void mirrorVertical (LaTeXDrawPoint2D origin)
void onClick (Point p)
synchronized void onDelimitorRelease ()
void onDragged (Point formerPt, Point newPt)
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 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 (LaTeXDrawPoint2D pt)
synchronized void setFirstPoint (double x, double y)
synchronized void setFrameArc (double value)
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)
synchronized void setIsFilled (boolean state)
synchronized void setIsRound (boolean round)
synchronized void setLastPoint (Point pt)
synchronized void setLastPoint (LaTeXDrawPoint2D pt)
synchronized void setLastPoint (double x, double y)
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 setSecondPoint (LaTeXDrawPoint2D pt)
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 setThirdPoint (LaTeXDrawPoint2D pt)
synchronized void setWhiteDashLength (float whiteDashLength)
synchronized void setWidth (double w)
boolean shadowFillsShape ()
void shift (Point formerPt, Point newPt)
void shift (LaTeXDrawPoint2D formerPt, LaTeXDrawPoint2D newPt)
void shift (double shiftX, double shiftY)
 Square (LaTeXDrawPoint2D pt1, LaTeXDrawPoint2D pt2, LaTeXDrawPoint2D pt3, LaTeXDrawPoint2D pt4, boolean increaseMeter)
 Square (boolean increaseMeter)
 Square (Figure f, boolean sameNumber)
Rectangle toRectangle ()
Rectangle2D toRectangle2D ()
String toString ()
void updateBorders (LaTeXDrawPoint2D pt)
void updateBorders ()
synchronized void updateGravityCenter ()
synchronized void updateNSEWDelimitors ()
void updateShape ()
synchronized 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 float DEFAULT_DOT_SEP = 8
static final boolean DEFAULT_DOUBLELINE = false
static final double DEFAULT_DOUBLESEP = 6
static final double DEFAULT_FRAME_ARC = 0.5
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 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 boolean DEFAULT_ISROUND = false
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 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 NB_POINTS_FRAME = 4
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 initializeDelimitors ()
void recenterDraggedOnRotation (LaTeXDrawPoint2D oldGravityCenter)
void setHasGradient ()

Protected Attributes

float blackDashLength
LaTeXDrawRectangle borders
String bordersPosition
boolean canBeFilled
boolean canHaveArrow
boolean canHaveShadow
Delimitor dE
Vector< Delimitordelimiters
Delimitor dN
Delimitor dNE
Delimitor dNW
float dotSep
Color doubleColor
double doubleSep
Delimitor dS
Delimitor dSE
Delimitor dSelected
Delimitor dSW
Delimitor dW
double frameArc
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 isRound
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
double width

Private Member Functions

void readObject (ObjectInputStream ois) throws IOException, ClassNotFoundException

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