|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.display.PositionablePoint
public class PositionablePoint
PositionablePoint is a Point defining a node in the Track that can be dragged around the inside of the enclosing LayoutEditor panel using a right-drag (drag with meta key).
Two types of Positionable Point are supported: Anchor - point on track - two track connections End Bumper - end of track point - one track connection
Note that a PositionablePoint exists for specifying connectivity and drawing position only. The Track Segments connected to a PositionablePoint may belong to the same block or to different blocks. Since each Track Segment may only belong to one block, a PositionablePoint may function as a Block Boundary.
Signal names are saved here at a Block Boundary anchor point by the tool Set Signals at Block Boundary. PositionablePoint does nothing with these signal head names; it only serves as a place to store them.
| Field Summary | |
|---|---|
static int |
ANCHOR
|
static int |
END_BUMPER
|
String |
trackSegment1Name
|
String |
trackSegment2Name
|
| Constructor Summary | |
|---|---|
PositionablePoint(String id,
int t,
Point2D p,
LayoutEditor myPanel)
|
|
| Method Summary | |
|---|---|
TrackSegment |
getConnect1()
|
TrackSegment |
getConnect2()
|
Point2D |
getCoords()
|
String |
getEastBoundSignal()
|
String |
getID()
Accessor methods |
int |
getType()
|
String |
getWestBoundSignal()
|
boolean |
isActive()
"active" means that the object is still displayed, and should be stored. |
protected int |
maxHeight()
|
protected int |
maxWidth()
|
void |
mouseClicked(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
removeTrackConnection(TrackSegment track)
|
void |
setCoords(Point2D p)
|
void |
setEastBoundSignal(String signalName)
|
void |
setObjects(LayoutEditor p)
Initialization method The above variables are initialized by PositionablePointXml, then the following method is called after the entire LayoutEditor is loaded to set the specific TrackSegment objects. |
void |
setTrackConnection(TrackSegment track)
Setup and remove connections to track |
void |
setWestBoundSignal(String signalName)
|
protected void |
showPopUp(MouseEvent e)
For editing: only provides remove |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ANCHOR
public static final int END_BUMPER
public String trackSegment1Name
public String trackSegment2Name
| Constructor Detail |
|---|
public PositionablePoint(String id,
int t,
Point2D p,
LayoutEditor myPanel)
| Method Detail |
|---|
public String getID()
public int getType()
public TrackSegment getConnect1()
public TrackSegment getConnect2()
public Point2D getCoords()
public void setCoords(Point2D p)
public String getEastBoundSignal()
public void setEastBoundSignal(String signalName)
public String getWestBoundSignal()
public void setWestBoundSignal(String signalName)
public void setObjects(LayoutEditor p)
public void setTrackConnection(TrackSegment track)
public void removeTrackConnection(TrackSegment track)
protected int maxWidth()
protected int maxHeight()
public void mousePressed(MouseEvent e)
public void mouseReleased(MouseEvent e)
public void mouseClicked(MouseEvent e)
protected void showPopUp(MouseEvent e)
public boolean isActive()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||