stella.jview
Class JRoofView

java.lang.Object
  extended by util.PropertyContainer
      extended by jview.AbstractDisplayable
          extended by stella.jview.JRoofView
All Implemented Interfaces:
Cloneable, Displayable, Initializable, PropertyBearing
Direct Known Subclasses:
JRoofView.Link

public class JRoofView
extends AbstractDisplayable

A graphical display of the current state of the roof. Five different positions of the roof are recognized, depending on the status of the limit switches and the X-switches. Additionally to these switches, the state of the roof locking mechanism can be queried. A typical roof view looks like

JRoofView

The typical use of a roof view will be within an other applications, notably an error event listener that can pipe received status messages to the RoofInfo and further to the roof view class to obtain an accurate view of the current roof state.

Note that the roof-view class does not care about the format of the status message, it must be converted in an other application to the appropriate input format, see RoofInfo.


Nested Class Summary
protected  class JRoofView.JRoofCanvas
          A class that displays the STELLA building and the roofs according to the images, blinking instances and offsets assigned to it.
static class JRoofView.Link
          Matches the roof view with an remote error caster, which should be the environment master on Tenerife.
static class JRoofView.Show
          Test purpose mainly.
static class JRoofView.Test
          Test purpose mainly.
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
private static int DEFBLINK
          The key to blinking intervall for normal blinks.
private static int DEFCENTRALOFFSET
          The key to the x-offset for position central.
private static String DEFCOMPONENTNAME
          The default name of the component.
private static int DEFFASTBLINK
          The key to blinking intervall for fast blinks.
private static String DEFFASTIMAGE
          The key to the image path of fast indicator.
private static String DEFGREEN
          The key to image-path part for 0 (green) images.
private static int DEFHALFOPENOFFSET
          The key to the x-offset for position half-open.
private static int DEFHALFSHUTOFFSET
          The key to the x-offset for position half-shut.
private static String DEFLAYOUT
          The key to the background image path.
private static String DEFLIMITLEFT
          The key to the left-widged-view limit-switch-image path.
private static String DEFLIMITRIGHT
          The key to the right-widged-view limit-switch-image path.
private static String DEFLOCKDOWN
          The key to the image path of lock-down.
private static Point DEFLOCKOFFSET
          The key to the x, y-offset for lock position, relative to roof.
private static String DEFLOCKSTALLED
          The key to the image path of stalled locks.
private static String DEFLOCKUP
          The key to the image path of lock-down.
private static Point DEFOPENLIMITOFFSET
          The key to the x, y-offset for position open limit.
private static int DEFOPENOFFSET
          The key to the x-offset for position open.
private static String DEFRED
          The key to image-path part for 1 (red) images.
private static String DEFROOFSIDE
          The key to the side-view roof-image path.
private static String DEFROOFTOP
          The key to the top-view roof-image path.
private static Point DEFSHUTLIMITOFFSET
          The key to the x, y-offset for position shut limit.
private static int DEFSHUTOFFSET
          The key to the x-offset for position shut.
private static Point DEFSIDELEFTORIGIN
          The key to the (x,y) origin for left-handed roofs, side view.
private static Point DEFSIDERIGHTORIGIN
          The key to the (x,y) origin for left-handed roofs, side view.
private static Dimension DEFSIZE
          The key to the size.
private static String DEFSLOWIMAGE
          The key to the image path of slow indicator.
private static Point DEFSPEEDLEFT
          The key to the position of the speedometer, left roofs.
private static Point DEFSPEEDRIGHT
          The default position of the speedometer, right roof.
private static Point DEFTOPLEFTORIGIN
          The key to the (x,y) origin for left-handed roofs, top view.
private static Point DEFTOPRIGHTORIGIN
          The key to the (x,y) origin for right-handed roofs, top view.
private static String DEFURLRESOURCES
          The default image directory.
private static Point DEFXOFFSET
          The key to the x, y-offset for position X-switch, relative to roof.
private static String DEFXSWITCHDOWN
          The key to the image path of the down-pointing X-switch.
private static String DEFXSWITCHLEFT
          The key to the image path of the left-pointing X-switch.
