carmetal.objects
Class IntersectionObject

java.lang.Object
  extended by carmetal.objects.ConstructionObject
      extended by carmetal.objects.PointObject
          extended by carmetal.objects.IntersectionObject
All Implemented Interfaces:
DriverObject, MoveableObject, carmetal.rene.lister.Element, carmetal.rene.util.sort.SortObject, Cloneable
Direct Known Subclasses:
AxisFunctionIntersectionObject, CircleIntersectionObject, LineCircleIntersectionObject, LineIntersectionObject, LineQuadricIntersectionObject, PointonObjectIntersectionObject

public class IntersectionObject
extends PointObject

This is the parent class of various intersection objects. Intersections are points. Problems are multiple intersections and restrictions to keep one of them away or close to some other point. The most problematic intersections are between objects of type PointonObject. In case of two possible intersection points, there is also the option to switch from one object to the other in automatic tracks. This allows to run through all possible states of a construction.


Field Summary
protected  boolean Alternate
           
protected  carmetal.rene.zirkel.expression.Expression Away
           
protected  boolean First
           
protected  ConstructionObject P1
           
protected  ConstructionObject P2
           
protected  boolean Restricted
           
protected  boolean StayAway
           
protected  boolean Switched
           
 
Fields inherited from class carmetal.objects.PointObject
Alpha, AlphaValid, BarycentricCoordsInitialzed, CIRCLE, CROSS, DCROSS, DIAMOND, DOT, EX, EY, Fixed, Gx, Gy, MaxType, Moveable, MovedBy, SQUARE, Type, UseAlpha, VirtualBound, X, Y
 
Fields inherited from class carmetal.objects.ConstructionObject
Back, Bold, Break, BreakHide, C, Cn, ColorIndex, ColorType, Conditionals, Count, DescriptionState, DisplaysText, DL, Flag, FormulaState, gotNCount, HasZ, Hidden, HideBreak, inConstruction, Indicated, INVISIBLE, IsDrawn, JobTarget, Keep, KeepClose, LabelSelected, Large, MainParameter, Name, NCount, NeedsRecompute, NORMAL, Obtuse, Parameter, RekFlag, RekValidating, Scratch, Selectable, Selected, ShowIndicatedName, ShowName, ShowValue, SizeState, Solid, SpecialColor, SpecialParameter, StrongSelected, SuperHidden, Target, Text, THICK, THIN, Tracked, Translation, TX1, TX2, TY1, TY2, Unit, Valid, Value, VRek, XcOffset, YcOffset
 
Constructor Summary
IntersectionObject(carmetal.construction.Construction c, ConstructionObject p1, ConstructionObject p2)
           
 
Method Summary
 void autoAway()
          Check, if the other intersection is already visible and defined.
 String away()
           
 boolean canAlternate()
          Returns, if this intersection can alternate between two states, like CircleIntersection and LineCircleIntersection.
 Enumeration depending()
          Return an enumeration of objects, that this object depends on.
 void doSwitch()
           
 PointObject getAway()
           
 int getN()
           
 String getTag()
           
 boolean isAlternate()
           
 boolean isFirst()
           
 boolean isRestricted()
           
 boolean isSwitchable()
           
 boolean isSwitched()
           
 boolean nearto(int x, int y, carmetal.rene.zirkel.ZirkelCanvas zc)
          Test, if this object is chosen with coordinates x,y
 void printArgs(carmetal.rene.util.xml.XmlWriter xml)
           
 void setAlternate(boolean flag)
           
 boolean setAway(String s)
           
 boolean setAway(String s, boolean flag)
           
 void setFirst(boolean flag)
           
 void setRestricted(boolean flag)
           
 boolean stayAway()
           
 void switchBack()
           
 void translate()
          Override in children! This translates the mother items.
 void updateText()
           
 void validate()
           
 void validate(double x, double y)
           
 
Methods inherited from class carmetal.objects.PointObject
addMagnetObject, alea, canKeepClose, changedBy, clearBoundOrder, clearChanges, clearMagnetObjects, computeBarycentricCoords, copy, dependsOnItselfOnly, dependsOnParametersOnly, distanceTo, dontUpdate, dontUpdate, dragTo, drawPoint, equals, fixed, followMagnetObject, getAlpha, getBound, getBoundOrder, getCDPDisplayValue, getCurrentMagnetObject, getDisplayValue, getDistance, getEX, getEY, getIncrement, getMagnetObjects, getMagnetObjectsString, getMagnetRay, getMagnetRayExp, getOldX, getOldY, getType, getX, getY, haveBoundOrder, insidewindow, insidewindow, isDriverObject, isInside, isMagnet, isOn, isPointOn, isPointOnOrMagnet, laterBind, magnet, move, moveable, moveableBy, moveablePoint, movedBy, nearto, paint, printType, project, project, removeMagnetObject, round, selectMagnetObjects, setA, setAlpha, setBound, setBound, setBoundOrder, setCurrentMagnetObject, setDefaults, setFixed, setFixed, setHalfIncrement, setIncrement, setInside, setKeepClose, setLaterBind, setMagnetObjects, setMagnetRayExp, setMoveable, setName, setNameWithNumber, setPointLabel, setTargetDefaults, setType, setUseAlpha, setXY, setXYaway, shake, snap, somethingChanged, startDrag, translateMagnetObjects, updateCircleDep, updateMagnetObjects, useAlpha, validCoordinates
 
