partially updated styles

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@69207 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-02-13 17:26:22 +00:00
parent e5c61bae8c
commit 3317bc390f
26 changed files with 4565 additions and 76 deletions

4356
.gwt/.gwt-log Normal file

File diff suppressed because it is too large Load Diff

View File

@ -37,7 +37,9 @@ import org.gcube.portlets.user.reportgenerator.client.targets.Coords;
import org.gcube.portlets.user.reportgenerator.client.targets.D4sRichTextarea; import org.gcube.portlets.user.reportgenerator.client.targets.D4sRichTextarea;
import org.gcube.portlets.user.reportgenerator.client.targets.DroppingArea; import org.gcube.portlets.user.reportgenerator.client.targets.DroppingArea;
import org.gcube.portlets.user.reportgenerator.client.targets.GenericTable; import org.gcube.portlets.user.reportgenerator.client.targets.GenericTable;
import org.gcube.portlets.user.reportgenerator.client.targets.GroupingDelimiterArea;
import org.gcube.portlets.user.reportgenerator.client.targets.ImageArea; import org.gcube.portlets.user.reportgenerator.client.targets.ImageArea;
import org.gcube.portlets.user.reportgenerator.client.targets.RepeatableSequence;
import org.gcube.portlets.user.reportgenerator.client.targets.ReportTextArea; import org.gcube.portlets.user.reportgenerator.client.targets.ReportTextArea;
import org.gcube.portlets.user.reportgenerator.client.targets.TSArea; import org.gcube.portlets.user.reportgenerator.client.targets.TSArea;
import org.gcube.portlets.user.reportgenerator.shared.SessionInfo; import org.gcube.portlets.user.reportgenerator.shared.SessionInfo;
@ -934,7 +936,9 @@ public class Presenter {
switch (component.getType()) { switch (component.getType()) {
case HEADING_1: case HEADING_1:
case HEADING_2: case HEADING_2:
case HEADING_3: case HEADING_3:
case HEADING_4:
case HEADING_5:
case TITLE: case TITLE:
if (component.isLocked()) { if (component.isLocked()) {
HTML text = (HTML) component.getContent(); HTML text = (HTML) component.getContent();
@ -1009,6 +1013,14 @@ public class Presenter {
HTML instr = (HTML) component.getContent(); HTML instr = (HTML) component.getContent();
wp.addComponentToLayout(instr, component.isDoubleColLayout()); wp.addComponentToLayout(instr, component.isDoubleColLayout());
break; break;
case REPEAT_SEQUENCE_DELIMITER:
GroupingDelimiterArea gpa = (GroupingDelimiterArea) component.getContent();
wp.addComponentToLayout(gpa, component.isDoubleColLayout());
break;
case REPEAT_SEQUENCE:
RepeatableSequence rps = (RepeatableSequence) component.getContent();
wp.addComponentToLayout(rps, component.isDoubleColLayout());
break;
} }
} }
} }

View File