private static String DEFXSWITCHRIGHT
          The key to the image path of the right-pointing X-switch.
private static Image fastpic
          The image of the fast speedometer.
static String KEY_BLINK
          The key to blinking intervall for normal blinks.
static String KEY_CENTRALOFFSET
          The key to the x-offset for position central.
static String KEY_FASTBLINK
          The key to blinking intervall for fast blinks.
static String KEY_FASTIMAGE
          The key to the image path of fast indicator.
static String KEY_GREEN
          The key to image-path part for 0 (green) images.
static String KEY_HALFOPENOFFSET
          The key to the x-offset for position half-open.
static String KEY_HALFSHUTOFFSET
          The key to the x-offset for position half-shut.
static String KEY_LAYOUT
          The key to the background image path.
static String KEY_LIMITLEFT
          The key to the left-widged-view limit-switch-image path.
static String KEY_LIMITRIGHT
          The key to the right-widged-view limit-switch-image path.
static String KEY_LOCKDOWN
          The key to the image path of lock-down.
static String KEY_LOCKOFFSET
          The key to the x, y-offset for lock position, relative to roof.
static String KEY_LOCKSTALLED
          The key to the image path of stalled locks.
static String KEY_LOCKUP
          The key to the image path of lock-down.
static String KEY_OPENLIMITOFFSET
          The key to the x, y-offset for position open limit.
static String KEY_OPENOFFSET
          The key to the x-offset for position open.
static String KEY_RED
          The key to image-path part for 1 (red) images.
static String KEY_ROOFSIDE
          The key to the side-view roof-image path.
static String KEY_ROOFTOP
          The key to the top-view roof-image path.
static String KEY_SHUTLIMITOFFSET
          The key to the x, y-offset for position shut limit.
static String KEY_SHUTOFFSET
          The key to the x-offset for position shut.
static String KEY_SIDELEFTORIGIN
          The key to the (x,y) origin for left-handed roofs, side view.
static String KEY_SIDERIGHTORIGIN
          The key to the (x,y) origin for left-handed roofs, side view.
static String KEY_SIZE
          The key to the background image path.
static String KEY_SLOWIMAGE
          The key to the image path of slow indicator.
static String KEY_SPEEDLEFT
          The key to the speedometer, left roof.
static String KEY_SPEEDRIGHT
          The key to the speedometer, right roof.
static String KEY_TOPLEFTORIGIN
          The key to the (x,y) origin for left-handed roofs, top view.
static String KEY_TOPRIGHTORIGIN
          The key to the (x,y) origin for right-handed roofs, top view.
static String KEY_XOFFSET
          The key to the x, y-offset for position X-switch, relative to roof.
static String KEY_XSWITCHDOWN
          The key to the image path of the down-pointing X-switch.
static String KEY_XSWITCHLEFT
          The key to the image path of the left-pointing X-switch.
static String KEY_XSWITCHRIGHT
          The key to the image path of the right-pointing X-switch.
private static Image[] limitleftpic
          The image of the limit switch, wedged part left.
private static Image[] limitrightpic
          The image of the limit switch, wedged part right.
private static Image[] lockdownpic
          The image of the lock, deployed.
private static Image[] lockstallpic
          The image of the lock if stalled.
private static Image[] lockuppic
          The image of the lock, receded.
protected  JRoofView.JRoofCanvas roof
          The JPanel to display.
private static Image[] roofsidepic
          The image of the roof, side view.
private static Image[] rooftoppic
          The image of the roof, top view.
private static Image slowpic
          The image of the slow speedometer.
private static BufferedImage stellabuf
          The background image copy.
private static Image stellapic
          The background image.
private  boolean virgin
          True if painted for the first time.
private static Image[] xdownpic
          The image of the X-switch, pointing down.
private static Image[] xleftpic
          The image of the X-switch, pointing left.
private static Image[] xrightpic
          The image of the X-switch, pointing right.
 
Fields inherited from class jview.AbstractDisplayable
KEY_COMPONENTNAME, KEY_ICON, KEY_INSETS
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
JRoofView(Map info)
          Constructs a new roof view instance.
 