Methods inherited from class carmetal.objects.ConstructionObject
addConditional, addDepInExpressions, canDisplayName, canFix, checkConditionals, clearCircleDep, clearConditional, clearConditionals, clearParameter, compare, contains, copyProperties, dependsOn, depset, depset, depset, discardMV, displays, drawCenteredLabel, drawLabel, drawLabel, drawPointLabel, edit, equals, equalsTo, getAlias, getCDPSizeDisplay, getColor, getColorIndex, getColorIndex, getColorType, getColorType, getConditional, getConditionalColor, getConstruction, getDepArray, getDescription, getDisplaySize, getDisplayText, getE, getElementColor, getElementString, getElementString, getEquation, getEXpos, getExpression, getEYpos, getLines, getMax, getMin, getName, getNCount, getObtuse, getPointObject, getPrompt, getR, getSpecialColor, getStringLength, getText, getTranslation, getUnit, getValue, getVector, getZ, hasUnit, haveConditional, haveConditionals, helpDisplayNumber, helpDisplayValue, indicated, isBack, isBack, isBold, isBreak, isBreakHide, isDragable, isFilled, isFilledForSelect, isFixed, isFlag, isGotNCount, isHidden, isHidden, isHideBreak, isInConstruction, isJobTarget, isKeep, isKeepClose, isLarge, isMainParameter, isOwnedByControl, isParameter, isPartial, isRekFlag, isSelectable, isSlider, isSolid, isSolid, isSpecial, isSpecialParameter, isStrongSelected, isSuperHidden, isSuperHidden, isTarget, labelSelected, laterTranslate, locallyLike, maybeTransparent, mustHide, nearto, onlynearto, replaceExpressions, round, round, roundDisplay, save, secondaryParams, selected, setAlias, setBack, setBold, setBreak, setBreakHide, setcOffset, setColor, setColor, setColorType, setConstruction, setDisplaySize, setDragable, setExpression, setFilled, setFixed, setFixed, setFlag, setFont, setGotNCount, setHidden, setHideBreak, setInConstruction, setIndicated, setIndicated, setJobTarget, setKeep, setKeepClose, setLabelSelected, setLarge, setLines, setMainParameter, setName, setNameCheck, setNCount, setObtuse, setOffset, setOwnedByControl, setParameter, setPartial, setPrompt, setRekFlag, setSelectable, setSelected, setShowName, setShowValue, setSlider, setSlider, setSolid, setSpecial, setSpecialColor, setSpecialParameter, setStrongSelected, setSuperHidden, setTarget, setText, setText, setTracked, setTranslation, setUnit, showName, showName, showValue, showValue, testConditional, text1, text2, text3, text4, textAny, textcontains, toggleHidden, tracked, translateConditionals, translateExpressions, translateOffset, valid, visible, xcOffset, ycOffset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

P1

protected ConstructionObject P1

P2

protected ConstructionObject P2

Away

protected carmetal.rene.zirkel.expression.Expression Away

StayAway

protected boolean StayAway

First

protected boolean First

Switched

protected boolean Switched

Restricted

protected boolean Restricted

Alternate

protected boolean Alternate
Constructor Detail

IntersectionObject

public IntersectionObject(carmetal.construction.Construction c,
                          ConstructionObject p1,
                          ConstructionObject p2)
Method Detail

getTag

public String getTag()
Overrides:
getTag in class PointObject

getN

public int getN()
Overrides:
getN in class PointObject

nearto

public boolean nearto(int x,
                      int y,
                      carmetal.rene.zirkel.ZirkelCanvas zc)
Description copied from class: ConstructionObject
Test, if this object is chosen with coordinates x,y

Overrides:
nearto in class PointObject

updateText

public void updateText()
Overrides:
updateText in class PointObject

setFirst

public void setFirst(boolean flag)

isFirst

public boolean isFirst()

validate

public void validate()
Overrides:
validate in class PointObject

validate

public void validate(double x,
                     double y)

printArgs

public void printArgs(carmetal.rene.util.xml.XmlWriter xml)
Overrides:
printArgs in class PointObject

away

public String away()

stayAway

public boolean stayAway()

setAway

public boolean setAway(String s,
                       boolean flag)

setAway

public boolean setAway(String s)

depending

public Enumeration depending()
Description copied from class: ConstructionObject
Return an enumeration of objects, that this object depends on. This should usually called from children via super.

Overrides:
depending in class PointObject

translate

public void translate()
Description copied from class: ConstructionObject
Override in children! This translates the mother items.

Overrides:
translate in class PointObject

isSwitchable

public boolean isSwitchable()

autoAway

public void autoAway()
Check, if the other intersection is already visible and defined. In this case, we want to keep the intersection different from the other intersection point.


switchBack

public void switchBack()

doSwitch

public void doSwitch()

isSwitched

public boolean isSwitched()

isRestricted

public boolean isRestricted()

setRestricted

public void setRestricted(boolean flag)

getAway

public PointObject getAway()

setAlternate

public void setAlternate(boolean flag)

isAlternate

public boolean isAlternate()

canAlternate

public boolean canAlternate()
Returns, if this intersection can alternate between two states, like CircleIntersection and LineCircleIntersection. Used by the dialog.



© Copyright 2005 S.Chekanov. All Rights Reserved.
jHPlot package, a part of jHepWork: is a full-featured multiplatform data-analysis framework