Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java3
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/CssConstants.java1
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java113
-rw-r--r--plugins/org.eclipse.osee.vaadin.themes/src/VAADIN/themes/osee/styles.css6
4 files changed, 63 insertions, 60 deletions
diff --git a/plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java b/plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java
index dfa13225587..0bd8e9357d2 100644
--- a/plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java
+++ b/plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java
@@ -251,6 +251,9 @@ public class MockAtsWebSearchPresenter<T extends AtsSearchHeaderComponent, K ext
attrComp.addAttribute("Qualification Method", "Test");
attrComp.addAttribute("Subsystem", "Communications");
attrComp.addAttribute("Technical Performance Parameter", "False");
+ attrComp.addAttribute(
+ "Word Content Template",
+ "Type: Graphic Format (Location): {MAP_overlay_UIG} {FLIGHT_UIG} {WEAPON_UIG} Local Data Definition: [{RF_HANDOVER_TARGET}.DELTA_NORTH_BETWEEN_AIRCRAFT]: (floating point number) meters Mode: North_Dist returned from {FIND_NORTH_EAST_DIST_BETWEEN_TWO_POINTS}( [RFHO_DATA.RFHO_R_LAT_(MSW,LSW)]LM -> Pt1.Lat, [RFHO_DATA.RFHO_R_LONG_(MSW,LSW)]LM -> Pt1.Long, [.AIRCRAFT_LATITUDE] -> Pt2.Lat, [.AIRCRAFT_LONGITUDE] -> Pt2.Long)");
}
}
}
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/CssConstants.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/CssConstants.java
index 3eb9adf1969..5caf2172236 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/CssConstants.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/CssConstants.java
@@ -49,6 +49,7 @@ public final class CssConstants {
public static final String OSEE_RIGHTARROW = "osee-rightarrow";
public static final String OSEE_LEFTARROW = "osee-leftarrow";
+ public static final String OSEE_ATTRIBUTELABEL_LONG = "osee-attributelabel-long";
public static final String OSEE_ATTRIBUTELABEL = "osee-attributelabel";
public static final String OSEE_ATTRIBUTEVALUE = "osee-attributevalue";
public static final String OSEE_ATTRIBUTESTITLELABEL = "osee-attributestitlelabel";
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java
index 1427df0bfc2..a98e40273d6 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java
@@ -11,12 +11,12 @@ he Eclipse Public License v1.0
*******************************************************************************/
package org.eclipse.osee.display.view.web.components;
-import java.util.ArrayList;
-import java.util.Collection;
import org.eclipse.osee.display.api.components.AttributeComponent;
import org.eclipse.osee.display.view.web.CssConstants;
+import com.vaadin.ui.Alignment;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
+import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
/**
@@ -25,82 +25,49 @@ import com.vaadin.ui.VerticalLayout;
@SuppressWarnings("serial")
public class OseeAttributeComponent extends VerticalLayout implements AttributeComponent {
- private final Collection<labelValuePair> attributes = new ArrayList<labelValuePair>();
+ private boolean isLayoutComplete = false;
+ private final VerticalLayout attrLabelsLayout = new VerticalLayout();
+ private final VerticalLayout attrValuesLayout = new VerticalLayout();
+ private final VerticalLayout longAttrValuesLayout = new VerticalLayout();
- private class labelValuePair {
- private final String label;
- private final String value;
-
- public labelValuePair(String label, String value) {
- super();
- this.label = label;
- this.value = value;
- }
-
- @SuppressWarnings("unused")
- public String getLabel() {
- return label;
- }
-
- @SuppressWarnings("unused")
- public String getValue() {
- return value;
+ @Override
+ public void attach() {
+ if (!isLayoutComplete) {
+ createLayout();
+ isLayoutComplete = true;
}
}
private void createLayout() {
- removeAllComponents();
-
- final HorizontalLayout attributesLayout = new HorizontalLayout();
-
- // final OseeShowHideButton showHideButton = new OseeShowHideButton("Attributes");
- // showHideButton.addListener(new OseeShowHideButton.ClickListener() {
- // @Override
- // public void buttonClick(OseeShowHideButton.ClickEvent event) {
- // attributesLayout.setVisible(showHideButton.isStateShow());
- // }
- // });
- // attributesLayout.setVisible(showHideButton.isStateShow());
Label titleLabel = new Label("Attributes");
titleLabel.setStyleName(CssConstants.OSEE_ATTRIBUTESTITLELABEL);
- VerticalLayout attrLabelsLayout = new VerticalLayout();
- VerticalLayout attrValuesLayout = new VerticalLayout();
-
- for (labelValuePair pair : attributes) {
- Label attrLabel = new Label(String.format("%s:", pair.getLabel()));
- Label attrValue = new Label(pair.getValue());
-
- attrLabel.setStyleName(CssConstants.OSEE_ATTRIBUTELABEL);
- attrValue.setStyleName(CssConstants.OSEE_ATTRIBUTEVALUE);
-
- attrLabelsLayout.addComponent(attrLabel);
- attrValuesLayout.addComponent(attrValue);
- }
+ attrLabelsLayout.setWidth(200, UNITS_PIXELS);
+ attrValuesLayout.setWidth(500, UNITS_PIXELS);
Label spacer = new Label("");
spacer.setWidth(15, UNITS_PIXELS);
Label spacer2 = new Label("");
spacer2.setWidth(5, UNITS_PIXELS);
- attributesLayout.addComponent(spacer);
- attributesLayout.addComponent(attrLabelsLayout);
- attributesLayout.addComponent(spacer2);
- attributesLayout.addComponent(attrValuesLayout);
- addComponent(titleLabel);
- // addComponent(showHideButton);
- addComponent(attributesLayout);
- setExpandRatio(attributesLayout, 1.0f);
+ HorizontalLayout hLayout_Lists = new HorizontalLayout();
- attrLabelsLayout.setWidth(200, UNITS_PIXELS);
- attrValuesLayout.setWidth(200, UNITS_PIXELS);
+ hLayout_Lists.addComponent(spacer);
+ hLayout_Lists.addComponent(attrLabelsLayout);
+ hLayout_Lists.addComponent(spacer2);
+ hLayout_Lists.addComponent(attrValuesLayout);
+
+ addComponent(titleLabel);
+ addComponent(hLayout_Lists);
+ addComponent(longAttrValuesLayout);
}
@Override
public void clearAll() {
- attributes.clear();
- createLayout();
+ attrLabelsLayout.removeAllComponents();
+ attrValuesLayout.removeAllComponents();
+ longAttrValuesLayout.removeAllComponents();
}
@Override
@@ -112,9 +79,35 @@ public class OseeAttributeComponent extends VerticalLayout implements AttributeC
@Override
public void addAttribute(String type, String value) {
if (type != null && !type.isEmpty() && value != null && !value.isEmpty()) {
- attributes.add(new labelValuePair(type, value));
+
+ if (!type.equalsIgnoreCase("Word Template Content")) {
+ Label attrLabel = new Label(String.format("%s:", type));
+ attrLabel.setStyleName(CssConstants.OSEE_ATTRIBUTELABEL);
+
+ Label attrValue = new Label(value);
+ attrValue.setStyleName(CssConstants.OSEE_ATTRIBUTEVALUE);
+
+ attrLabelsLayout.addComponent(attrLabel);
+ attrValuesLayout.addComponent(attrValue);
+ } else {
+ Label attrLabel = new Label(String.format("%s:", type));
+ attrLabel.setStyleName(CssConstants.OSEE_ATTRIBUTELABEL_LONG);
+
+ TextField attrValue = new TextField();
+ attrValue.setValue(value);
+ attrValue.setWidth(600, UNITS_PIXELS);
+ attrValue.setHeight(300, UNITS_PIXELS);
+
+ Label vSpacer_bottomAttr = new Label();
+ vSpacer_bottomAttr.setHeight(15, UNITS_PIXELS);
+
+ longAttrValuesLayout.addComponent(attrLabel);
+ longAttrValuesLayout.addComponent(attrValue);
+ longAttrValuesLayout.addComponent(vSpacer_bottomAttr);
+
+ longAttrValuesLayout.setComponentAlignment(attrLabel, Alignment.BOTTOM_LEFT);
+ }
}
- createLayout();
}
}
diff --git a/plugins/org.eclipse.osee.vaadin.themes/src/VAADIN/themes/osee/styles.css b/plugins/org.eclipse.osee.vaadin.themes/src/VAADIN/themes/osee/styles.css
index 2bcb4490641..ebdf0731e0d 100644
--- a/plugins/org.eclipse.osee.vaadin.themes/src/VAADIN/themes/osee/styles.css
+++ b/plugins/org.eclipse.osee.vaadin.themes/src/VAADIN/themes/osee/styles.css
@@ -129,6 +129,12 @@
color: green;
}
+.osee-attributelabel-long {
+ text-align:left;
+ font-size: 12px;
+ color: green;
+}
+
.osee-attributevalue {
font-weight:bold;
text-align:left;

Back to the top