Method Summary
private  int getNorthBoltBlink(Trigger[] info)
          Get the blink frequency of the north bolt.
 Component getRepresentation()
          Returns a panel to show the current status of the roof.
private  int getSouthBoltBlink(Trigger[] info)
          Get the blink frequency of the south bolt.
private  int getSpeedBlink(Trigger[] info)
          Get the blink frequency of the speed indicator.
 void init()
          The init method loads all images.
private  Image[] loadGreenRed(String filename)
          Loads two images, a green and a red version.
private  void placeLeftRoof(int xoff, Image lrti, Image lrsi, int lrb, Image lbni, Image lbsi, int lbnb, int lbsb)
          Prepares any non-standard positions for drawing.
private  void placeRightRoof(int xoff, Image rrti, Image rrsi, int rrb, Image rbni, Image rbsi, int rbnb, int rbsb)
          Prepares any non-standard positions for drawing.
private  void showLeftRoof(Trigger[] info)
          Draws the image of a left-handed roof according to the roof info settings.
private  void showRightRoof(Trigger[] info)
          Draws the image of a left-handed roof according to the roof info settings.
 void showRoof(RoofInfo[] roofinfo)
          Takes an array of roof info objects to deduce the status of the roof to draw.
 
Methods inherited from class jview.AbstractDisplayable
getComponentName, getIcon, getIcon
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, clone, createFrom, createFrom, createFrom, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getLocalClassLoader, getLocalized, getLocalized, getLocalizedString, getLocalizedString, getProperties, getPropertiesToKey, getPropertiesToKey, getProperty, getResource, getResourceAsStream, getResourceFromKey, getResources, has, isNew, keyCreate, keyCreate, parseObject, reload, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_LAYOUT

public static final String KEY_LAYOUT
The key to the background image path.

See Also:
Constant Field Values

KEY_ROOFTOP

public static final String KEY_ROOFTOP
The key to the top-view roof-image path.

See Also:
Constant Field Values

KEY_ROOFSIDE

public static final String KEY_ROOFSIDE
The key to the side-view roof-image path.

See Also:
Constant Field Values

KEY_LIMITRIGHT

public static final String KEY_LIMITRIGHT
The key to the right-widged-view limit-switch-image path.

See Also:
Constant Field Values

KEY_LIMITLEFT

public static final String KEY_LIMITLEFT
The key to the left-widged-view limit-switch-image path.

See Also:
Constant Field Values

KEY_XSWITCHLEFT

public static final String KEY_XSWITCHLEFT
The key to the image path of the left-pointing X-switch.

See Also:
Constant Field Values

KEY_XSWITCHRIGHT

public static final String KEY_XSWITCHRIGHT
The key to the image path of the right-pointing X-switch.

See Also:
Constant Field Values

KEY_XSWITCHDOWN

public static final String KEY_XSWITCHDOWN
The key to the image path of the down-pointing X-switch.

See Also:
Constant Field Values

KEY_LOCKDOWN

public static final String KEY_LOCKDOWN
The key to the image path of lock-down.

See Also:
Constant Field Values

KEY_LOCKUP

public static final String KEY_LOCKUP
The key to the image path of lock-down.

See Also:
Constant Field Values

KEY_LOCKSTALLED

public static final String KEY_LOCKSTALLED
The key to the image path of stalled locks.

See Also:
Constant Field Values

KEY_FASTIMAGE

public static final String KEY_FASTIMAGE
The key to the image path of fast indicator.

See Also:
Constant Field Values

KEY_SLOWIMAGE

public static final String KEY_SLOWIMAGE
The key to the image path of slow indicator.

See Also:
Constant Field Values

KEY_GREEN

public static final String KEY_GREEN
The key to image-path part for 0 (green) images.

See Also:
Constant Field Values

KEY_RED

public static final String KEY_RED
The key to image-path part for 1 (red) images.

See Also:
Constant Field Values

KEY_BLINK

public static final String KEY_BLINK
The key to blinking intervall for normal blinks.

See Also:
Constant Field Values

KEY_FASTBLINK

public static final String KEY_FASTBLINK
The key to blinking intervall for fast blinks.

See Also:
Constant Field Values

KEY_TOPLEFTORIGIN

