summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshawn.f.cook2011-10-18 15:59:34 (EDT)
committerRoberto E. Escobar2011-10-18 15:59:34 (EDT)
commit5131bc26434aafb30532bbac5f8e722f16fa4d8a (patch)
treeeef34945038d073f52914b84b824c6bde60cc9f8
parent1f475084a14ccd6df3f765aa4c4f020216fb318b (diff)
downloadorg.eclipse.osee-5131bc26434aafb30532bbac5f8e722f16fa4d8a.zip
org.eclipse.osee-5131bc26434aafb30532bbac5f8e722f16fa4d8a.tar.gz
org.eclipse.osee-5131bc26434aafb30532bbac5f8e722f16fa4d8a.tar.bz2
feature[ats_E6W8N]: Implement min width web relation list boxes
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeRelationsComponent.java22
1 files changed, 8 insertions, 14 deletions
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeRelationsComponent.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeRelationsComponent.java
index 0e3757e..e2bcb68 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeRelationsComponent.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeRelationsComponent.java
@@ -42,6 +42,7 @@ public class OseeRelationsComponent extends VerticalLayout implements RelationCo
private boolean lockRelTypesListener = false;
private boolean lockRelsListener = false;
private WebArtifact artifact = null;
+ private final int LISTBOX_MINWIDTH = 100;
@Override
public void attach() {
@@ -64,17 +65,6 @@ public class OseeRelationsComponent extends VerticalLayout implements RelationCo
final HorizontalLayout listBoxesLayout = new HorizontalLayout();
- // final OseeShowHideButton showHideButton = new OseeShowHideButton("Relations");
- // showHideButton.addListener(new OseeShowHideButton.ClickListener() {
- //
- // @Override
- // public void buttonClick(OseeShowHideButton.ClickEvent event) {
- // listBoxesLayout.setVisible(showHideButton.isStateShow());
- // }
- // });
- // //Initialize listBoxesLayout visibility
- // listBoxesLayout.setVisible(showHideButton.isStateShow());
-
Label titleLabel = new Label("Relationships");
titleLabel.setStyleName(CssConstants.OSEE_ATTRIBUTESTITLELABEL);
@@ -129,13 +119,12 @@ public class OseeRelationsComponent extends VerticalLayout implements RelationCo
listBoxesLayout.addComponent(relationsListSelect);
addComponent(titleLabel);
- // addComponent(showHideButton);
addComponent(listBoxesLayout);
setExpandRatio(listBoxesLayout, 1.0f);
//Fixed width lists make for a prettier layout
- // relationTypesListSelect.setWidth(200, UNITS_PIXELS);
- // relationsListSelect.setWidth(200, UNITS_PIXELS);
+ relationTypesListSelect.setWidth(LISTBOX_MINWIDTH, UNITS_PIXELS);
+ relationsListSelect.setWidth(LISTBOX_MINWIDTH, UNITS_PIXELS);
}
public OseeRelationsComponent() {
@@ -147,11 +136,13 @@ public class OseeRelationsComponent extends VerticalLayout implements RelationCo
if (relationTypesListSelect != null) {
lockRelTypesListener = true;
relationTypesListSelect.removeAllItems();
+ relationTypesListSelect.setWidth(LISTBOX_MINWIDTH, UNITS_PIXELS);
lockRelTypesListener = false;
}
if (relationsListSelect != null) {
lockRelsListener = true;
relationsListSelect.removeAllItems();
+ relationsListSelect.setWidth(LISTBOX_MINWIDTH, UNITS_PIXELS);
lockRelsListener = false;
}
}
@@ -161,6 +152,7 @@ public class OseeRelationsComponent extends VerticalLayout implements RelationCo
if (relationTypesListSelect != null) {
lockRelTypesListener = true;
relationTypesListSelect.addItem(id);
+ relationTypesListSelect.setWidth(null);
lockRelTypesListener = false;
}
}
@@ -170,6 +162,7 @@ public class OseeRelationsComponent extends VerticalLayout implements RelationCo
if (relationsListSelect != null) {
lockRelsListener = true;
relationsListSelect.removeAllItems();
+ relationsListSelect.setWidth(LISTBOX_MINWIDTH, UNITS_PIXELS);
lockRelsListener = false;
}
}
@@ -178,6 +171,7 @@ public class OseeRelationsComponent extends VerticalLayout implements RelationCo
if (relationsListSelect != null) {
lockRelsListener = true;
relationsListSelect.addItem(id);
+ relationsListSelect.setWidth(null);
lockRelsListener = false;
}
}