View Javadoc

1   /*
2    * Created on 10.01.2005
3    *
4    */
5   package hoplugins.conv;
6   
7   import plugins.ISpieler;
8   
9   /***
10   * @author Thorsten Dietz
11   *
12   */
13  final class CColumn {
14  	private int index;
15  	private String display;
16  	private String defaultValue;
17  	
18  	protected CColumn(int newIndex, String newDisplay){
19  		index = newIndex;
20  		display = newDisplay;
21  		defaultValue = newDisplay;
22  	}
23  	protected CColumn(int newIndex, String newDisplay, String newDefaultValue){
24  		index = newIndex;
25  		display = newDisplay;
26  		defaultValue = newDefaultValue;
27  	}
28  	protected final String getDefaultValue() {
29  		return defaultValue;
30  	}
31  
32  	protected final String getDisplay() {
33  		return display;
34  	}
35  
36  	protected final int getIndex() {
37  		return index;
38  	}
39  
40  	public String toString(){
41  		return display;
42  	}
43  	
44  	protected final String getPlayerValue(ISpieler spieler) {
45  		String tmp = "";
46  		switch (getIndex()) {
47  		case RSC.PLAYER_ID:
48  			tmp = "" + spieler.getSpielerID();
49  			break;
50  		case RSC.PLAYER_NAME:
51  			tmp = spieler.getName();
52  			break;
53  		case RSC.PLAYER_AGE:
54  			tmp = "" + spieler.getAlter();
55  			break;
56  		case RSC.PLAYER_SALARY:
57  			tmp = "" + spieler.getGehalt();
58  			break;
59  		case RSC.PLAYER_VERLETZT:
60  			tmp = "" + spieler.getVerletzt();
61  			break;
62  
63  		case RSC.PLAYER_LEADERSHIP:
64  			tmp = "" + spieler.getFuehrung();
65  			break;
66  		case RSC.PLAYER_FORM:
67  			tmp = "" + spieler.getForm();
68  			break;
69  		case RSC.PLAYER_STAMINA:
70  			tmp = "" + spieler.getKondition();
71  			break;
72  		case RSC.PLAYER_EXPERIENCE:
73  			tmp = "" + spieler.getErfahrung();
74  			break;
75  		case RSC.PLAYER_KEEPER:
76  			tmp = "" + spieler.getTorwart();
77  			break;
78  		case RSC.PLAYER_DEFENCE:
79  			tmp = "" + spieler.getVerteidigung();
80  			break;
81  		case RSC.PLAYER_WING:
82  			tmp = "" + spieler.getFluegelspiel();
83  			break;
84  		case RSC.PLAYER_PLAYMAKING:
85  			tmp = "" + spieler.getSpielaufbau();
86  			break;
87  		case RSC.PLAYER_PASSING:
88  			tmp = "" + spieler.getPasspiel();
89  			break;
90  		case RSC.PLAYER_SCORING:
91  			tmp = "" + spieler.getTorschuss();
92  			break;
93  		case RSC.PLAYER_CHARACTER:
94  			tmp = spieler.getCharakterString();
95  			break;
96  		case RSC.PLAYER_GENTLESS:
97  			tmp = spieler.getAnsehenString();
98  			break;
99  		case RSC.PLAYER_SPECIAL:
100 			tmp = spieler.getSpezialitaetString();
101 			break;
102 		case RSC.PLAYER_NOTE:
103 			tmp = spieler.getNotiz();
104 			break;
105 		case RSC.PLAYER_NATIONALITY:
106 			tmp = ""+spieler.getNationalitaet();
107 			break;
108 
109 		}
110 		return tmp;
111 	}
112 }