summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshawn.f.cook2011-10-18 14:51:06 (EDT)
committer Roberto E. Escobar2011-10-18 14:51:06 (EDT)
commit1f475084a14ccd6df3f765aa4c4f020216fb318b (patch)
tree3021617f77afcd24fbabaaf5e756bd6b1ae47843
parent373843176d8660ee43be96f8fdcda6c1ca54108b (diff)
downloadorg.eclipse.osee-1f475084a14ccd6df3f765aa4c4f020216fb318b.zip
org.eclipse.osee-1f475084a14ccd6df3f765aa4c4f020216fb318b.tar.gz
org.eclipse.osee-1f475084a14ccd6df3f765aa4c4f020216fb318b.tar.bz2
feature[ats_E6W8N]: Add Panel to Artifact web page
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/search/OseeArtifactView.java39
1 files changed, 30 insertions, 9 deletions
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/search/OseeArtifactView.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/search/OseeArtifactView.java
index 8d77d2c..814e822 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/search/OseeArtifactView.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/search/OseeArtifactView.java
@@ -23,6 +23,7 @@ import com.vaadin.ui.Alignment;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
+import com.vaadin.ui.Panel;
import com.vaadin.ui.VerticalLayout;
/**
@@ -56,21 +57,34 @@ public class OseeArtifactView extends CustomComponent implements Navigator.View,
leftMarginAndBody.addComponent(leftMarginSpace);
if (artifact != null) {
- VerticalLayout bodyVertLayout = new VerticalLayout();
+ VerticalLayout artNameVertLayout = new VerticalLayout();
+ artNameVertLayout.setSizeFull();
breadcrumbComp.setArtifact(artifact);
- bodyVertLayout.addComponent(breadcrumbComp);
+ artNameVertLayout.addComponent(breadcrumbComp);
OseeArtifactNameLinkComponent artifactName = new OseeArtifactNameLinkComponent(artifact);
- bodyVertLayout.addComponent(artifactName);
-
+ artifactName.setSizeUndefined();
+ Label spacer1 = new Label();
+ spacer1.setWidth(10, UNITS_PIXELS);
+ spacer1.setHeight(null);
Label artifactType = new Label(String.format("[%s]", artifact.getArtifactType()), Label.CONTENT_XHTML);
- bodyVertLayout.addComponent(artifactType);
+ artifactType.setSizeUndefined();
+ HorizontalLayout artNameAndTypeLayout = new HorizontalLayout();
+ artNameAndTypeLayout.setSizeUndefined();
+ artNameAndTypeLayout.addComponent(artifactName);
+ artNameAndTypeLayout.addComponent(spacer1);
+ artNameAndTypeLayout.addComponent(artifactType);
+ artNameAndTypeLayout.setComponentAlignment(artifactType, Alignment.BOTTOM_CENTER);
+ artNameVertLayout.addComponent(artNameAndTypeLayout);
VerticalLayout artRelSpacer = new VerticalLayout();
artRelSpacer.setHeight(15, UNITS_PIXELS);
- bodyVertLayout.addComponent(artRelSpacer);
+ artNameVertLayout.addComponent(artRelSpacer);
+ VerticalLayout bodyVertLayout = new VerticalLayout();
+ bodyVertLayout.setMargin(true);
+ bodyVertLayout.setSizeFull();
bodyVertLayout.addComponent(relationsComp);
VerticalLayout relAttrSpacer = new VerticalLayout();
@@ -83,9 +97,16 @@ public class OseeArtifactView extends CustomComponent implements Navigator.View,
bodyVertLayout.addComponent(bottomSpacer);
bodyVertLayout.setExpandRatio(bottomSpacer, 1.0f);
- leftMarginAndBody.addComponent(bodyVertLayout);
- bodyVertLayout.setSizeFull();
- leftMarginAndBody.setExpandRatio(bodyVertLayout, 1.0f);
+ Panel mainLayoutPanel = new Panel();
+ mainLayoutPanel.setScrollable(true);
+ mainLayoutPanel.getContent().setSizeUndefined();
+ mainLayoutPanel.setContent(bodyVertLayout);
+ mainLayoutPanel.setSizeFull();
+
+ artNameVertLayout.addComponent(mainLayoutPanel);
+ artNameVertLayout.setExpandRatio(mainLayoutPanel, 1.0f);
+ leftMarginAndBody.addComponent(artNameVertLayout);
+ leftMarginAndBody.setExpandRatio(artNameVertLayout, 1.0f);
}
final VerticalLayout vertLayout = new VerticalLayout();