コード例 #1
0
 protected void SetFields() {
   if (_CurrentPersonnel != null) {
     _NameTextField.setText(_CurrentPersonnel.getName());
     _CallsignTextField.setText(_CurrentPersonnel.getCallsign());
     _RankCombo.setSelectedIndex(_CurrentPersonnel.getRank().ordinal());
     _RatingCombo.setSelectedIndex(_CurrentPersonnel.getRating().ordinal());
     _JobTypeCombo.setSelectedIndex(_CurrentPersonnel.getJobType().ordinal());
     _AssetAssignmentTextField.setText(
         _Unit.getAssetDetailForAssetAssignedToPersonnel(_CurrentPersonnel.getName()));
     _NotesTextArea.setText(_CurrentPersonnel.getNotes());
   } else {
     _NameTextField.setText("");
     _CallsignTextField.setText("");
     _RankCombo.setSelectedIndex(-1);
     _HomePlanetCombo.setSelectedIndex(-1);
     _RatingCombo.setSelectedIndex(-1);
     _JobTypeCombo.setSelectedIndex(-1);
     _AssetAssignmentTextField.setText("");
     _NotesTextArea.setText("");
   }
 }