Uiname.properties

From PC2wiki
Jump to: navigation, search

uiname.properties (Version 9) is a file that specify class names that override the default PC² UI (GUI) classes.

On startup version 9 selects a UI (View) class to display/load and run on successful login.

In uiname.properties a initial UI class can be assigned to an individual login (for example judge4) or assigned by group (ex. judge).

There is no requirement that the UI class must be a GUI.

Example uiname.properties

In this example (the default values) each account type has an assigned class.

#PC^2 GUI Plugins
#Tue Nov 06 07:20:26 PST 2007
judge=edu.csus.ecs.pc2.ui.judge.JudgeView
team=edu.csus.ecs.pc2.ui.team.TeamView
scoreboard=edu.csus.ecs.pc2.ui.board.ScoreboardView
administrator=edu.csus.ecs.pc2.ui.admin.AdministratorView
server=edu.csus.ecs.pc2.ui.server.ServerView

In this example, judge5 and the server (server0 login) initial UI classes are overridden.

#PC^2 GUI Plugins
#Tue Nov 06 07:20:26 PST 2007
judge=edu.csus.ecs.pc2.ui.judge.JudgeView
judge5=edu.csus.ecs.pc2.ui.judge.JudgeViewSpecial
team=edu.csus.ecs.pc2.ui.team.TeamView
scoreboard=edu.csus.ecs.pc2.ui.board.ScoreboardView
administrator=edu.csus.ecs.pc2.ui.admin.AdministratorView
server=edu.csus.ecs.pc2.ui.server.ServerView
server0=edu.csus.ecs.pc2.server.ServerM

Selecting which class to load

Order is as follows, if no match found continues to next number

  1. by login id in the uiname.properties (ex judge5)
  2. by client type in the uiname.properties (ex judge)
  3. by default uses internal default value

Creating alternate startup class/View/UI

The startup class must meet a Java interface to be loaded. Contact pc2 team [pc2@ecs.csus.edu] for more information. Consider using the API or a plugin.

See Also