Screen with several layers each of which is attached to a different view. Views are drawn in fixed order and can be disabled individually. The LayeredScreen defines a common world coordinate system for all its views, cares for the transformation between screen and world coordinates and has an option to display a crosshair cursor. It listens to mouse clicks and sends messages with the corresponding world coordinates.
Properties:
int nPainter | number of layers |
Painter[] painter | list of painters attached to the layers |
boolean[] painterActive | flag to initially disable/enable painters individually |
double maxX, maxY | world coordinates of upper right corner |
double minX, minY | world coordinates of lower left corner |
boolean crossCursor | enables crosshair cursor (instead of standard arrow) |
boolean equalScales | forces equal scales in x and y direction by adapting yMin and yMax |
Methods:
repaint() | forces all Painters to repaint their layer |
changeXYScale(DVector v) | changes scale of world coordinates, used mainly by external screen controls |
Events:
VectorEvent | sends world coordinates of point clicked at |