|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectgeneralDatabase.lookupTables.LookUpTables
public class LookUpTables
Singleton class for managing a common lookup table for many PAMGUARD modules (following from Logger format)
| Field Summary | |
|---|---|
private PamTableItem |
borderColourItem
|
private java.sql.Connection |
checkedTableConnection
|
static int |
CODE_LENGTH
Maximum length of a lookup code |
private PamTableItem |
codeItem
|
private PamTableItem |
fillcolourItem
|
private EmptyTableDefinition |
lutTableDef
|
private PamTableItem |
orderItem
|
private PamTableItem |
selectableItem
|
private static LookUpTables |
singleInstance
|
private PamTableItem |
symbolItem
|
static int |
TEXT_LENGTH
Maximum length of a lookup item text |
private PamTableItem |
textItem
|
static int |
TOPIC_LENGTH
Maximum length of topic text for a lookup collection |
private PamTableItem |
topicItem
|
| Constructor Summary | |
|---|---|
private |
LookUpTables()
|
| Method Summary | |
|---|---|
boolean |
checkTable()
Check the database module is present and that the lookup table exists. |
LookupList |
createLookupList(PamCursor resultSet,
java.lang.String topic)
|
private PamCursor |
createPamCursor(java.lang.String topic)
|
LookupList |
editLookupTopic(java.awt.Window window,
java.lang.String topic)
Query all LUT items with the given topic name. |
private java.awt.Color |
getColour(java.lang.String colString)
Interpret colour strings from the lookup table |
private java.lang.String |
getColourString(java.awt.Color colour)
Convert a colour into a string that can be written to the table |
LookupList |
getLookupList(java.lang.String topic)
|
static LookUpTables |
getLookUpTables()
Access the LookUpTables class |
private boolean |
reWriteList(LookupList newList,
PamCursor resultSet)
write back to database |
private void |
setTableData(PamCursor resultSet,
LookupItem lookupItem)
Set data in the result set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static LookUpTables singleInstance
private EmptyTableDefinition lutTableDef
public static final int TOPIC_LENGTH
public static final int CODE_LENGTH
public static final int TEXT_LENGTH
private PamTableItem topicItem
private PamTableItem codeItem
private PamTableItem textItem
private PamTableItem selectableItem
private PamTableItem borderColourItem
private PamTableItem fillcolourItem
private PamTableItem orderItem
private PamTableItem symbolItem
private java.sql.Connection checkedTableConnection
| Constructor Detail |
|---|
private LookUpTables()
| Method Detail |
|---|
public static LookUpTables getLookUpTables()
public boolean checkTable()
public LookupList createLookupList(PamCursor resultSet,
java.lang.String topic)
private boolean reWriteList(LookupList newList,
PamCursor resultSet)
newList - resultSet -
private void setTableData(PamCursor resultSet,
LookupItem lookupItem)
they could be copied straight into the cursor, but this would have to be done in the exact right order.
resultSet - Pamguard cursor objectlookupItem - lookup itemprivate java.awt.Color getColour(java.lang.String colString)
deblankedStringValue -
private java.lang.String getColourString(java.awt.Color colour)
colour - Colour
public LookupList editLookupTopic(java.awt.Window window,
java.lang.String topic)
window - topic - LUT topic
public LookupList getLookupList(java.lang.String topic)
private PamCursor createPamCursor(java.lang.String topic)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||