[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Space.java, 1.168, 1.169
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2007-08-23 14:24:51
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21999/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: Space name always display Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.168 retrieving revision 1.169 diff -C2 -d -r1.168 -r1.169 *** Space.java 23 Aug 2007 12:45:23 -0000 1.168 --- Space.java 23 Aug 2007 14:24:45 -0000 1.169 *************** *** 1430,1472 **** } /** ! * Display name used for all occasions where the ! * this space is displayed in the gui. ! * @return display name */ ! public String getDisplayName() { ! String res = ""; switch (level) { case ELEMENT_LEVEL: ! res = "Elm" + res; break; case PART_LEVEL: ! res = "Prt" + res; break; case SPACE_LEVEL: ! res = "Spc" + res; break; case NET_LEVEL: ! res = "Net" + res; break; case PROJECT_LEVEL: ! res = "Proj" + res; break; default: ! res = "Spc(def)" + res; break; } if (isUnion()) { ! return res + " Union"; } ! if (getClassification() != null) { ! return getClassification().toString() + " - " + res + id; } else { ! if (getOwner() == null) { ! return Project.getInstance().getName(); ! } else if (name.equalsIgnoreCase("Void")) { return name; } else { ! return name + " - " + res + id; } } --- 1430,1499 ---- } + /** ! * Returns a string describing the level this space ! * @return string describing level of this space */ ! public String getLevelName() { ! String lvl; switch (level) { case ELEMENT_LEVEL: ! lvl = "Elm"; break; case PART_LEVEL: ! lvl = "Prt"; break; case SPACE_LEVEL: ! lvl = "Spc"; break; case NET_LEVEL: ! lvl = "Net"; break; case PROJECT_LEVEL: ! lvl = "Proj"; break; default: ! lvl = "Unk"; break; } if (isUnion()) { ! return lvl + " Union " + id; ! } else { ! return lvl + id; } ! } ! ! /** ! * Returns string describing the kind of this ! * space ! * @return string describing kind of this space ! */ ! public String getKindName() { ! if (this.isContainer()) { ! String lvl = getLevelName(); ! if (getClassification() != null) { ! return "(" + getClassification().toString() + " - " + lvl + ")"; ! } else { ! return "(" + lvl + ")"; ! } } else { ! return null; ! } ! } ! ! /** ! * Display name used for all occasions where the ! * this space is displayed in the gui. ! * @return display name ! */ ! public String getDisplayName() { ! if (getOwner() == null) { ! return Project.getInstance().getName(); ! } else { ! String lvl = getKindName(); ! if (lvl == null) { return name; } else { ! return name + " " + lvl; } } |