|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<String,GenericDataElement>
org.diyefi.openlogviewer.genericlog.GenericLog
public class GenericLog
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
Field Summary | |
---|---|
static int |
LOG_LOADED
|
static int |
LOG_LOADING
|
static int |
LOG_NOT_LOADED
|
protected PropertyChangeSupport |
PCS
|
Constructor Summary | |
---|---|
GenericLog()
|
|
GenericLog(String[] headers)
provide a String array of headerseach header will be used as a HashMap key, the data related to each header will be added to an ArrayList . |
Method Summary | |
---|---|
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 |
boolean |
addValue(String key,
double value)
Add a piece of data to the ArrayList associated with the key |
int |
getLogStatus()
|
String |
getMetadata()
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove a PropertyChangeListener |
void |
setHeaders(String[] headers)
sets the names of the headers for the Comparable interface of GenericDataElement |
void |
setLogStatus(int newLogStatus)
Set the state of the log |
void |
setMetaData(String md)
Add metadata This is information about the log being converted such as the location it was from or the date This method does not add to its self so in order to add more info you must VAR.addMetaData(VAR.getMetaData() + NEWINFO) |
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
public static final int LOG_NOT_LOADED
public static final int LOG_LOADING
public static final int LOG_LOADED
protected final PropertyChangeSupport PCS
Constructor Detail |
---|
public GenericLog()
public GenericLog(String[] headers)
String
array of headersArrayList
.
headers
- - of the data to be convertedMethod Detail |
---|
public boolean addValue(String key, double value)
ArrayList
associated with the key
key
- - headervalue
- - data to be added
public void setLogStatus(int newLogStatus)
newLogStatus
- GenericLog.LOG_NOT_LOADED / GenericLog.LOG_LOADING / GenericLog.LOG_LOADEDpublic int getLogStatus()
public void setHeaders(String[] headers)
headers
- public void setMetaData(String md)
md
- meta data to be addedpublic String getMetadata()
public void addPropertyChangeListener(String name, PropertyChangeListener listener)
name
- listener
- new OBJECT.addPropertyChangeListener("LogLoaded", new PropertyChangeListener() {
public void propertyChange( final PropertyChangeEvent propertyChangeEvent) {
OpenLogViewerApp.getInstance().setLog((GenericLog) propertyChangeEvent.getSource());
...Insert code here...
}
});
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName
- name of listenerlistener
- listener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |