summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshawn.f.cook2011-10-24 11:23:54 (EDT)
committerRoberto E. Escobar2011-10-24 11:23:54 (EDT)
commita62c2ae8a0ab88ff532b34e08c45ea26b0639160 (patch)
tree58ff5100dddd74691b300f3b66199d1bae4865a0
parent512215fcfe255ae9945115964a6cb293bdd13383 (diff)
downloadorg.eclipse.osee-a62c2ae8a0ab88ff532b34e08c45ea26b0639160.zip
org.eclipse.osee-a62c2ae8a0ab88ff532b34e08c45ea26b0639160.tar.gz
org.eclipse.osee-a62c2ae8a0ab88ff532b34e08c45ea26b0639160.tar.bz2
feature[ats_E6W8N]: Implement Enter key for search field
-rw-r--r--plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java
index 2a3d05e..ddc2ef1 100644
--- a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java
+++ b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java
@@ -34,6 +34,7 @@ import com.vaadin.ui.CheckBox;
import com.vaadin.ui.ComboBox;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
+import com.vaadin.ui.Panel;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
@@ -53,6 +54,7 @@ public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements At
private AtsSearchPresenter searchPresenter;
private AtsNavigator navigator;
private boolean lockProgramCombo = false;
+ Panel searchTextPanel = new Panel();
@Override
public void attach() {
@@ -151,13 +153,20 @@ public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements At
OseeLeftMarginContainer leftMarginContainer = new OseeLeftMarginContainer();
+ HorizontalLayout hLayout_SearchText = new HorizontalLayout();
+ searchTextPanel.setScrollable(false);
+ searchTextPanel.addActionHandler(this);
+ searchTextPanel.setContent(hLayout_SearchText);
+
+ hLayout_SearchText.addComponent(searchTextField);
+
hLayout_ProgBuildName.addComponent(programCombo);
hLayout_ProgBuildName.addComponent(hSpacer_ProgBuild);
hLayout_ProgBuildName.addComponent(buildCombo);
hLayout_ProgBuildName.addComponent(hSpacer_BuildName);
hLayout_ProgBuildName.addComponent(nameOnlyCheckBox);
- hLayout_SearchTextBtn.addComponent(searchTextField);
+ hLayout_SearchTextBtn.addComponent(searchTextPanel);
hLayout_SearchTextBtn.addComponent(hSpacer_SearchTextBtn);
hLayout_SearchTextBtn.addComponent(searchButton);
@@ -174,7 +183,7 @@ public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements At
hLayout_ProgBuildName.setComponentAlignment(buildCombo, Alignment.MIDDLE_CENTER);
hLayout_ProgBuildName.setComponentAlignment(nameOnlyCheckBox, Alignment.BOTTOM_RIGHT);
- hLayout_SearchTextBtn.setComponentAlignment(searchTextField, Alignment.MIDDLE_LEFT);
+ // hLayout_SearchTextBtn.setComponentAlignment(searchTextField, Alignment.MIDDLE_LEFT);
hLayout_SearchTextBtn.setComponentAlignment(searchButton, Alignment.MIDDLE_RIGHT);
}
@@ -261,16 +270,13 @@ public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements At
@Override
public Action[] getActions(Object target, Object sender) {
- if (sender == searchTextField) {
- return actions;
- }
- return null;
+ return actions;
}
@Override
public void handleAction(Action action, Object sender, Object target) {
- if (sender == searchTextField && action == action_enter) {
- selectProgram();
+ if (sender == searchTextPanel && action == action_enter) {
+ selectSearch();
}
}