Permalink
Browse files

Added 'project to account' combo in sbatch wizard page

  • Loading branch information...
Samuel Lampa
Samuel Lampa committed Aug 2, 2011
1 parent b124d5d commit c0c6e33272b33151c6e6758ab6cf5f0099b35ed3
@@ -69,13 +69,16 @@ void onEnterPage() {
String username = (String) userInfo.get("username");
List<String> projects = (List<String>) userInfo.get("projects");
+ createLabel("Project to account");
+ createComboBox(projects, 2);
+
// TODO: Remove Debug code
System.out.println("Username: " + username + ", Projects: " + projects.toString());
this.composite.pack();
}
- private void createComboBox(String label, List<String> optionValues, int horizontalSpan) {
+ private void createComboBox(List<String> optionValues, int horizontalSpan) {
Combo currentCombo = HPCUtils.createCombo(composite);
// Layout stuff
@@ -98,6 +101,16 @@ private void createComboBox(String label, List<String> optionValues, int horizon
// currentCombo.setText(selectedOptionValue);
// }
}
+
+ private void createLabel(String labelText) {
+ StyledText fieldLabel = new StyledText(this.composite, SWT.RIGHT | SWT.WRAP | SWT.READ_ONLY );
+ labelText = HPCUtils.ensureEndsWithColon(labelText);
+ fieldLabel.setBackground (composite.getBackground());
+ fieldLabel.setText(labelText);
+ GridData labelGridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
+ labelGridData.widthHint = 160;
+ fieldLabel.setLayoutData(labelGridData);
+ }
// TODO: Check that it works!
@Override

0 comments on commit c0c6e33

Please sign in to comment.