@ -65,11 +65,10 @@ public class WorkspacePanel extends Composite {
presenter = c; presenter = c;
templateModel = presenter.getModel(); templateModel = presenter.getModel();
mainLayout.setSize(""+(templateModel.getPageWidth()), ""+templateModel.getPageHeight());
mainLayout.setSize(""+templateModel.getPageWidth(), ""+templateModel.getPageHeight());
mainLayout.setStyleName("wpFlow");
//mainLayout.setStyleName("wpFlow");
//mainLayout.addStyleName("position-relative");
initWidget(mainLayout); initWidget(mainLayout);

View File

@ -10,6 +10,7 @@ import org.gcube.portlets.d4sreporting.common.shared.Metadata;
import org.gcube.portlets.d4sreporting.common.shared.SerializableAttribute; import org.gcube.portlets.d4sreporting.common.shared.SerializableAttribute;
import org.gcube.portlets.d4sreporting.common.shared.SerializableAttributeArea; import org.gcube.portlets.d4sreporting.common.shared.SerializableAttributeArea;
import org.gcube.portlets.d4sreporting.common.shared.SerializableComponent; import org.gcube.portlets.d4sreporting.common.shared.SerializableComponent;
import org.gcube.portlets.d4sreporting.common.shared.SerializableRepeatableSequence;
import org.gcube.portlets.d4sreporting.common.shared.SerializableTable; import org.gcube.portlets.d4sreporting.common.shared.SerializableTable;
import org.gcube.portlets.d4sreporting.common.shared.SerializableTimeSeries; import org.gcube.portlets.d4sreporting.common.shared.SerializableTimeSeries;
import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter; import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter;
@ -20,7 +21,10 @@ import org.gcube.portlets.user.reportgenerator.client.targets.DropImageListener;
import org.gcube.portlets.user.reportgenerator.client.targets.DropTSListener; import org.gcube.portlets.user.reportgenerator.client.targets.DropTSListener;
import org.gcube.portlets.user.reportgenerator.client.targets.DroppingArea; import org.gcube.portlets.user.reportgenerator.client.targets.DroppingArea;
import org.gcube.portlets.user.reportgenerator.client.targets.GenericTable; import org.gcube.portlets.user.reportgenerator.client.targets.GenericTable;
import org.gcube.portlets.user.reportgenerator.client.targets.GroupingDelimiterArea;
import org.gcube.portlets.user.reportgenerator.client.targets.GroupingInnerArea;
import org.gcube.portlets.user.reportgenerator.client.targets.ImageArea; import org.gcube.portlets.user.reportgenerator.client.targets.ImageArea;
import org.gcube.portlets.user.reportgenerator.client.targets.RepeatableSequence;
import org.gcube.portlets.user.reportgenerator.client.targets.ReportTextArea; import org.gcube.portlets.user.reportgenerator.client.targets.ReportTextArea;
import org.gcube.portlets.user.reportgenerator.client.targets.TSArea; import org.gcube.portlets.user.reportgenerator.client.targets.TSArea;
@ -195,19 +199,21 @@ public class TemplateComponent {
break; break;
case HEADING_1: case HEADING_1:
case HEADING_2: case HEADING_2:
case HEADING_3: case HEADING_3:
case HEADING_4:
case HEADING_5:
case TITLE: case TITLE:
if (sc.isLocked()) { if (sc.isLocked()) {
HTML area = new HTML(); HTML area = new HTML();
area.setStyleName(getStyle(sc.getType())); area.setStyleName(getStyle(sc.getType()));
area.getElement().getStyle().setMarginLeft(25, Unit.PX); area.getElement().getStyle().setMarginLeft(25, Unit.PX);
area.getElement().getStyle().setMarginTop(15, Unit.PX); area.getElement().getStyle().setMarginTop(15, Unit.PX);
area.setPixelSize(width, height); area.setPixelSize(width, 25);
area.setText((String) sc.getPossibleContent()); area.setText((String) sc.getPossibleContent());
this.content = area; this.content = area;
} }
else { else {
BasicTextArea bToAdd = new BasicTextArea(sc.getType(), presenter, sc.getX(), sc.getY(), width, height, getUserComments() != null); BasicTextArea bToAdd = new BasicTextArea(sc.getType(), presenter, sc.getX(), sc.getY(), width, 25, getUserComments() != null);
bToAdd.setText((String) sc.getPossibleContent()); bToAdd.setText((String) sc.getPossibleContent());
this.content = bToAdd; this.content = bToAdd;
} }
@ -294,6 +300,22 @@ public class TemplateComponent {
this.content = tsa; this.content = tsa;
break; break;
case REPEAT_SEQUENCE_DELIMITER:
GroupingDelimiterArea gp = new GroupingDelimiterArea();
this.content = gp;
break;
case REPEAT_SEQUENCE_INNER:
GroupingInnerArea spacer = new GroupingInnerArea();
this.content = spacer;
break;
case REPEAT_SEQUENCE:
GWT.log("FOUND SEQUENCE trying getGroup");
SerializableRepeatableSequence serializableRepeatableSequence = (SerializableRepeatableSequence) sc.getPossibleContent();
GWT.log("getGroup: " + serializableRepeatableSequence.toString());
RepeatableSequence rps = new RepeatableSequence(presenter, serializableRepeatableSequence);
this.content = rps;
} }
} }
/** /**
@ -311,6 +333,10 @@ public class TemplateComponent {
return "headgin2Area"; return "headgin2Area";
case HEADING_3: case HEADING_3:
return "headgin3Area"; return "headgin3Area";
case HEADING_4:
return "headgin4Area";
case HEADING_5:
return "headgin5Area";
default: default:
return ""; return "";
} }

View File

@ -35,7 +35,7 @@ public class AttributeArea extends Composite {
myPanel.addStyleName("attributeArea"); myPanel.addStyleName("attributeArea");
attrName = new HTML(getAttributeName(textToDisplay)); attrName = new HTML(getAttributeName(textToDisplay));
attrName.getElement().getStyle().setMarginLeft(10, Unit.PX); attrName.getElement().getStyle().setMarginLeft(25, Unit.PX);
attrName.getElement().getStyle().setMarginRight(5, Unit.PX); attrName.getElement().getStyle().setMarginRight(5, Unit.PX);
HorizontalPanel boxesPanel = new HorizontalPanel(); HorizontalPanel boxesPanel = new HorizontalPanel();
boxesPanel.add(attrName); boxesPanel.add(attrName);

View File

@ -41,23 +41,32 @@ public class BasicTextArea extends ReportTextArea {
presenter.storeChangeInSession((Widget) event.getSource()); presenter.storeChangeInSession((Widget) event.getSource());
} }
}); });
textArea.setStyleName("report-ui-component");
switch (type) { switch (type) {
case TITLE: case TITLE:
textArea.setStyleName("titleArea"); textArea.addStyleName("title");
myPanel.setTitle("Title"); myPanel.setTitle("Title");
break; break;
case HEADING_1: case HEADING_1:
textArea.setStyleName("headgin1Area"); textArea.addStyleName("heading1");
myPanel.setTitle("Heading: Level 1"); myPanel.setTitle("Heading: Level 1");
break; break;
case HEADING_2: case HEADING_2:
textArea.setStyleName("headgin2Area"); textArea.addStyleName("heading2");
myPanel.setTitle("Heading Level 2"); myPanel.setTitle("Heading Level 2");
break; break;
case HEADING_3: case HEADING_3:
textArea.setStyleName("headgin3Area"); textArea.addStyleName("heading3");
myPanel.setTitle("Heading: Level 3"); myPanel.setTitle("Heading: Level 3");
break; break;
case HEADING_4:
textArea.addStyleName("heading4");
myPanel.setTitle("Heading: Level 4");
break;
case HEADING_5:
textArea.addStyleName("heading5");
myPanel.setTitle("Heading: Level 5");
break;
default: default:
break; break;
} }

View File

@ -0,0 +1,15 @@
package org.gcube.portlets.user.reportgenerator.client.targets;
import com.google.gwt.user.client.ui.HTML;
public class GroupingDelimiterArea extends HTML {
public GroupingDelimiterArea() {
super();
setWidth("700px");
setHeight("15px");
setStyleName("grouping-border");
}
}

View File

@ -0,0 +1,13 @@
package org.gcube.portlets.user.reportgenerator.client.targets;
import com.google.gwt.user.client.ui.HTML;
public class GroupingInnerArea extends HTML {
public GroupingInnerArea() {
super();
setWidth("700px");
setHeight("5px");
setStyleName("grouping-inner");
}
}

View File

@ -0,0 +1,70 @@
package org.gcube.portlets.user.reportgenerator.client.targets;
import java.util.ArrayList;
import org.gcube.portlets.d4sreporting.common.client.uicomponents.ReportUIComponent;
import org.gcube.portlets.d4sreporting.common.shared.ComponentType;
import org.gcube.portlets.d4sreporting.common.shared.SerializableComponent;
import org.gcube.portlets.d4sreporting.common.shared.SerializableRepeatableSequence;
import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter;
import org.gcube.portlets.user.reportgenerator.client.model.TemplateComponent;
import org.gcube.portlets.user.reportgenerator.client.model.TemplateModel;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.VerticalPanel;
public class RepeatableSequence extends ReportUIComponent {
private ArrayList<TemplateComponent> groupedComponents = new ArrayList<TemplateComponent>();
VerticalPanel myPanel;
Presenter p;
/**
* constructor used by the system when reading the model
* @param sRS
*/
public RepeatableSequence(Presenter p, SerializableRepeatableSequence sRS) {
super(ComponentType.REPEAT_SEQUENCE, 0, 0, TemplateModel.TEMPLATE_WIDTH - 50, sRS.getHeight());
this.p = p;
myPanel = getResizablePanel();
int size = sRS.getGroupedComponents().size();
for (int j = 0; j < size; j++) {
SerializableComponent sComp = sRS.getGroupedComponents().get(j);
add(new TemplateComponent(p.getModel(), sComp, p));
}
}
public void add(TemplateComponent toAdd) {
groupedComponents.add(toAdd);
GWT.log("toAdd.getContent()= NULL? " + (toAdd.getContent() == null));
GWT.log("ToAdd= getType " + toAdd.getType());
myPanel.add(toAdd.getContent());
}
public ArrayList<TemplateComponent> getGroupedComponents() {
return groupedComponents;
}
public void setGroupedComponents(ArrayList<TemplateComponent> groupedComponents) {
this.groupedComponents = groupedComponents;
}
public int getHeight() {
return super.mainPanel.getOffsetHeight();
}
@Override
public void removeTemplateComponent(ReportUIComponent toRemove) {
// TODO Auto-generated method stub
}
@Override
public void lockComponent(ReportUIComponent toLock, boolean locked) {
// TODO Auto-generated method stub
}
}

