com.bbn.openmap.graphicLoader.scenario
Class ScenarioGraphicLoader.TimerRateHolder

java.lang.Object
  |
  +--com.bbn.openmap.graphicLoader.scenario.ScenarioGraphicLoader.TimerRateHolder
All Implemented Interfaces:
PropertyConsumer
Enclosing class:
ScenarioGraphicLoader

public class ScenarioGraphicLoader.TimerRateHolder
extends java.lang.Object
implements PropertyConsumer

A convenience class that keeps track of a relationship between real-time changes and scenario-time changes.


Field Summary
 
Fields inherited from interface com.bbn.openmap.PropertyConsumer
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
 
Constructor Summary
ScenarioGraphicLoader.TimerRateHolder(java.text.SimpleDateFormat simpleDateFormat, java.lang.String dpz)
          Create a TimerRateHolder with a date format, and a baseline time.
 
Method Summary
 java.util.Properties getProperties(java.util.Properties props)
          Method to fill in a Properties object, reflecting the current values of the PropertyConsumer.
 java.util.Properties getPropertyInfo(java.util.Properties props)
          Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer.
 java.lang.String getPropertyPrefix()
          Get the property key prefix that is being used to prepend to the property keys for Properties lookups.
 void setProperties(java.util.Properties props)
          Method to set the properties in the PropertyConsumer.
 void setProperties(java.lang.String prefix, java.util.Properties props)
          Method to set the properties in the PropertyConsumer.
 void setPropertyPrefix(java.lang.String p)
          Set the property key prefix that should be used by the PropertyConsumer.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScenarioGraphicLoader.TimerRateHolder

public ScenarioGraphicLoader.TimerRateHolder(java.text.SimpleDateFormat simpleDateFormat,
                                             java.lang.String dpz)
Create a TimerRateHolder with a date format, and a baseline time. The default baseline time is "00:00:00", so if you need to change that, use this constructor. The pace for this TimerRateHolder should be a relative amount of time, and that relativity, taking into account the locale offset to GMT, is given by the baseline time. The baseline time should match the format given.

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setProperties

public void setProperties(java.util.Properties props)
Description copied from interface: PropertyConsumer
Method to set the properties in the PropertyConsumer. It is assumed that the properties do not have a prefix associated with them, or that the prefix has already been set.

Specified by:
setProperties in interface PropertyConsumer
Parameters:
props - a properties object that the PropertyConsumer can use to retrieve expected properties it can use for configuration.

setProperties

public void setProperties(java.lang.String prefix,
                          java.util.Properties props)
Description copied from interface: PropertyConsumer
Method to set the properties in the PropertyConsumer. The prefix is a string that should be prepended to each property key (in addition to a separating '.') in order for the PropertyConsumer to uniquely identify properties meant for it, in the midst of of Properties meant for several objects.

Specified by:
setProperties in interface PropertyConsumer
Parameters:
prefix - a String used by the PropertyConsumer to prepend to each property value it wants to look up - setList.getProperty(prefix.propertyKey). If the prefix had already been set, then the prefix passed in should replace that previous value.
props - a Properties object that the PropertyConsumer can use to retrieve expected properties it can use for configuration.

getProperties

public java.util.Properties getProperties(java.util.Properties props)
Description copied from interface: PropertyConsumer
Method to fill in a Properties object, reflecting the current values of the PropertyConsumer. If the PropertyConsumer has a prefix set, the property keys should have that prefix plus a separating '.' prepended to each property key it uses for configuration.

Specified by:
getProperties in interface PropertyConsumer
Parameters:
props - a Properties object to load the PropertyConsumer properties into. If getList equals null, then a new Properties object should be created.
Returns:
Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

getPropertyInfo

public java.util.Properties getPropertyInfo(java.util.Properties props)
Description copied from interface: PropertyConsumer
Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. The key for each property should be the raw property name (without a prefix) with a value that is a String that describes what the property key represents, along with any other information about the property that would be helpful (range, default value, etc.).

Specified by:
getPropertyInfo in interface PropertyConsumer
Parameters:
props - a Properties object to load the PropertyConsumer properties into. If getList equals null, then a new Properties object should be created.
Returns:
Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

getPropertyPrefix

public java.lang.String getPropertyPrefix()
Description copied from interface: PropertyConsumer
Get the property key prefix that is being used to prepend to the property keys for Properties lookups.

Specified by:
getPropertyPrefix in interface PropertyConsumer
Returns:
the prefix string

setPropertyPrefix

public void setPropertyPrefix(java.lang.String p)
Description copied from interface: PropertyConsumer
Set the property key prefix that should be used by the PropertyConsumer. The prefix, along with a '.', should be prepended to the property keys known by the PropertyConsumer.

Specified by:
setPropertyPrefix in interface PropertyConsumer
Parameters:
p - the prefix String.


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details