Commit 0d9a107e authored by dkasliwal's avatar dkasliwal

Add popup container open from on mouse over from component icon.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104736 ce508802-f39f-4f6c-b175-0d175dae99d5
parent adb53f64
...@@ -13,6 +13,8 @@ import java.util.Set; ...@@ -13,6 +13,8 @@ import java.util.Set;
import com.google.gwt.core.client.Callback; import com.google.gwt.core.client.Callback;
import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.MouseOverEvent;
import com.google.gwt.event.dom.client.MouseOverHandler;
import com.google.gwt.http.client.Request; import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder; import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestCallback; import com.google.gwt.http.client.RequestCallback;
...@@ -31,6 +33,7 @@ import com.google.gwt.user.client.ui.HasHorizontalAlignment; ...@@ -31,6 +33,7 @@ import com.google.gwt.user.client.ui.HasHorizontalAlignment;
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;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.ScrollPanel; import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.SimplePanel;
...@@ -199,6 +202,10 @@ public class GraphComponent extends Composite ...@@ -199,6 +202,10 @@ public class GraphComponent extends Composite
/*Add Veriable by Dhanendra on 20-10-2015*/ /*Add Veriable by Dhanendra on 20-10-2015*/
String firstNameforTitle = ""; String firstNameforTitle = "";
/*Add Veriable by Dhanendra on 20-10-2015*/ /*Add Veriable by Dhanendra on 20-10-2015*/
HashMap<String, ArrayList<String>> gridComponantDescrMap = null;
String gridComponantDescr = "";
String graphComponantDescr = "";
CommonUtils.printOnConsole("@@@@@@@@@@ idList :"+idList); CommonUtils.printOnConsole("@@@@@@@@@@ idList :"+idList);
if (idList.size() > 0) if (idList.size() > 0)
{ {
...@@ -280,6 +287,8 @@ public class GraphComponent extends Composite ...@@ -280,6 +287,8 @@ public class GraphComponent extends Composite
gridIconName = ""+ gridIconMap.get("iconName"+componentId); gridIconName = ""+ gridIconMap.get("iconName"+componentId);
/*ended by swati to add image in grid title*/ /*ended by swati to add image in grid title*/
gridComponantDescrMap = gridNGraphMeataDataMap.get("componantDescr"+componentId);
gridComponantDescr = ""+ gridComponantDescrMap.get("componantDescr"+componentId);
} }
jsonObjFrGraph = (JSONObject) dataMap.get(dtSrouce); jsonObjFrGraph = (JSONObject) dataMap.get(dtSrouce);
if ("G".equalsIgnoreCase(type)) if ("G".equalsIgnoreCase(type))
...@@ -301,6 +310,11 @@ public class GraphComponent extends Composite ...@@ -301,6 +310,11 @@ public class GraphComponent extends Composite
{ {
htmlString =""+(graphDtlList.get(24)); htmlString =""+(graphDtlList.get(24));
} }
graphComponantDescr = "";
if(graphDtlList.get(25)!=null && graphDtlList.get(25).toString().length()>0)
{
graphComponantDescr = ""+graphDtlList.get(25);
}
// 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)
{ {
...@@ -668,7 +682,7 @@ public class GraphComponent extends Composite ...@@ -668,7 +682,7 @@ public class GraphComponent extends Composite
componantTtl = new Label(componantTitlNameList.get(0)+ " : " +parameterList.get(parameterList.size()-2)); componantTtl = new Label(componantTitlNameList.get(0)+ " : " +parameterList.get(parameterList.size()-2));
} }
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");
SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss"); SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
...@@ -708,8 +722,31 @@ public class GraphComponent extends Composite ...@@ -708,8 +722,31 @@ public class GraphComponent extends Composite
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 display popup menu on mouse over on component icon image by Dhanendra on date 23-02-2017*/
if(graphComponantDescr.length()>0)
{
final PopupPanel toolTipPanel = new PopupPanel(true);
HTMLPanel componentDescrStr=new HTMLPanel(graphComponantDescr);
ScrollPanel panel = new ScrollPanel();
panel.setStyleName("compDescrScollPanel");
panel.add(componentDescrStr);
toolTipPanel.add(panel);
toolTipPanel.setStyleName("componentDescrPanel");
componantTtlImg.addMouseOverHandler(new MouseOverHandler() {
@Override
public void onMouseOver(MouseOverEvent event) {
toolTipPanel.showRelativeTo(componantTtlImg);
}
});
}
/*End code for display popup menu on mouse over on component icon image by Dhanendra on date 23-02-2017*/
/*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(""))
{ {
mainPanel.add(closeButton); mainPanel.add(closeButton);
...@@ -803,7 +840,7 @@ public class GraphComponent extends Composite ...@@ -803,7 +840,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*/
/*Added code for Dyanamic Div and New CSS By Dhanendra 01-07-15*/ /*Added code for Dyanamic Div and New CSS By Dhanendra 01-07-15*/
Image gridTtlImg = new Image("FusionChart/images/"+gridIconName); final Image gridTtlImg = new Image("FusionChart/images/"+gridIconName);
//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");
...@@ -843,9 +880,31 @@ public class GraphComponent extends Composite ...@@ -843,9 +880,31 @@ 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
gridTtlPanel.add(dateHPanel); gridTtlPanel.add(dateHPanel);
gridTtlPanel.setCellWidth( dateHPanel, "15%" ); gridTtlPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT);
/*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
/*Add code for display popup menu on mouse over on component icon image by Dhanendra on date 23-02-2017*/
if(gridComponantDescr.length()>0)
{
final PopupPanel toolTipPanel = new PopupPanel(true);
HTMLPanel componentDescrStr=new HTMLPanel(gridComponantDescr);
ScrollPanel panel = new ScrollPanel();
panel.setStyleName("compDescrScollPanel");
panel.add(componentDescrStr);
toolTipPanel.add(panel);
toolTipPanel.setStyleName("componentDescrPanel");
gridTtlImg.addMouseOverHandler(new MouseOverHandler() {
@Override
public void onMouseOver(MouseOverEvent event) {
toolTipPanel.showRelativeTo(gridTtlImg);
}
});
}
/*End code for display popup menu on mouse over on component icon image by Dhanendra on date 23-02-2017*/
/*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(""))
{ {
...@@ -996,7 +1055,8 @@ public class GraphComponent extends Composite ...@@ -996,7 +1055,8 @@ public class GraphComponent extends Composite
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.setCellWidth( dateHPanel, "15%" ); gridTtlPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT);
/*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
/*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*/
......
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