public static final String KEY_TOPLEFTORIGIN
The key to the (x,y) origin for left-handed roofs, top view.

See Also:
Constant Field Values

KEY_TOPRIGHTORIGIN

public static final String KEY_TOPRIGHTORIGIN
The key to the (x,y) origin for right-handed roofs, top view.

See Also:
Constant Field Values

KEY_SIDELEFTORIGIN

public static final String KEY_SIDELEFTORIGIN
The key to the (x,y) origin for left-handed roofs, side view.

See Also:
Constant Field Values

KEY_SIDERIGHTORIGIN

public static final String KEY_SIDERIGHTORIGIN
The key to the (x,y) origin for left-handed roofs, side view.

See Also:
Constant Field Values

KEY_OPENOFFSET

public static final String KEY_OPENOFFSET
The key to the x-offset for position open.

See Also:
Constant Field Values

KEY_HALFOPENOFFSET

public static final String KEY_HALFOPENOFFSET
The key to the x-offset for position half-open.

See Also:
Constant Field Values

KEY_CENTRALOFFSET

public static final String KEY_CENTRALOFFSET
The key to the x-offset for position central.

See Also:
Constant Field Values

KEY_HALFSHUTOFFSET

public static final String KEY_HALFSHUTOFFSET
The key to the x-offset for position half-shut.

See Also:
Constant Field Values

KEY_SHUTOFFSET

public static final String KEY_SHUTOFFSET
The key to the x-offset for position shut.

See Also:
Constant Field Values

KEY_OPENLIMITOFFSET

public static final String KEY_OPENLIMITOFFSET
The key to the x, y-offset for position open limit.

See Also:
Constant Field Values

KEY_SHUTLIMITOFFSET

public static final String KEY_SHUTLIMITOFFSET
The key to the x, y-offset for position shut limit.

See Also:
Constant Field Values

KEY_XOFFSET

public static final String KEY_XOFFSET
The key to the x, y-offset for position X-switch, relative to roof.

See Also:
Constant Field Values

KEY_LOCKOFFSET

public static final String KEY_LOCKOFFSET
The key to the x, y-offset for lock position, relative to roof.

See Also:
Constant Field Values

KEY_SPEEDLEFT

public static final String KEY_SPEEDLEFT
The key to the speedometer, left roof.

See Also:
Constant Field Values

KEY_SPEEDRIGHT

public static final String KEY_SPEEDRIGHT
The key to the speedometer, right roof.

See Also:
Constant Field Values

KEY_SIZE

public static final String KEY_SIZE
The key to the background image path.

See Also:
Constant Field Values

DEFURLRESOURCES

private static final String DEFURLRESOURCES
The default image directory.

See Also:
Constant Field Values

DEFLAYOUT

private static final String DEFLAYOUT
The key to the background image path.

See Also:
Constant Field Values

DEFROOFTOP

private static final String DEFROOFTOP
The key to the top-view roof-image path.

See Also:
Constant Field Values

DEFROOFSIDE

private static final String DEFROOFSIDE
The key to the side-view roof-image path.

See Also:
Constant Field Values

DEFLIMITRIGHT

private static final String DEFLIMITRIGHT
The key to the right-widged-view limit-switch-image path.

See Also:
Constant Field Values

DEFLIMITLEFT

private static final String DEFLIMITLEFT
The key to the left-widged-view limit-switch-image path.

See Also:
Constant Field Values

DEFXSWITCHLEFT

private static final String DEFXSWITCHLEFT
The key to the image path of the left-pointing X-switch.

See Also:
Constant Field Values

DEFXSWITCHRIGHT

private static final String DEFXSWITCHRIGHT
The key to the image path of the right-pointing X-switch.

See Also:
Constant Field Values

DEFXSWITCHDOWN

private static final String DEFXSWITCHDOWN
The key to the image path of the down-pointing X-switch.

See Also:
Constant Field Values

DEFLOCKDOWN

private static final String DEFLOCKDOWN
The key to the image path of lock-down.

See Also:
Constant Field Values

DEFLOCKUP

private static final String DEFLOCKUP
The key to the image path of lock-down.

See Also:
Constant Field Values

DEFLOCKSTALLED

