|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.gui.search.DisplayManager
The class that handles all the display details.
Has a singleton pattern,
When instantiated, loads up the display properties for each schema, and stores the URIs against the properties in a HashMap.
This class also has the responsibility of remembering which columns are visible in the search window and the width of each column
Method Summary | |
void |
addColumn(java.lang.String rawName,
int prefWidth)
called when a column is added. |
void |
commit()
Writes the props out to disk |
static int |
getDefaultWidth(int val)
|
java.lang.String |
getDisplayName(java.lang.String rawName,
java.lang.String schemaURI)
For given schemaURI and rawFieldName returns the Display name. |
static java.lang.String |
getKeyString(int val)
|
java.util.Properties |
getProperties(java.lang.String schemaURI)
|
java.lang.String |
getValue(java.lang.String key)
returns the preferred width of a column, if the column is not found in the props, we return a width of -1 |
static DisplayManager |
instance()
|
void |
removeColumn(java.lang.String rawName)
called when column is removed. |
void |
resetPropsFile()
|
void |
setValue(java.lang.String rawName,
int prefWidth)
|
static java.lang.String |
stripPreferredSize(java.lang.String rawName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static DisplayManager instance()
public void resetPropsFile()
public java.util.Properties getProperties(java.lang.String schemaURI)
public java.lang.String getDisplayName(java.lang.String rawName, java.lang.String schemaURI)
public void addColumn(java.lang.String rawName, int prefWidth)
public void setValue(java.lang.String rawName, int prefWidth)
public void removeColumn(java.lang.String rawName)
public java.lang.String getValue(java.lang.String key)
key
- if normal column the key has a special value stored in
ResultPanel, otherwise, its the raw name of the columnpublic void commit()
public static java.lang.String getKeyString(int val)
public static int getDefaultWidth(int val)
public static java.lang.String stripPreferredSize(java.lang.String rawName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |