utils.circuit
Class Segment
java.lang.Object
utils.circuit.Segment
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- Curve, ObjShapeHandle, ObjShapeTerrain, Straight, XmlObjPits
public class Segment
- extends java.lang.Object
- implements java.lang.Cloneable
- Author:
- Patrice Espie , Charalampos Alexopoulos
TODO To change the template for this generated type comment go to Window -
Preferences - Java - Code Style - Code Templates
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
previousShape
public Segment previousShape
nextShape
public Segment nextShape
name
protected java.lang.String name
left
protected SegmentSide left
right
protected SegmentSide right
type
protected java.lang.String type
count
protected int count
startTrackAlpha
public double startTrackAlpha
endTrackAlpha
public double endTrackAlpha
startTrackCenter
public java.awt.geom.Point2D.Double startTrackCenter
endTrackCenter
public java.awt.geom.Point2D.Double endTrackCenter
distFromCircuitStart
public double distFromCircuitStart
profilStepLength
protected double profilStepLength
length
protected double length
surface
protected java.lang.String surface
heightStart
protected double heightStart
heightEnd
protected double heightEnd
points
public java.awt.geom.Point2D.Double[] points
trPoints
public java.awt.geom.Point2D.Double[] trPoints
Segment
public Segment()
Segment
public Segment(java.lang.String type)
getLeft
public SegmentSide getLeft()
- Returns:
- Returns the left.
setLeft
public void setLeft(SegmentSide left)
- Parameters:
left - The left to set.
getRight
public SegmentSide getRight()
- Returns:
- Returns the right.
setRight
public void setRight(SegmentSide right)
- Parameters:
right - The right to set.
getName
public java.lang.String getName()
- Returns:
- Returns the name.
setName
public void setName(java.lang.String name)
- Parameters:
name - The name to set.
getSurface
public java.lang.String getSurface()
- Returns:
- Returns the surface.
setSurface
public void setSurface(java.lang.String surface)
- Parameters:
surface - The surface to set.
copyTo
public Segment copyTo(Segment shape)
throws java.lang.CloneNotSupportedException
- Throws:
java.lang.CloneNotSupportedException
contains
public boolean contains(double x,
double y)
getBounds
public java.awt.geom.Rectangle2D.Double getBounds()
calcShape
public void calcShape(Segment previousShape)
throws java.lang.Exception
- Throws:
java.lang.Exception
draw
public void draw(java.awt.Graphics g,
java.awt.geom.AffineTransform affineTransform)
drag
public void drag(java.awt.geom.Point2D.Double dragDelta)
getHeightEnd
public double getHeightEnd()
- Returns:
- Returns the heightEnd.
setHeightEnd
public void setHeightEnd(double heightEnd)
- Parameters:
heightEnd - The heightEnd to set.
getHeightStart
public double getHeightStart()
- Returns:
- Returns the heightStart.
setHeightStart
public void setHeightStart(double heightStart)
- Parameters:
heightStart - The heightStart to set.
getLength
public double getLength()
- Returns:
- Returns the length.
setLength
public void setLength(double length)
- Parameters:
length - The length to set.
getType
public java.lang.String getType()
- Returns:
- Returns the type.
setType
public void setType(java.lang.String type)
- Parameters:
type - The type to set.
getProfilStepLength
public double getProfilStepLength()
- Returns:
- Returns the profilStepLength.
setProfilStepLength
public void setProfilStepLength(double profilStepLength)
- Parameters:
profilStepLength - The profilStepLength to set.
getCount
public int getCount()
- Returns:
- Returns the count.
setCount
public void setCount(int count)
- Parameters:
count - The count to set.
getPreviousShape
public Segment getPreviousShape()
- Returns:
- Returns the previousShape.
setPreviousShape
public void setPreviousShape(Segment prev)
- Parameters:
previousShape - The previousShape to set.
removeSideListener
public void removeSideListener(java.awt.event.ActionListener l)
addSideListener
public void addSideListener(SegmentSideListener l)
clone
public java.lang.Object clone()
- Overrides:
clone in class java.lang.Object
getPoints
public java.awt.geom.Point2D.Double[] getPoints()
- Returns:
- Returns the points.
setPoints
public void setPoints(java.awt.geom.Point2D.Double[] points)
- Parameters:
points - The points to set.
getDx
public double getDx()
- Returns:
- Returns the dx.
getDy
public double getDy()
- Returns:
- Returns the dy.