private static final String DEFLOCKSTALLED
The key to the image path of stalled locks.

See Also:
Constant Field Values

DEFFASTIMAGE

private static final String DEFFASTIMAGE
The key to the image path of fast indicator.

See Also:
Constant Field Values

DEFSLOWIMAGE

private static final String DEFSLOWIMAGE
The key to the image path of slow indicator.

See Also:
Constant Field Values

DEFGREEN

private static final String DEFGREEN
The key to image-path part for 0 (green) images.

See Also:
Constant Field Values

DEFRED

private static final String DEFRED
The key to image-path part for 1 (red) images.

See Also:
Constant Field Values

DEFBLINK

private static final int DEFBLINK
The key to blinking intervall for normal blinks.

See Also:
Constant Field Values

DEFFASTBLINK

private static final int DEFFASTBLINK
The key to blinking intervall for fast blinks.

See Also:
Constant Field Values

DEFTOPLEFTORIGIN

private static final Point DEFTOPLEFTORIGIN
The key to the (x,y) origin for left-handed roofs, top view.


DEFTOPRIGHTORIGIN

private static final Point DEFTOPRIGHTORIGIN
The key to the (x,y) origin for right-handed roofs, top view.


DEFSIDELEFTORIGIN

private static final Point DEFSIDELEFTORIGIN
The key to the (x,y) origin for left-handed roofs, side view.


DEFSIDERIGHTORIGIN

private static final Point DEFSIDERIGHTORIGIN
The key to the (x,y) origin for left-handed roofs, side view.


DEFOPENOFFSET

private static final int DEFOPENOFFSET
The key to the x-offset for position open.

See Also:
Constant Field Values

DEFHALFOPENOFFSET

private static final int DEFHALFOPENOFFSET
The key to the x-offset for position half-open.

See Also:
Constant Field Values

DEFCENTRALOFFSET

private static final int DEFCENTRALOFFSET
The key to the x-offset for position central.

See Also:
Constant Field Values

DEFHALFSHUTOFFSET

private static final int DEFHALFSHUTOFFSET
The key to the x-offset for position half-shut.

See Also:
Constant Field Values

DEFSHUTOFFSET

private static final int DEFSHUTOFFSET
The key to the x-offset for position shut.

See Also:
Constant Field Values

DEFOPENLIMITOFFSET

private static final Point DEFOPENLIMITOFFSET
The key to the x, y-offset for position open limit.


DEFSHUTLIMITOFFSET

private static final Point DEFSHUTLIMITOFFSET
The key to the x, y-offset for position shut limit.


DEFXOFFSET

private static final Point DEFXOFFSET
The key to the x, y-offset for position X-switch, relative to roof.


DEFLOCKOFFSET

private static final Point DEFLOCKOFFSET
The key to the x, y-offset for lock position, relative to roof.


DEFSPEEDLEFT

private static final Point DEFSPEEDLEFT
The key to the position of the speedometer, left roofs.


DEFSPEEDRIGHT

private static final Point DEFSPEEDRIGHT
The default position of the speedometer, right roof.


DEFSIZE

private static final Dimension DEFSIZE
The key to the size.


DEFCOMPONENTNAME

private static final String DEFCOMPONENTNAME
The default name of the component.

See Also:
Constant Field Values

stellapic

private static Image stellapic
The background image. It is a layout of the STELLA building.


rooftoppic

private static Image[] rooftoppic
The image of the roof, top view. Index zero: green, one: red.


roofsidepic

private static Image[] roofsidepic
The image of the roof, side view. Index zero: green, one: red.


limitrightpic

private static Image[] limitrightpic
The image of the limit switch, wedged part right.


limitleftpic

private static Image[] limitleftpic
The image of the limit switch, wedged part left.


xdownpic

private static Image[] xdownpic
The image of the X-switch, pointing down.


xrightpic

private static Image[] xrightpic
The image of the X-switch, pointing right.


xleftpic

private static Image[] xleftpic
The image of the X-switch, pointing left.


lockdownpic

private static Image[] lockdownpic
The image of the lock, deployed.


lockuppic

private static Image[] lockuppic
The image of the lock, receded.


lockstallpic