View File

@ -1,3 +1,16 @@
.grouping-inner {
background: url('images/grouping-border.png') repeat-x;
display: block;
height: 4px;
width: 600px;
}
.grouping-border {
background: url('images/grouping-border.png') repeat-x;
display: block;
height: 8px;
width: 600px;
}
.tableBorder { .tableBorder {
border: 1px solid #CCC; border: 1px solid #CCC;
@ -26,7 +39,7 @@
.comment-popup-textarea { .comment-popup-textarea {
background-color: #FFF8CC; background-color: #FFF8CC;
border:none; border: none;
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 11px; font-size: 11px;
} }
@ -51,15 +64,12 @@ tableBorder td {
} }
.wpFlow { .wpFlow {
border: 0px solid gray; border: none;
margin-left: 20px;
} }
.highlight_background { .highlight_background {
background-color: #FFFE00; background-color: #FFFE00;
/* filter:alpha(opacity=80);
-moz-opacity:0.8;
-khtml-opacity: 0.8;
opacity: 0.8;*/
} }
.none { .none {
@ -73,12 +83,6 @@ tableBorder td {
border: none; border: none;
} }
.d4sFrame {
border: 1px dashed #CCC;
background-color: white;
margin-top: 15px;
margin-left: 15px;
}
.fixedTextArea { .fixedTextArea {
font-family: Times; font-family: Times;
@ -89,8 +93,6 @@ tableBorder td {
border: 1px dashed #CCC; border: 1px dashed #CCC;
background-image: url(images/droppingImage_bg.gif); background-image: url(images/droppingImage_bg.gif);
background-repeat: repeat; background-repeat: repeat;
margin-top: 25px;
margin-left: 15px;
} }
.label { .label {
@ -165,8 +167,6 @@ tableBorder td {
.timeseriesArea { .timeseriesArea {
border: 1px dashed #CCC; border: 1px dashed #CCC;
background-repeat: repeat; background-repeat: repeat;
margin-top: 25px;
margin-left: 15px;
} }
.d4sRichTextArea { .d4sRichTextArea {
@ -179,8 +179,6 @@ tableBorder td {
.commentArea { .commentArea {
background-image: url(images/comment_area.gif); background-image: url(images/comment_area.gif);
background-repeat: no-repeat; background-repeat: no-repeat;
margin-top: 15px;
margin-left: 20px;
padding-left: 15px; padding-left: 15px;
border: 0px solid gray; border: 0px solid gray;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
@ -190,11 +188,9 @@ tableBorder td {
} }
.attributeArea { .attributeArea {
background-image: url(images/attribute_area.gif); background-image: url(images/attribute_area.png);
background-repeat: no-repeat; background-repeat: no-repeat;
margin-top: 15px; padding-left: 20px;
margin-left: 20px;
padding-left: 15px;
border: 1px dashed #CCC; border: 1px dashed #CCC;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px; font-size: 12px;
@ -209,17 +205,18 @@ tableBorder td {
} }
.instructionArea { .instructionArea {
background-image: url(images/instruction_area.gif); margin-top: 5px;
background-image: url(images/instruction_area.png);
background-repeat: no-repeat; background-repeat: no-repeat;
margin-top: 15px;
margin-left: 20px;
padding-left: 15px;
border: 0px solid gray; border: 0px solid gray;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px; font-size: 12px;
font-family: "Courier New", Courier, monospace; font-family: "Courier New", Courier, monospace;
font-size: 11px; font-size: 11px;
color: #666; color: #666;
height: 20px;
padding-left: 20px;
padding-top: 8px;
} }
.gridAttribute { .gridAttribute {
@ -233,56 +230,50 @@ tableBorder td {
background-repeat: repeat-x; background-repeat: repeat-x;
} }
.titleArea { .d4sFrame {
background-image: url(images/title_area.png); border: 1px dashed #CCC;
background-color: white;
margin-top: 5px;
}
.report-ui-component {
background-repeat: no-repeat; background-repeat: no-repeat;
padding-top: 5px; color: maroon;
padding-left: 20px; font-family: Verdana;
margin-left: 0px;
border: none; border: none;
font-family: Times; padding-top: 2px;
padding-left: 20px;
}
.title {
background-image: url(images/title.png);
font-size: 16pt; font-size: 16pt;
font-family: Verdana;
color: maroon;
} }
.headgin1Area { .heading1 {
background-image: url(images/heading_1.png); background-image: url(images/heading_1.png);
background-repeat: no-repeat;
padding-top: 5px;
padding-left: 20px;
margin-left: 0px;
border: none;
font-family: Times;
font-size: 12pt; font-size: 12pt;
font-family: Verdana;
color: maroon;
} }
.headgin2Area { .heading2 {
background-image: url(images/heading_2.png); background-image: url(images/heading_2.png);
background-repeat: no-repeat;
padding-top: 5px;
padding-left: 20px;
margin-left: 0px;
border: none;
font-family: Times;
font-size: 11pt; font-size: 11pt;
font-family: Verdana;
color: maroon;
} }
.headgin3Area { .heading3 {
background-image: url(images/heading_3.png); background-image: url(images/heading_3.png);
background-repeat: no-repeat;
padding-top: 5px;
padding-left: 20px;
margin-left: 0px;
border: none;
font-family: Times;
font-size: 10pt; font-size: 10pt;
font-family: Verdana; }
color: maroon;
.heading4 {
background-image: url(images/heading_4.png);
font-size: 9pt;
}
.heading5Area {
background-image: url(images/heading_5.png);
font-size: 8pt;
} }
.bodyArea { .bodyArea {
@ -319,8 +310,6 @@ tableBorder td {
.d4sFrame-highlight { .d4sFrame-highlight {
background-color: #e4f2f6; background-color: #e4f2f6;
filter: alpha(opacity = 50);
-moz-opacity: .50;
opacity: .50; opacity: .50;
cursor: pointer; cursor: pointer;
cursor: hand; cursor: hand;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/main/webapp/images/text.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB