+ /**
+ * Store a non-null key-value pair in a hashtable used to set alignment
+ * properties note: null keys will raise an error, null values will result in
+ * the key/value pair being silently ignored.
+ *
+ * @param key -
+ * non-null key object
+ * @param value -
+ * non-null value
+ */
+ protected void setAlignmentProperty(Object key, Object value)
+ {
+ if (key == null)
+ {
+ throw new Error(
+ "Implementation error: Cannot have null alignment property key.");
+ }
+ if (value == null)
+ {
+ return; // null properties are ignored.
+ }
+ if (properties == null)
+ {
+ properties = new Hashtable();
+ }
+ properties.put(key, value);
+ }
+
+ protected Object getAlignmentProperty(Object key)
+ {
+ if (properties != null && key != null)
+ {
+ return properties.get(key);
+ }
+ return null;