Commit 64932deb authored by dkasliwal's avatar dkasliwal

change component title structure. date panel is display in vertical panel...

change component title structure.  date panel is display in vertical panel with component title label. and in right side display total summary value in component title panel.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104777 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f53509da
package ibase.client; package ibase.client;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
...@@ -30,6 +31,7 @@ import com.google.gwt.user.client.ui.Composite; ...@@ -30,6 +31,7 @@ import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlexTable; import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HTMLPanel; import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.HasHorizontalAlignment; import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.Label;
...@@ -315,6 +317,18 @@ public class GraphComponent extends Composite ...@@ -315,6 +317,18 @@ public class GraphComponent extends Composite
{ {
graphComponantDescr = ""+graphDtlList.get(25); graphComponantDescr = ""+graphDtlList.get(25);
} }
String componentSubTitle = "";
boolean isCompSubTitle = false;
CommonUtils.printOnConsole("graphDtlList.get(26) :"+graphDtlList.get(26));
CommonUtils.printOnConsole("graphDtlList.get(26).toString().length() :"+graphDtlList.get(26).toString().length());
componentSubTitle = ""+graphDtlList.get(26);
ArrayList<String> componentSubTitleList = new ArrayList<String>();
componentSubTitleList = (ArrayList<String>)graphDtlList.get(26);
if(!componentSubTitleList.isEmpty())
{
isCompSubTitle = true;
}
CommonUtils.printOnConsole("isCompSubTitle :"+isCompSubTitle);
// ended code to add html tag to ssgrid by swati on 08-sep-2015 // ended code to add html tag to ssgrid by swati on 08-sep-2015
if(groupNameList.size()>0) if(groupNameList.size()>0)
{ {
...@@ -353,12 +367,12 @@ public class GraphComponent extends Composite ...@@ -353,12 +367,12 @@ public class GraphComponent extends Composite
Image componantTtlImg = new Image("FusionChart/images/"+componentIconName); Image componantTtlImg = new Image("FusionChart/images/"+componentIconName);
Image refreshImg = new Image("FusionChart/images/refresh.png"); Image refreshImg = new Image("FusionChart/images/refresh.png");
refreshImg.setStyleName("refreshIcon");
SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss"); SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
Date date = new Date(); Date date = new Date();
String strDate = dispDateTimeFormat.format(date); String strDate = dispDateTimeFormat.format(date);
String dateformat = getTimeSince(strDate); String dateformat = getTimeSince(strDate);
Label refreshDateTime = new Label(dateformat); Label refreshDateTime = new Label("Refreshed "+dateformat);
HorizontalPanel componantTtlPanel = new HorizontalPanel(); HorizontalPanel componantTtlPanel = new HorizontalPanel();
HorizontalPanel dateHPanel = new HorizontalPanel(); HorizontalPanel dateHPanel = new HorizontalPanel();
...@@ -378,19 +392,31 @@ public class GraphComponent extends Composite ...@@ -378,19 +392,31 @@ public class GraphComponent extends Composite
componantTtlImg.setStyleName("componantTtlImg"); componantTtlImg.setStyleName("componantTtlImg");
componantTtl.setStyleName("componantTtl"); componantTtl.setStyleName("componantTtl");
componantTtlPanel.add(componantTtlImg); /*componantTtlPanel.add(componantTtlImg);
componantTtlPanel.add(componantTtl); componantTtlPanel.add(componantTtl);*/
refreshDateTime.setStyleName("refreshDateTime"); refreshDateTime.setStyleName("refreshDateTime");
dateHPanel.setStyleName("refreshDatePanel"); dateHPanel.setStyleName("refreshDatePanel");
dateHPanel.add(refreshImg);
dateHPanel.add(refreshDateTime); dateHPanel.add(refreshDateTime);
dateHPanel.add(refreshImg);
HorizontalPanel mainPanel = new HorizontalPanel(); HorizontalPanel mainPanel = new HorizontalPanel();
mainPanel.add(componantTtlPanel); /*mainPanel.add(componantTtlPanel);
mainPanel.add(dateHPanel); mainPanel.add(dateHPanel);*/
mainPanel.setStyleName("mainPanel"); mainPanel.setStyleName("mainPanel");
mainPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT); //mainPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT);
/*add code for change in component title display*/
VerticalPanel verticalPanel = new VerticalPanel();
verticalPanel.add(componantTtl);
verticalPanel.add(dateHPanel);
componantTtlPanel.add(verticalPanel);
HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.add(componantTtlImg);
horizontalPanel.setCellVerticalAlignment(componantTtlImg, HasVerticalAlignment.ALIGN_MIDDLE);
horizontalPanel.add(componantTtlPanel);
mainPanel.add(horizontalPanel);
/*end code for change in component title display*/
if(!childID.equalsIgnoreCase("")) if(!childID.equalsIgnoreCase(""))
{ {
...@@ -409,7 +435,7 @@ public class GraphComponent extends Composite ...@@ -409,7 +435,7 @@ public class GraphComponent extends Composite
dataJSON = (JSONObject) dataJsn.get(key); dataJSON = (JSONObject) dataJsn.get(key);
//CommonUtils.printOnConsole("dataJsn for Stack key dataJSON :"+dataJSON); //CommonUtils.printOnConsole("dataJsn for Stack key dataJSON :"+dataJSON);
cnt++; cnt++;
this.createInnerDiv(uniqueId+cnt,groupNameList.get(0)+uniqueId); this.createInnerDiv(uniqueId+cnt,groupNameList.get(0)+uniqueId,false);
RootPanel.get("chart"+uniqueId+cnt).setStyleName(groupCssTypeNameList.get(0)); RootPanel.get("chart"+uniqueId+cnt).setStyleName(groupCssTypeNameList.get(0));
graphJson = ChartCreator.buildChartData(graphDtlList, dataJsn, key,parameterList,filterList,"",null); graphJson = ChartCreator.buildChartData(graphDtlList, dataJsn, key,parameterList,filterList,"",null);
...@@ -494,7 +520,7 @@ public class GraphComponent extends Composite ...@@ -494,7 +520,7 @@ public class GraphComponent extends Composite
Image componantTtlImg = new Image("FusionChart/images/"+componentIconName); Image componantTtlImg = new Image("FusionChart/images/"+componentIconName);
Image refreshImg = new Image("FusionChart/images/refresh.png"); Image refreshImg = new Image("FusionChart/images/refresh.png");
refreshImg.setStyleName("refreshIcon");
SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss"); SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
Date date = new Date(); Date date = new Date();
String strDate = dispDateTimeFormat.format(date); String strDate = dispDateTimeFormat.format(date);
...@@ -519,19 +545,30 @@ public class GraphComponent extends Composite ...@@ -519,19 +545,30 @@ public class GraphComponent extends Composite
componantTtlImg.setStyleName("componantTtlImg"); componantTtlImg.setStyleName("componantTtlImg");
componantTtl.setStyleName("componantTtl"); componantTtl.setStyleName("componantTtl");
componantTtlPanel.add(componantTtlImg); /*componantTtlPanel.add(componantTtlImg);
componantTtlPanel.add(componantTtl); componantTtlPanel.add(componantTtl);*/
refreshDateTime.setStyleName("refreshDateTime"); refreshDateTime.setStyleName("refreshDateTime");
dateHPanel.setStyleName("refreshDatePanel"); dateHPanel.setStyleName("refreshDatePanel");
dateHPanel.add(refreshImg);
dateHPanel.add(refreshDateTime); dateHPanel.add(refreshDateTime);
dateHPanel.add(refreshImg);
HorizontalPanel mainPanel = new HorizontalPanel(); HorizontalPanel mainPanel = new HorizontalPanel();
mainPanel.add(componantTtlPanel); /*mainPanel.add(componantTtlPanel);
mainPanel.add(dateHPanel); mainPanel.add(dateHPanel);*/
mainPanel.setStyleName("mainPanel"); mainPanel.setStyleName("mainPanel");
mainPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT); //mainPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT);
VerticalPanel verticalPanel = new VerticalPanel();
verticalPanel.add(componantTtl);
verticalPanel.add(dateHPanel);
componantTtlPanel.add(verticalPanel);
HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.add(componantTtlImg);
horizontalPanel.setCellVerticalAlignment(componantTtlImg, HasVerticalAlignment.ALIGN_MIDDLE);
horizontalPanel.add(componantTtlPanel);
mainPanel.add(horizontalPanel);
/*Add Code for Drill-down metadataxml by Dhanendra on date 16-09-2016*/ /*Add Code for Drill-down metadataxml by Dhanendra on date 16-09-2016*/
if(!childID.equalsIgnoreCase("")) if(!childID.equalsIgnoreCase(""))
...@@ -557,7 +594,7 @@ public class GraphComponent extends Composite ...@@ -557,7 +594,7 @@ public class GraphComponent extends Composite
/* ended code to add html tag to ssgrid by swati on 08-sep-2015 */ /* ended code to add html tag to ssgrid by swati on 08-sep-2015 */
/*Add uniqueId to Graph by Dhanendra on date 10-11-2015*/ /*Add uniqueId to Graph by Dhanendra on date 10-11-2015*/
this.createInnerDiv(uniqueId+componentId,"Graph"+uniqueId+componentId); this.createInnerDiv(uniqueId+componentId,"Graph"+uniqueId+componentId,false);
/*Ended code for Dyanamic Div and New CSS By Dhanendra 01-07-15*/ /*Ended code for Dyanamic Div and New CSS By Dhanendra 01-07-15*/
this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" + uniqueId+componentId, width, height, imageName,userMail,reportCaption); this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" + uniqueId+componentId, width, height, imageName,userMail,reportCaption);
/*End uniqueId to Graph by Dhanendra on date 10-11-2015*/ /*End uniqueId to Graph by Dhanendra on date 10-11-2015*/
...@@ -615,7 +652,7 @@ public class GraphComponent extends Composite ...@@ -615,7 +652,7 @@ public class GraphComponent extends Composite
this.createOuterDiv("Graph"+uniqueId+componentId,type,groupCssTypeNameList.get(0),"chartContainer"); this.createOuterDiv("Graph"+uniqueId+componentId,type,groupCssTypeNameList.get(0),"chartContainer");
idList.add("Graph"+uniqueId+componentId+"Div"); idList.add("Graph"+uniqueId+componentId+"Div");
/*Add append uniqueId in createInnerDiv method by Dhanendra on Date 14-03-2016*/ /*Add append uniqueId in createInnerDiv method by Dhanendra on Date 14-03-2016*/
this.createInnerDiv(uniqueId+componentId,"Graph"+uniqueId+componentId); this.createInnerDiv(uniqueId+componentId,"Graph"+uniqueId+componentId,false);
graphJson = ChartCreator.buildChartData(graphDtlList, jsonObjFrGraph, dtSrouce,parameterList,filterList,"",null); graphJson = ChartCreator.buildChartData(graphDtlList, jsonObjFrGraph, dtSrouce,parameterList,filterList,"",null);
this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" +uniqueId+ componentId, width, height, imageName,userMail,reportCaption); this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" +uniqueId+ componentId, width, height, imageName,userMail,reportCaption);
/*End uniqueId to Graph,chartContainer by Dhanendra on Date 10-11-2015*/ /*End uniqueId to Graph,chartContainer by Dhanendra on Date 10-11-2015*/
...@@ -629,6 +666,8 @@ public class GraphComponent extends Composite ...@@ -629,6 +666,8 @@ public class GraphComponent extends Composite
String currentID = "Graph"+uniqueId+componentId+"Div"; String currentID = "Graph"+uniqueId+componentId+"Div";
CommonUtils.printOnConsole("dataJsn for jsonObjFrGraph :"+jsonObjFrGraph); CommonUtils.printOnConsole("dataJsn for jsonObjFrGraph :"+jsonObjFrGraph);
graphJson = ChartCreator.buildChartData(graphDtlList, jsonObjFrGraph, dtSrouce,parameterList,filterList,currentID,null); graphJson = ChartCreator.buildChartData(graphDtlList, jsonObjFrGraph, dtSrouce,parameterList,filterList,currentID,null);
double summaryValue = ChartCreator.getSubTitleSummary(graphDtlList, jsonObjFrGraph, dtSrouce);
CommonUtils.printOnConsole("summaryValue :"+summaryValue);
CommonUtils.printOnConsole("dataJsn for graphJson :"+graphJson); CommonUtils.printOnConsole("dataJsn for graphJson :"+graphJson);
/*Add Code for Drill-down metadataxml by Dhanendra on date 16-09-2016*/ /*Add Code for Drill-down metadataxml by Dhanendra on date 16-09-2016*/
pageOpenContainer.putIdListInMap(currentID, childID); pageOpenContainer.putIdListInMap(currentID, childID);
...@@ -684,12 +723,12 @@ public class GraphComponent extends Composite ...@@ -684,12 +723,12 @@ public class GraphComponent extends Composite
final Image componantTtlImg = new Image("FusionChart/images/"+componentIconName); final Image componantTtlImg = new Image("FusionChart/images/"+componentIconName);
Image refreshImg = new Image("FusionChart/images/refresh.png"); Image refreshImg = new Image("FusionChart/images/refresh.png");
refreshImg.setStyleName("refreshIcon");
SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss"); SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
Date date = new Date(); Date date = new Date();
String strDate = dispDateTimeFormat.format(date); String strDate = dispDateTimeFormat.format(date);
String dateformat = getTimeSince(strDate); String dateformat = getTimeSince(strDate);
Label refreshDateTime = new Label(dateformat); Label refreshDateTime = new Label("Refreshed "+dateformat);
HorizontalPanel componantTtlPanel = new HorizontalPanel(); HorizontalPanel componantTtlPanel = new HorizontalPanel();
HorizontalPanel dateHPanel = new HorizontalPanel(); HorizontalPanel dateHPanel = new HorizontalPanel();
...@@ -714,14 +753,38 @@ public class GraphComponent extends Composite ...@@ -714,14 +753,38 @@ public class GraphComponent extends Composite
refreshDateTime.setStyleName("refreshDateTime"); refreshDateTime.setStyleName("refreshDateTime");
dateHPanel.setStyleName("refreshDatePanel"); dateHPanel.setStyleName("refreshDatePanel");
dateHPanel.add(refreshImg);
dateHPanel.add(refreshDateTime); dateHPanel.add(refreshDateTime);
dateHPanel.add(refreshImg);
HorizontalPanel mainPanel = new HorizontalPanel(); HorizontalPanel mainPanel = new HorizontalPanel();
mainPanel.add(componantTtlPanel); /*mainPanel.add(componantTtlPanel);
mainPanel.add(dateHPanel); mainPanel.add(dateHPanel);*/
mainPanel.setStyleName("mainPanel"); mainPanel.setStyleName("mainPanel");
mainPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT); //mainPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT);
VerticalPanel verticalPanel = new VerticalPanel();
verticalPanel.add(componantTtl);
verticalPanel.add(dateHPanel);
componantTtlPanel.add(verticalPanel);
HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.add(componantTtlImg);
horizontalPanel.setCellVerticalAlignment(componantTtlImg, HasVerticalAlignment.ALIGN_MIDDLE);
horizontalPanel.add(componantTtlPanel);
mainPanel.add(horizontalPanel);
if(isCompSubTitle)
{
Label subTitleValLabel = new Label(NumberFormat.getInstance().format(summaryValue));
Label subTitleINRLabel = new Label("INR");
subTitleValLabel.setStyleName("titleValLabel");
subTitleINRLabel.setStyleName("titleValINRLabel");
HorizontalPanel subTitlePanel = new HorizontalPanel();
subTitlePanel.setStyleName("titleValPanel");
subTitlePanel.add(subTitleValLabel);
subTitlePanel.add(subTitleINRLabel);
subTitlePanel.setCellVerticalAlignment(subTitleINRLabel, HasVerticalAlignment.ALIGN_MIDDLE);
mainPanel.add(subTitlePanel);
}
/*Add code for display popup menu on mouse over on component icon image by Dhanendra on date 23-02-2017*/ /*Add code for display popup menu on mouse over on component icon image by Dhanendra on date 23-02-2017*/
if(graphComponantDescr.length()>0) if(graphComponantDescr.length()>0)
...@@ -770,8 +833,14 @@ public class GraphComponent extends Composite ...@@ -770,8 +833,14 @@ public class GraphComponent extends Composite
/* ended code to add html tag to ssgrid by swati on 08-sep-2015 */ /* ended code to add html tag to ssgrid by swati on 08-sep-2015 */
/*Add uniqueId to Graph by Dhanendra on date 10-11-2015*/ /*Add uniqueId to Graph by Dhanendra on date 10-11-2015*/
this.createInnerDiv(uniqueId+componentId,"Graph"+uniqueId+componentId); this.createInnerDiv(uniqueId+componentId,"Graph"+uniqueId+componentId,isCompSubTitle);
/*Ended code for Dyanamic Div and New CSS By Dhanendra 01-07-15*/ /*Ended code for Dyanamic Div and New CSS By Dhanendra 01-07-15*/
/*if(isCompSubTitle)
{
Label subTitleLabel = new Label(componentSubTitle + summaryValue);
subTitleLabel.setStyleName("graphSubTitleLabel");
RootPanel.get("chart"+uniqueId+componentId+"subTitleDiv").add(subTitleLabel);
}*/
this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" + uniqueId+componentId, width, height, imageName,userMail,reportCaption); this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" + uniqueId+componentId, width, height, imageName,userMail,reportCaption);
/*End uniqueId to Graph by Dhanendra on date 10-11-2015*/ /*End uniqueId to Graph by Dhanendra on date 10-11-2015*/
if(!childID.equalsIgnoreCase("")) if(!childID.equalsIgnoreCase(""))
...@@ -844,12 +913,12 @@ public class GraphComponent extends Composite ...@@ -844,12 +913,12 @@ public class GraphComponent extends Composite
//Added code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017 //Added code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017
final Image refreshImg = new Image("FusionChart/images/refresh.png"); final Image refreshImg = new Image("FusionChart/images/refresh.png");
refreshImg.setStyleName("refreshIcon");
SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss"); SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
Date date = new Date(); Date date = new Date();
String strDate = dispDateTimeFormat.format(date); String strDate = dispDateTimeFormat.format(date);
String dateformat = getTimeSince(strDate); String dateformat = getTimeSince(strDate);
final Label refreshDateTime = new Label(dateformat); Label refreshDateTime = new Label("Refreshed "+dateformat);
final HorizontalPanel dateHPanel = new HorizontalPanel(); final HorizontalPanel dateHPanel = new HorizontalPanel();
//End code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017 //End code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017
...@@ -866,23 +935,34 @@ public class GraphComponent extends Composite ...@@ -866,23 +935,34 @@ public class GraphComponent extends Composite
//Added code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017 //Added code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017
refreshDateTime.setStyleName("refreshDateTime"); refreshDateTime.setStyleName("refreshDateTime");
dateHPanel.setStyleName("refreshDatePanel"); dateHPanel.setStyleName("refreshDatePanel");
dateHPanel.add(refreshImg);
dateHPanel.add(refreshDateTime); dateHPanel.add(refreshDateTime);
dateHPanel.add(refreshImg);
//End code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017 //End code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017
gridTitleLbl = new Label(gridComponantTitleName); gridTitleLbl = new Label(gridComponantTitleName);
gridTtlImg.setStyleName("componantTtlImg"); gridTtlImg.setStyleName("componantTtlImg");
gridTitleLbl.setStyleName("componantTtl"); gridTitleLbl.setStyleName("componantTtl");
gridTtlPanel.add(gridTtlImg); /*gridTtlPanel.add(gridTtlImg);
gridTtlPanel.add(gridTitleLbl); gridTtlPanel.add(gridTitleLbl);
gridTtlPanel.setCellWidth( gridTtlImg, "2%" ); gridTtlPanel.setCellWidth( gridTtlImg, "2%" );*/
//Added code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017 //Added code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017
gridTtlPanel.add(dateHPanel); /*gridTtlPanel.add(dateHPanel);
gridTtlPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT); gridTtlPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT);*/
/*gridTtlPanel.setCellWidth( dateHPanel, "15%" );*/ /*gridTtlPanel.setCellWidth( dateHPanel, "15%" );*/
//End code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017 //End code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017
HorizontalPanel mainPanel = new HorizontalPanel();
mainPanel.setStyleName("mainPanel");
VerticalPanel verticalPanel = new VerticalPanel();
verticalPanel.add(gridTitleLbl);
verticalPanel.add(dateHPanel);
gridTtlPanel.add(verticalPanel);
HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.add(gridTtlImg);
horizontalPanel.setCellVerticalAlignment(gridTtlImg, HasVerticalAlignment.ALIGN_MIDDLE);
horizontalPanel.add(gridTtlPanel);
mainPanel.add(horizontalPanel);
/*Add code for display popup menu on mouse over on component icon image by Dhanendra on date 23-02-2017*/ /*Add code for display popup menu on mouse over on component icon image by Dhanendra on date 23-02-2017*/
if(gridComponantDescr.length()>0) if(gridComponantDescr.length()>0)
...@@ -908,9 +988,9 @@ public class GraphComponent extends Composite ...@@ -908,9 +988,9 @@ public class GraphComponent extends Composite
/*Add Code for Drill-down metadataxml by Dhanendra on date 16-09-2016*/ /*Add Code for Drill-down metadataxml by Dhanendra on date 16-09-2016*/
if(!childID.equalsIgnoreCase("")) if(!childID.equalsIgnoreCase(""))
{ {
gridTtlPanel.add(closeButton); mainPanel.add(closeButton);
gridTtlPanel.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT); mainPanel.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT);
gridTtlPanel.setCellWidth( closeButton, "2%" ); mainPanel.setCellWidth( closeButton, "2%" );
} }
/*Add uniqueId to Grid by Dhanendra on date 10-11-2015*/ /*Add uniqueId to Grid by Dhanendra on date 10-11-2015*/
...@@ -925,7 +1005,7 @@ public class GraphComponent extends Composite ...@@ -925,7 +1005,7 @@ public class GraphComponent extends Composite
/*End Code for Drill-down metadataxml by Dhanendra on date 16-09-2016*/ /*End Code for Drill-down metadataxml by Dhanendra on date 16-09-2016*/
idList.add("Grid"+uniqueId+componentId+"Div"); idList.add("Grid"+uniqueId+componentId+"Div");
RootPanel.get("Grid"+uniqueId+componentId+"head").add(gridTtlPanel); RootPanel.get("Grid"+uniqueId+componentId+"head").add(mainPanel);
RootPanel.get("Grid"+uniqueId+componentId+"Div").add(flexTable); RootPanel.get("Grid"+uniqueId+componentId+"Div").add(flexTable);
if(!childID.equalsIgnoreCase("")) if(!childID.equalsIgnoreCase(""))
{ {
...@@ -1024,18 +1104,23 @@ public class GraphComponent extends Composite ...@@ -1024,18 +1104,23 @@ public class GraphComponent extends Composite
//Added code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017 //Added code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017
final Image refreshImg = new Image("FusionChart/images/refresh.png"); final Image refreshImg = new Image("FusionChart/images/refresh.png");
refreshImg.setStyleName("refreshIcon");
SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss"); SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
Date date = new Date(); Date date = new Date();
String strDate = dispDateTimeFormat.format(date); String strDate = dispDateTimeFormat.format(date);
String dateformat = getTimeSince(strDate); String dateformat = getTimeSince(strDate);
final Label refreshDateTime = new Label(dateformat); final Label refreshDateTime = new Label("Refreshed "+dateformat);
final HorizontalPanel dateHPanel = new HorizontalPanel(); final HorizontalPanel dateHPanel = new HorizontalPanel();
//End code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017 //End code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017
HorizontalPanel gridTtlPanel = new HorizontalPanel(); HorizontalPanel gridTtlPanel = new HorizontalPanel();
String cellVal = Window.Location.getParameter("CELL_VAL") == null ? "" : Window.Location.getParameter("CELL_VAL");
if(!childID.equalsIgnoreCase("")) if(!childID.equalsIgnoreCase(""))
{
gridComponantTitleName = gridComponantTitleName+ " : " +parameterList.get(parameterList.size()-2);
}else if(cellVal.trim().length()>0)
{ {
gridComponantTitleName = gridComponantTitleName+ " : " +parameterList.get(parameterList.size()-2); gridComponantTitleName = gridComponantTitleName+ " : " +parameterList.get(parameterList.size()-2);
} }
...@@ -1043,28 +1128,40 @@ public class GraphComponent extends Composite ...@@ -1043,28 +1128,40 @@ public class GraphComponent extends Composite
//Added code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017 //Added code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017
refreshDateTime.setStyleName("refreshDateTime"); refreshDateTime.setStyleName("refreshDateTime");
dateHPanel.setStyleName("refreshDatePanel"); dateHPanel.setStyleName("refreshDatePanel");
dateHPanel.add(refreshImg);
dateHPanel.add(refreshDateTime); dateHPanel.add(refreshDateTime);
dateHPanel.add(refreshImg);
//End code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017 //End code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017
gridTitleLbl = new Label(gridComponantTitleName); gridTitleLbl = new Label(gridComponantTitleName);
gridTtlImg.setStyleName("componantTtlImg"); gridTtlImg.setStyleName("componantTtlImg");
gridTitleLbl.setStyleName("componantTtl"); gridTitleLbl.setStyleName("componantTtl");
gridTtlPanel.add(gridTtlImg); /*gridTtlPanel.add(gridTtlImg);
gridTtlPanel.add(gridTitleLbl); gridTtlPanel.add(gridTitleLbl);
gridTtlPanel.setCellWidth( gridTtlImg, "2%" ); gridTtlPanel.setCellWidth( gridTtlImg, "2%" );*/
//Added code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017 //Added code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017
gridTtlPanel.add(dateHPanel); /*gridTtlPanel.add(dateHPanel);
gridTtlPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT); gridTtlPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT);*/
/*gridTtlPanel.setCellWidth( dateHPanel, "15%" );*/ /*gridTtlPanel.setCellWidth( dateHPanel, "15%" );*/
//End code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017 //End code for displaying refresh icon and date on dashboard by Varsha on 19/01/2017
HorizontalPanel mainPanel = new HorizontalPanel();
mainPanel.setStyleName("mainPanel");
VerticalPanel verticalPanel = new VerticalPanel();
verticalPanel.add(gridTitleLbl);
verticalPanel.add(dateHPanel);
gridTtlPanel.add(verticalPanel);
HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.add(gridTtlImg);
horizontalPanel.setCellVerticalAlignment(gridTtlImg, HasVerticalAlignment.ALIGN_MIDDLE);
horizontalPanel.add(gridTtlPanel);
mainPanel.add(horizontalPanel);
/*Add Code for Drill-down metadataxml by Dhanendra on date 16-09-2016*/ /*Add Code for Drill-down metadataxml by Dhanendra on date 16-09-2016*/
if(!childID.equalsIgnoreCase("")) if(!childID.equalsIgnoreCase(""))
{ {
gridTtlPanel.add(closeButton); mainPanel.add(closeButton);
gridTtlPanel.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT); mainPanel.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT);
gridTtlPanel.setCellWidth( closeButton, "2%" ); mainPanel.setCellWidth( closeButton, "2%" );
} }
/*Add uniqueId to Grid by Dhanendra on date 10-11-2015*/ /*Add uniqueId to Grid by Dhanendra on date 10-11-2015*/
...@@ -1079,7 +1176,7 @@ public class GraphComponent extends Composite ...@@ -1079,7 +1176,7 @@ public class GraphComponent extends Composite
/*Add uniqueId to Grid by Dhanendra on date 10-11-2015*/ /*Add uniqueId to Grid by Dhanendra on date 10-11-2015*/
//this.createOuterDiv("Grid"+uniqueId+componentId,type,gridCssName, "chartContainer"); //this.createOuterDiv("Grid"+uniqueId+componentId,type,gridCssName, "chartContainer");
idList.add("Grid"+uniqueId+componentId+"Div"); idList.add("Grid"+uniqueId+componentId+"Div");
RootPanel.get("Grid"+uniqueId+componentId+"head").add(gridTtlPanel); RootPanel.get("Grid"+uniqueId+componentId+"head").add(mainPanel);
RootPanel.get("Grid"+uniqueId+componentId+"Div").add(flexTable); RootPanel.get("Grid"+uniqueId+componentId+"Div").add(flexTable);
/*End uniqueId to Grid by Dhanendra on date 10-11-2015*/ /*End uniqueId to Grid by Dhanendra on date 10-11-2015*/
...@@ -1147,7 +1244,7 @@ public class GraphComponent extends Composite ...@@ -1147,7 +1244,7 @@ public class GraphComponent extends Composite
mainPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT); mainPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT);
RootPanel.get("Map"+uniqueId+componentId+"head").add(mainPanel); RootPanel.get("Map"+uniqueId+componentId+"head").add(mainPanel);
this.createInnerDiv(uniqueId+componentId,"Map"+uniqueId+componentId); this.createInnerDiv(uniqueId+componentId,"Map"+uniqueId+componentId,false);
this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" + uniqueId+componentId, width, height, imageName,userMail,reportCaption); this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" + uniqueId+componentId, width, height, imageName,userMail,reportCaption);
/*End Added Code by Dhanendra for Dyanmic Div By Dhanendra on 11-03-2016*/ /*End Added Code by Dhanendra for Dyanmic Div By Dhanendra on 11-03-2016*/
...@@ -1215,7 +1312,7 @@ public class GraphComponent extends Composite ...@@ -1215,7 +1312,7 @@ public class GraphComponent extends Composite
mainPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT); mainPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT);
RootPanel.get("Map"+uniqueId+componentId+"head").add(mainPanel); RootPanel.get("Map"+uniqueId+componentId+"head").add(mainPanel);
this.createInnerDiv(uniqueId+componentId,"Map"+uniqueId+componentId); this.createInnerDiv(uniqueId+componentId,"Map"+uniqueId+componentId,false);
this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" + uniqueId+componentId, width, height, imageName,userMail,reportCaption); this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" + uniqueId+componentId, width, height, imageName,userMail,reportCaption);
/*End Added Code by Dhanendra for Dyanmic Div By Dhanendra on 11-03-2016*/ /*End Added Code by Dhanendra for Dyanmic Div By Dhanendra on 11-03-2016*/
...@@ -1255,6 +1352,19 @@ public class GraphComponent extends Composite ...@@ -1255,6 +1352,19 @@ public class GraphComponent extends Composite
Image gridTtlImg = new Image("FusionChart/images/"+gridIconName); Image gridTtlImg = new Image("FusionChart/images/"+gridIconName);
HorizontalPanel gridTtlPanel = new HorizontalPanel(); HorizontalPanel gridTtlPanel = new HorizontalPanel();
final Image refreshImg = new Image("FusionChart/images/refresh.png");
refreshImg.setStyleName("refreshIcon");
SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
Date date = new Date();
String strDate = dispDateTimeFormat.format(date);
String dateformat = getTimeSince(strDate);
Label refreshDateTime = new Label("Refreshed "+dateformat);
final HorizontalPanel dateHPanel = new HorizontalPanel();
refreshDateTime.setStyleName("refreshDateTime");
dateHPanel.setStyleName("refreshDatePanel");
dateHPanel.add(refreshDateTime);
dateHPanel.add(refreshImg);
if(cellVal.trim().length()>0) if(cellVal.trim().length()>0)
...@@ -1275,9 +1385,21 @@ public class GraphComponent extends Composite ...@@ -1275,9 +1385,21 @@ public class GraphComponent extends Composite
gridTitleLbl = new Label(gridComponantTitleName); gridTitleLbl = new Label(gridComponantTitleName);
gridTtlImg.setStyleName("componantTtlImg"); gridTtlImg.setStyleName("componantTtlImg");
gridTitleLbl.setStyleName("componantTtl"); gridTitleLbl.setStyleName("componantTtl");
gridTtlPanel.add(gridTtlImg); /*gridTtlPanel.add(gridTtlImg);
gridTtlPanel.add(gridTitleLbl); gridTtlPanel.add(gridTitleLbl);
gridTtlPanel.setCellWidth( gridTtlImg, "2%" ); gridTtlPanel.setCellWidth( gridTtlImg, "2%" );*/
HorizontalPanel mainPanel = new HorizontalPanel();
mainPanel.setStyleName("mainPanel");
VerticalPanel verticalPanel = new VerticalPanel();
verticalPanel.add(gridTitleLbl);
verticalPanel.add(dateHPanel);
gridTtlPanel.add(verticalPanel);
HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.add(gridTtlImg);
horizontalPanel.setCellVerticalAlignment(gridTtlImg, HasVerticalAlignment.ALIGN_MIDDLE);
horizontalPanel.add(gridTtlPanel);
mainPanel.add(horizontalPanel);
final Label closeButton = new Label("x"); final Label closeButton = new Label("x");
closeButton.setStyleName("closeButtonStyle"); closeButton.setStyleName("closeButtonStyle");
...@@ -1293,9 +1415,9 @@ public class GraphComponent extends Composite ...@@ -1293,9 +1415,9 @@ public class GraphComponent extends Composite
if(!childID.equalsIgnoreCase("")) if(!childID.equalsIgnoreCase(""))
{ {
gridTtlPanel.add(closeButton); mainPanel.add(closeButton);
gridTtlPanel.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT); mainPanel.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT);
gridTtlPanel.setCellWidth( closeButton, "2%" ); mainPanel.setCellWidth( closeButton, "2%" );
} }
/*Add uniqueId to Card by Dhanendra on date 10-11-2015*/ /*Add uniqueId to Card by Dhanendra on date 10-11-2015*/
...@@ -1312,7 +1434,7 @@ public class GraphComponent extends Composite ...@@ -1312,7 +1434,7 @@ public class GraphComponent extends Composite
//this.createOuterDiv("Card"+uniqueId+componentId,type,"outerChartContainerPos1of1ChildDivs",childID); //this.createOuterDiv("Card"+uniqueId+componentId,type,"outerChartContainerPos1of1ChildDivs",childID);
} }
idList.add("Card"+uniqueId+componentId+"Div"); idList.add("Card"+uniqueId+componentId+"Div");
RootPanel.get("Card"+uniqueId+componentId+"head").add(gridTtlPanel); RootPanel.get("Card"+uniqueId+componentId+"head").add(mainPanel);
RootPanel.get("Card"+uniqueId+componentId+"Div").add(panel); RootPanel.get("Card"+uniqueId+componentId+"Div").add(panel);
if(!childID.equalsIgnoreCase("")) if(!childID.equalsIgnoreCase(""))
{ {
...@@ -1532,15 +1654,41 @@ public class GraphComponent extends Composite ...@@ -1532,15 +1654,41 @@ public class GraphComponent extends Composite
gridTitleLbl = new Label(bubbleComponantTitleName); gridTitleLbl = new Label(bubbleComponantTitleName);
gridTtlImg.setStyleName("componantTtlImg"); gridTtlImg.setStyleName("componantTtlImg");
gridTitleLbl.setStyleName("componantTtl"); gridTitleLbl.setStyleName("componantTtl");
gridTtlPanel.add(gridTtlImg); /*gridTtlPanel.add(gridTtlImg);
gridTtlPanel.add(gridTitleLbl); gridTtlPanel.add(gridTitleLbl);
gridTtlPanel.setCellWidth( gridTtlImg, "2%" ); gridTtlPanel.setCellWidth( gridTtlImg, "2%" );*/
final Image refreshImg = new Image("FusionChart/images/refresh.png");
refreshImg.setStyleName("refreshIcon");
SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
Date date = new Date();
String strDate = dispDateTimeFormat.format(date);
String dateformat = getTimeSince(strDate);
Label refreshDateTime = new Label("Refreshed "+dateformat);
final HorizontalPanel dateHPanel = new HorizontalPanel();
refreshDateTime.setStyleName("refreshDateTime");
dateHPanel.setStyleName("refreshDatePanel");
dateHPanel.add(refreshDateTime);
dateHPanel.add(refreshImg);
HorizontalPanel mainPanel = new HorizontalPanel();
mainPanel.setStyleName("mainPanel");
VerticalPanel verticalPanel = new VerticalPanel();
verticalPanel.add(gridTitleLbl);
verticalPanel.add(dateHPanel);
gridTtlPanel.add(verticalPanel);
HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.add(gridTtlImg);
horizontalPanel.setCellVerticalAlignment(gridTtlImg, HasVerticalAlignment.ALIGN_MIDDLE);
horizontalPanel.add(gridTtlPanel);
mainPanel.add(horizontalPanel);
if(!childID.equalsIgnoreCase("")) if(!childID.equalsIgnoreCase(""))
{ {
gridTtlPanel.add(closeButton); mainPanel.add(closeButton);
gridTtlPanel.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT); mainPanel.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT);
gridTtlPanel.setCellWidth( closeButton, "2%" ); mainPanel.setCellWidth( closeButton, "2%" );
} }
if(childID.equalsIgnoreCase("")) if(childID.equalsIgnoreCase(""))
...@@ -1554,7 +1702,7 @@ public class GraphComponent extends Composite ...@@ -1554,7 +1702,7 @@ public class GraphComponent extends Composite
CommonUtils.printOnConsole("dtSrouce :"+dtSrouce); CommonUtils.printOnConsole("dtSrouce :"+dtSrouce);
graphJson = ChartCreator.getBubbleChart(graphDtlList, jsonObjFrGraph, dtSrouce); graphJson = ChartCreator.getBubbleChart(graphDtlList, jsonObjFrGraph, dtSrouce);
idList.add("Bubble"+uniqueId+componentId+"Div"); idList.add("Bubble"+uniqueId+componentId+"Div");
RootPanel.get("Bubble"+uniqueId+componentId+"head").add(gridTtlPanel); RootPanel.get("Bubble"+uniqueId+componentId+"head").add(mainPanel);
this.createBubbleChart(graphJson.toString(), "Bubble"+uniqueId+componentId,xAxisLbl,yAxisLbl,zAxisLbl); this.createBubbleChart(graphJson.toString(), "Bubble"+uniqueId+componentId,xAxisLbl,yAxisLbl,zAxisLbl);
/*CommonUtils.printOnConsole("In BUBBLE GraphComponent File"); /*CommonUtils.printOnConsole("In BUBBLE GraphComponent File");
...@@ -2435,10 +2583,10 @@ public class GraphComponent extends Composite ...@@ -2435,10 +2583,10 @@ public class GraphComponent extends Composite
alert("Excpeiton :: GraphComponent : createOuterDivDrillDown [" + e.message + "]"); alert("Excpeiton :: GraphComponent : createOuterDivDrillDown [" + e.message + "]");
} }
}-*/; }-*/;
private native void createInnerDiv(String innerDivId, String groupName) private native void createInnerDiv(String innerDivId, String groupName,boolean isCompSubTitle)
/*-{ /*-{
try { try {
$wnd.innerDiv(innerDivId,groupName); $wnd.innerDiv(innerDivId,groupName,isCompSubTitle);
} catch (e) { } catch (e) {
alert("Excpeiton :: GraphComponent : createInnerDiv [" + e.message + "]"); alert("Excpeiton :: GraphComponent : createInnerDiv [" + e.message + "]");
} }
...@@ -3091,7 +3239,7 @@ public class GraphComponent extends Composite ...@@ -3091,7 +3239,7 @@ public class GraphComponent extends Composite
cnt++; cnt++;
/*add uniqueId to groupname by dhanendra on date 09-11-2015 */ /*add uniqueId to groupname by dhanendra on date 09-11-2015 */
this.createInnerDiv(uniqueId+cnt,groupName+uniqueId); this.createInnerDiv(uniqueId+cnt,groupName+uniqueId,false);
/*end uniqueId to groupname by dhanendra on date 09-11-2015 */ /*end uniqueId to groupname by dhanendra on date 09-11-2015 */
personArr = multGrph.split("@"); personArr = multGrph.split("@");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment