org.diyefi.openlogviewer.genericlog
Class GenericLog
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<String,GenericDataElement>
org.diyefi.openlogviewer.genericlog.GenericLog
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,GenericDataElement>
public class GenericLog
- extends LinkedHashMap<String,GenericDataElement>
- See Also:
- Serialized Form
Constructor Summary |
GenericLog(String[] headers,
int initialCapacity,
int ourLoadFactor,
ResourceBundle labels)
provide a String array of headers
each header will be used as a HashMap key, the data related to each header will be added to an ArrayList . |
Methods inherited from interface java.util.Map |
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
RECORD_COUNT_KEY
public static final String RECORD_COUNT_KEY
- See Also:
- Constant Field Values
tempResetKey
public static final String tempResetKey
- See Also:
- Constant Field Values
elapsedTimeKey
public static final String elapsedTimeKey
- See Also:
- Constant Field Values
GenericLog
public GenericLog(String[] headers,
int initialCapacity,
int ourLoadFactor,
ResourceBundle labels)
- provide a
String
array of headers
each header will be used as a HashMap key, the data related to each header will be added to an ArrayList
.
- Parameters:
headers
- - of the data to be converted
addValue
public final void addValue(String key,
double value)
- Add a piece of data to the
ArrayList
associated with the key
- Parameters:
key
- - headervalue
- - data to be added
incrementPosition
public final void incrementPosition()
setLogStatus
public final void setLogStatus(GenericLog.LogState newLogStatus)
- Set the state of the log
- Parameters:
newLogStatus
- GenericLog.LOG_NOT_LOADED / GenericLog.LOG_LOADING / GenericLog.LOG_LOADED
getLogStatus
public final GenericLog.LogState getLogStatus()
- Returns:
- -1 if log not loaded 0 if loading or 1 if log is loaded
addPropertyChangeListener
public final void addPropertyChangeListener(String name,
PropertyChangeListener listener)
- Add a property change listener to the generic log, REQUIRED!!
GenericLog.LOG_STATUS is the name of the status property
- Parameters:
name
- listener
- new OBJECT.addPropertyChangeListener("LogLoaded", new PropertyChangeListener() {
public void propertyChange( final PropertyChangeEvent propertyChangeEvent) {
OpenLogViewerApp.getInstance().setLog((GenericLog) propertyChangeEvent.getSource());
...Insert code here...
}
});
removePropertyChangeListener
public final void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
- Remove a PropertyChangeListener
- Parameters:
propertyName
- name of listenerlistener
- listener
getLogStatusMessage
public final String getLogStatusMessage()
setLogStatusMessage
public final void setLogStatusMessage(String message)
getRecordCount
public final int getRecordCount()
clearOut
public final void clearOut()
Copyright © 2015 DIYEFI.org. All Rights Reserved.