private static Image[] lockstallpic
The image of the lock if stalled.


fastpic

private static Image fastpic
The image of the fast speedometer. Off-blinking from background.


slowpic

private static Image slowpic
The image of the slow speedometer. Off-blinking from background.


stellabuf

private static BufferedImage stellabuf
The background image copy. It is a layout of the STELLA building.


roof

protected JRoofView.JRoofCanvas roof
The JPanel to display. Stored for visibility checks.


virgin

private boolean virgin
True if painted for the first time.

Constructor Detail

JRoofView

public JRoofView(Map info)
Constructs a new roof view instance. Nothing is displayed until the getRepresentation() method is called. The constructor takes care of initializing all images and parsing all offsets.

All properties required by the roof view class has defaults, so construction is successful even when called with an empty properties object.

Method Detail

init

public void init()
The init method loads all images.

Specified by:
init in interface Initializable
Overrides:
init in class PropertyContainer

loadGreenRed

private Image[] loadGreenRed(String filename)
Loads two images, a green and a red version. The filename provided is augmented right before the .ext-extension with the file name parts found in KEY_GREEN and KEY_RED. The image with the index zero is always the green pic.

Because this method uses the ImageIcon class, it blocks until the images are fully loaded.


getRepresentation

public Component getRepresentation()
Returns a panel to show the current status of the roof. The returned panel does not show anything, but has its size set to the correct dimension. Drawing onto the component is only possible after it is displayed. The showRoof(stella.roof.RoofInfo[]) method does this things.


showRoof

public void showRoof(RoofInfo[] roofinfo)
Takes an array of roof info objects to deduce the status of the roof to draw. Even indices are left-handed roofs, odd indices right-handed roofs. The display panel is updated if it is showing.


showLeftRoof

private void showLeftRoof(Trigger[] info)
Draws the image of a left-handed roof according to the roof info settings. This method directly sets the images needed by the JRoofView.JRoofCanvas class for correctly drawing the roof. The roof canvas is not told to repaint, this should be done in the calling routine.


showRightRoof

private void showRightRoof(Trigger[] info)
Draws the image of a left-handed roof according to the roof info settings. This method directly sets the images needed by the JRoofView.JRoofCanvas class for correctly drawing the roof. The roof canvas is not told to repaint, this should be done in the calling routine.


getSpeedBlink

private int getSpeedBlink(Trigger[] info)
Get the blink frequency of the speed indicator. Zero means no blink.


getNorthBoltBlink

private int getNorthBoltBlink(Trigger[] info)
Get the blink frequency of the north bolt. Zero means no blink.


getSouthBoltBlink

private int getSouthBoltBlink(Trigger[] info)
Get the blink frequency of the south bolt. Zero means no blink.


placeLeftRoof

private void placeLeftRoof(int xoff,
                           Image lrti,
                           Image lrsi,
                           int lrb,
                           Image lbni,
                           Image lbsi,
                           int lbnb,
                           int lbsb)
Prepares any non-standard positions for drawing. This includes the flashing instances for the roofs and for the locks and the position of the X-switches.

Parameters:
xoff - Offset in x from origin, left side.
lrti - Image of the left-top roof.
lrsi - Image of the left-side roof.
lrbb - Blinking intervall for left roof, 0=steady
lbni - Image of the left-north bolt.
lbsi - Image of the left-south bolt.
lbnb - Blinking intervall for left-north bolt.
lbsb - Blinking intervall for left-south bolt.

placeRightRoof

private void placeRightRoof(int xoff,
                            Image rrti,
                            Image rrsi,
                            int rrb,
                            Image rbni,
                            Image rbsi,
                            int rbnb,
                            int rbsb)
Prepares any non-standard positions for drawing. This includes the flashing instances for the roofs and for the locks and the position of the X-switches.

Parameters:
xoff - Offset in x from origin, right side.
rrti - Image of the right-top roof.
rrsi - Image of the right-side roof.
rrbb - Blinking intervall for right roof, 0=steady
rbni - Image of the right-north bolt.
rbsi - Image of the right-south bolt.
rbnb - Blinking intervall for right-north bolt.
rbsb - Blinking intervall for right-south bolt.