org.hfbk.vis.Prefs Class Reference

Collaboration diagram for org.hfbk.vis.Prefs:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Prefs (boolean loadFromUser)
Prefs clone ()
void parse (String[] args) throws Exception

Static Public Member Functions

static void main (String[] args)

Public Attributes

boolean log
boolean osk
boolean udp
boolean map
boolean verbose
boolean sound
boolean debug
String version
String user = "anonymous"
String baseURL = ""
String baseURLs = "http://vis.hfbk.org/vis/;http://hirnsohle.de/vis/;http://127.0.0.1//vis/"
String sources = "google,wikipedia,mix,googleNews,googleImages,flickr,commonImages,ebayImages,youtube,blaster,spider"
String language = "en,es,de,fr"
String routes = "function poti1(value){client.timescale=value/0x3FF*4;} function poti3(value){client.mouseViewpoint.tfov=value/0x3FF*4;} function poti4(value){var q=(1-value/0x3FF)*3; glutil.backgroundcolor.set(q,q,q);}"
String suffixesImage = "jpeg|jpg|gif|png"
String suffixesAudio = "mp3|wav|aiff"
String suffixesVideo = "mpeg|mpg|avi|mov|rm|wmv|asf|rm|swf"
String init = ""
String screenshotdir = "."
String watchdir = ""
String font = "Sans Serif"
int maxTextLength = 10000
int logCount = 1000
int logUpdate = 60000
int timeout = 30000
int servertimeout = 2000
int automate = 0
int detail = 3
int thumbpixels = 300000
boolean autoFocus = true
boolean direct = true
boolean update = true
boolean screenshotupload = false

Static Public Attributes

static Prefs current = new Prefs(true)
static Prefs defaults = new Prefs(false)

Package Functions

void load ()
void save ()

Static Package Functions

static void addShutdownHook ()
static String getVersion ()

Static Package Attributes

static HashMap< String, String > help = new HashMap<String,String>()

Detailed Description

global prefs holder.

automatically loaded on need and saved on application shutdown.

this uses the java prefs system, thus: -storing in registry (bah) on windows machines -storing in ~/.java/.userPrefs/org/hfbk/vis/prefs.xml on Linux machines -storing in ~/Library/Preferences/org.hfbk.vis.plist and visc.plist on MaxOSX machines

the load / save is done in reflective way: All public fields of this class are automatically stored, default values are given by their inital values.

supported types: boolean, int, String.

boolean: log if queries are send to public log osk if onscreen keyboard is shown udp if udp listener is enabled map if birdseye map is shown verbose if debug output should be made sound if sound should be used

strings: version svn repository revision encoding encoding expected on fetched data urlencoding encoding applied to requested urls user username for logging etc. baseURL vis/server url override. usually empty (TODO should not be saved) baseURLs list of possible alternative vis/servers sources list of sources shown by the source field convenient popup routes ECMAScript defined input-to-actions mapping (for udp etc.) suffixesVideo video file format suffixes suffixesImage audio file format suffixes

ints: logUpdate milliseconds between log update fetches timeout milliseconds to wait till a fetch is canceled servertimeout milliseconds to wait for servers first connection. this takes place at vis/client startup, so users have to wait that long. automate amount of log follow-up recreation fontRes texture resolution of one font letter

Author:
student

Definition at line 59 of file Prefs.java.


Constructor & Destructor Documentation

org.hfbk.vis.Prefs.Prefs ( boolean  loadFromUser  ) 

Definition at line 157 of file Prefs.java.

References org.hfbk.vis.Prefs.load().

Here is the call graph for this function:


Member Function Documentation

static void org.hfbk.vis.Prefs.addShutdownHook (  )  [static, package]

Definition at line 147 of file Prefs.java.

References org.hfbk.vis.Prefs.current, and org.hfbk.vis.Prefs.save().

Referenced by org.hfbk.vis.Prefs.main().

Here is the call graph for this function:

Here is the caller graph for this function:

void org.hfbk.vis.Prefs.load (  )  [package]

load prefs from user

Definition at line 164 of file Prefs.java.

References org.hfbk.vis.Prefs.getVersion(), and org.hfbk.vis.Prefs.version.

Referenced by org.hfbk.vis.Prefs.main(), and org.hfbk.vis.Prefs.Prefs().

Here is the call graph for this function:

Here is the caller graph for this function:

void org.hfbk.vis.Prefs.save (  )  [package]

save prefs to user

Definition at line 187 of file Prefs.java.

Referenced by org.hfbk.vis.Prefs.addShutdownHook().

Here is the caller graph for this function:

static void org.hfbk.vis.Prefs.main ( String[]  args  )  [static]

running Prefs will provide a UI to edit Prefs independet of adjusted program. the --remove option will clean user prefs.

Parameters:
args 

Definition at line 214 of file Prefs.java.

References org.hfbk.vis.Prefs.addShutdownHook(), org.hfbk.vis.Prefs.current, and org.hfbk.vis.Prefs.load().

Here is the call graph for this function:

Prefs org.hfbk.vis.Prefs.clone (  ) 

Definition at line 227 of file Prefs.java.

References org.hfbk.vis.Prefs.clone().

Referenced by org.hfbk.vis.Prefs.clone(), and org.hfbk.vis.PrefsDialog.PrefsDialog().

Here is the call graph for this function:

Here is the caller graph for this function:

void org.hfbk.vis.Prefs.parse ( String[]  args  )  throws Exception

parses an String[], for example cmd line parameters, to prefs. data is stored as consecutive key value pairs and parsed to actual type.

Definition at line 239 of file Prefs.java.

static String org.hfbk.vis.Prefs.getVersion (  )  [static, package]

Definition at line 252 of file Prefs.java.

Referenced by org.hfbk.vis.Prefs.load().

Here is the caller graph for this function:


Member Data Documentation

HashMap<String,String> org.hfbk.vis.Prefs.help = new HashMap<String,String>() [static, package]

Definition at line 60 of file Prefs.java.

boolean org.hfbk.vis.Prefs.log

Definition at line 63 of file Prefs.java.

boolean org.hfbk.vis.Prefs.osk

Definition at line 63 of file Prefs.java.

boolean org.hfbk.vis.Prefs.udp

Definition at line 63 of file Prefs.java.

boolean org.hfbk.vis.Prefs.map

Definition at line 63 of file Prefs.java.

boolean org.hfbk.vis.Prefs.verbose

Definition at line 63 of file Prefs.java.

boolean org.hfbk.vis.Prefs.sound

Definition at line 63 of file Prefs.java.

boolean org.hfbk.vis.Prefs.debug

Definition at line 63 of file Prefs.java.

String org.hfbk.vis.Prefs.version

Definition at line 65 of file Prefs.java.

Referenced by org.hfbk.vis.Prefs.load().

String org.hfbk.vis.Prefs.user = "anonymous"

Definition at line 66 of file Prefs.java.

String org.hfbk.vis.Prefs.baseURL = ""

Definition at line 67 of file Prefs.java.

String org.hfbk.vis.Prefs.baseURLs = "http://vis.hfbk.org/vis/;http://hirnsohle.de/vis/;http://127.0.0.1//vis/"

Definition at line 68 of file Prefs.java.

String org.hfbk.vis.Prefs.sources = "google,wikipedia,mix,googleNews,googleImages,flickr,commonImages,ebayImages,youtube,blaster,spider"

Definition at line 69 of file Prefs.java.

String org.hfbk.vis.Prefs.language = "en,es,de,fr"

Definition at line 70 of file Prefs.java.

String org.hfbk.vis.Prefs.routes = "function poti1(value){client.timescale=value/0x3FF*4;} function poti3(value){client.mouseViewpoint.tfov=value/0x3FF*4;} function poti4(value){var q=(1-value/0x3FF)*3; glutil.backgroundcolor.set(q,q,q);}"

Definition at line 71 of file Prefs.java.

String org.hfbk.vis.Prefs.suffixesImage = "jpeg|jpg|gif|png"

Definition at line 72 of file Prefs.java.

String org.hfbk.vis.Prefs.suffixesAudio = "mp3|wav|aiff"

Definition at line 73 of file Prefs.java.

String org.hfbk.vis.Prefs.suffixesVideo = "mpeg|mpg|avi|mov|rm|wmv|asf|rm|swf"

Definition at line 74 of file Prefs.java.

String org.hfbk.vis.Prefs.init = ""

Definition at line 75 of file Prefs.java.

String org.hfbk.vis.Prefs.screenshotdir = "."

Definition at line 76 of file Prefs.java.

String org.hfbk.vis.Prefs.watchdir = ""

Definition at line 77 of file Prefs.java.

String org.hfbk.vis.Prefs.font = "Sans Serif"

Definition at line 78 of file Prefs.java.

int org.hfbk.vis.Prefs.maxTextLength = 10000

Definition at line 80 of file Prefs.java.

int org.hfbk.vis.Prefs.logCount = 1000

Definition at line 81 of file Prefs.java.

int org.hfbk.vis.Prefs.logUpdate = 60000

Definition at line 82 of file Prefs.java.

int org.hfbk.vis.Prefs.timeout = 30000

Definition at line 83 of file Prefs.java.

int org.hfbk.vis.Prefs.servertimeout = 2000

Definition at line 84 of file Prefs.java.

int org.hfbk.vis.Prefs.automate = 0

Definition at line 85 of file Prefs.java.

int org.hfbk.vis.Prefs.detail = 3

Definition at line 86 of file Prefs.java.

int org.hfbk.vis.Prefs.thumbpixels = 300000

Definition at line 87 of file Prefs.java.

boolean org.hfbk.vis.Prefs.autoFocus = true

Definition at line 88 of file Prefs.java.

boolean org.hfbk.vis.Prefs.direct = true

Definition at line 88 of file Prefs.java.

boolean org.hfbk.vis.Prefs.update = true

Definition at line 88 of file Prefs.java.

boolean org.hfbk.vis.Prefs.screenshotupload = false

Definition at line 88 of file Prefs.java.

Prefs org.hfbk.vis.Prefs.current = new Prefs(true) [static]

Definition at line 143 of file Prefs.java.

Referenced by org.hfbk.vis.Prefs.addShutdownHook(), org.hfbk.vis.Prefs.main(), and org.hfbk.vis.PrefsDialog.PrefsDialog().

Prefs org.hfbk.vis.Prefs.defaults = new Prefs(false) [static]

Definition at line 144 of file Prefs.java.


The documentation for this class was generated from the following file:
Generated on Tue Apr 7 17:58:13 2009 for visclient by  doxygen 1.5.1