Removed unwanted codes from five components 45/108345/4
authorIndrijeet kumar <indriku1@in.ibm.com>
Wed, 27 May 2020 19:56:37 +0000 (01:26 +0530)
committerIndrijeet Kumar <indriku1@in.ibm.com>
Thu, 28 May 2020 04:43:34 +0000 (04:43 +0000)
Removed unwanted codes from five components

Issue-ID: PORTAL-813
Change-Id: Ib9728a885770bcd1466a94820e37467f765d4c08
Signed-off-by: Indrijeet Kumar <indriku1@in.ibm.com>
ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/ColorProperties.java
ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/GMapProperties.java
ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/MapConstant.java
ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/NovaMap.java
ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/layer/SwingLayer.java

index 6e1d7e2..225fa9e 100644 (file)
@@ -55,38 +55,12 @@ public class ColorProperties {
        }
        
        public void setColor(String type, String color) {
-               //colorProperties.put(type + "_COLOR", color);
                String[] rgb = color.split(",");
                colorProperties.put(type + "_COLOR", 
                                new Color(Integer.parseInt(rgb[0]), Integer.parseInt(rgb[1]), 
                                                Integer.parseInt(rgb[2])));
        }
        
-//     public void setColor(String type, int number, String color) {
-//             Object object = colorProperties.get(type + ":" + number + "_COLOR");
-//             
-//             if (object != null) {
-//                     Color oldColor = (Color) object;
-//                     
-//                     if (!color.equals(oldColor.getRed() + "," + oldColor.getGreen() + "," + oldColor.getBlue())) {
-//                             String[] rgb = color.split(",");
-//                             colorProperties.put(type + ":" + number + "_COLOR", 
-//                                             new Color(Integer.parseInt(rgb[0]), Integer.parseInt(rgb[1]), 
-//                                                             Integer.parseInt(rgb[2])));
-//                     }
-//             }
-//             else {
-//                     String[] rgb = color.split(",");
-//                     colorProperties.put(type + ":" + number + "_COLOR", 
-//                                     new Color(Integer.parseInt(rgb[0]), Integer.parseInt(rgb[1]), 
-//                                                     Integer.parseInt(rgb[2])));
-//             }
-//     }
-       
-//     public Color getColor(String type, int number) {
-//             return (Color) colorProperties.get(type + ":" + number + "_COLOR");
-//     }
-       
        public Color getColor(String type) {
                return (Color) colorProperties.get(type + "_COLOR");
        }
index 6954f63..ba2a41b 100644 (file)
@@ -40,7 +40,7 @@ package org.onap.portalsdk.analytics.gmap.map;
 import org.onap.portalsdk.analytics.system.Globals;
 
 public class GMapProperties {
-       
+
        public static String getProjectFolder() {
                return Globals.getProjectFolder();
        }
index bcbdb8e..ccd1e2f 100644 (file)
@@ -38,7 +38,8 @@
 package org.onap.portalsdk.analytics.gmap.map;
 
 public class MapConstant {
-       public static final String CURSOR = "CURSOR";
+
+        public static final String CURSOR = "CURSOR";
        public static final String FILLED_TRIANGLE = "FILLED TRIANGLE";
        public static final String FILLED_SQUARE = "FILLED SQUARE";
        public static final String FILLED_CIRCLE = "FILLED CIRCLE";
index 6473bc6..794acea 100644 (file)
@@ -166,9 +166,6 @@ public class NovaMap {
                                ;
                }
 
-               // && (1200*meter2pixel[zoom]) > Wmeter
-               // && (700*meter2pixel[zoom]) > Hmeter;
-
                return zoom + MapConstant.ZOOM_MIN - 1;
        }
 
@@ -411,7 +408,6 @@ public class NovaMap {
                }
 
                ArrayList imageArr = new ArrayList();
-               // if(showLegend) layer.paintLegend(g2Legend);
 
                g2d.dispose();
                if (showLegend && g2Legend != null)
index ae6237c..6473c8d 100644 (file)
@@ -108,7 +108,6 @@ public class SwingLayer {
                                System.out.println("swing layer interrupted");
                                return false;
                        }
-                       //System.out.println("%%%%%%%getImage. no of T1%%%%%%" + nodeInfo.getAttribute("x_sequence"));
 
 
                        point = map.getPixelPos(nodeInfo.geoCoordinate.latitude, nodeInfo.geoCoordinate.longitude);
@@ -175,30 +174,19 @@ public class SwingLayer {
                                g2d.setColor(Color.BLACK);
                                g2d.drawString("M", shape.x + width2 / 2, shape.y);
                        }
-                       
-//                     if (map.containsShowLabelList(nodeInfo.getNodeType())) {
-//                             g2d.setColor(Color.BLACK);
-//                             FontMetrics metrics = g2d.getFontMetrics();
-//                             int x = shape.x - metrics.stringWidth(nodeInfo.getID()) / 2;
-//                             int y = shape.y + width2 * 4 / 3;
-//                             g2d.drawString(nodeInfo.getID(), x, y);
-//                     }
                }
         String legendName = "";
         int baseY = 0;
-        baseY = (20*showListArr.length) + 20;//+5;
+        baseY = (20*showListArr.length) + 20;
         int baseX = 0;
                if(map.isShowLegend()) {
                        for (int i = showListArr.length-1; i>=0; i--) {
                                
                                legendName = (String)showListArr[i];
-                       //for(int i = 0; i < showListArr.length; i++ ) {
                                if(i == showListArr.length-1){
                                        textWidth = (textWidth<="Legend".length())?"Legend".length():textWidth;
                                        g2Legend.setColor(Color.WHITE);
-                                       //g2d.draw(new Rectangle2D.Double((int) bounds.getMaxX()*0.1, (int) bounds.getMaxY()*0.75*showListArr.length, (int) bounds.getMaxX()*0.75, (int) bounds.getMaxY()*0.75));
-                                       g2Legend.fill3DRect((int)(0), (int)(0), (int) bounds.getWidth() , (int)(baseY) , true); //  (int)(bounds.getMaxX()*0.9)- (int)(bounds.getMaxX()*0.25)
-                                       //if(i == 0){
+                                       g2Legend.fill3DRect((int)(0), (int)(0), (int) bounds.getWidth() , (int)(baseY) , true);
                                        g2Legend.setColor(Color.BLACK);
                                        g2Legend.setFont(NovaMap.HEADER_FONT);
                                        g2Legend.drawString("Legend", (int) (10), 10);
@@ -214,15 +202,6 @@ public class SwingLayer {
                        }
                }
                
-/*             g2d.drawString("0", (int) bounds.getMaxX()/2+20 + width+10, 0);
-               g2d.drawString("50", (int) bounds.getMaxX()/2+20 + width+10, 50);
-               g2d.drawString("100", (int) bounds.getMaxX()/2+20 + width+10, 100);
-               g2d.drawString("200", (int) bounds.getMaxX()/2+20 + width+10, 200);
-               g2d.drawString("400", (int) bounds.getMaxX()/2+20 + width+10, 400);
-               g2d.drawString("600", (int) bounds.getMaxX()/2+20 + width+10, 600);
-*/             
-//             g2d.setFont(NovaMap.TEXT_FONT);
-//             g2d.setColor(Color.BLACK);
                if(nvl(map.getDataLoaded()).trim().length() > 0) {
                        g2d.setColor(Color.WHITE);
                        g2d.fill3DRect(new Double(bounds.getMinX()).intValue(), new Double(bounds.getMaxY()).intValue()-30, (int) bounds.getWidth() , (int)(30) , true); //  (int)(bounds.getMaxX()*0.9)- (int)(bounds.getMaxX()*0.25)
@@ -230,8 +209,6 @@ public class SwingLayer {
                        g2d.setFont(NovaMap.HEADER_FONT);
                        g2d.drawString(Globals.getUserDefinedMessageForMemoryLimitReached() + " "+ map.getDataLoaded()+ " were downloaded to Map.", new Double(bounds.getMinX()).intValue()+80, new Double(bounds.getMaxY()).intValue()-15);
                }
-               
-               //g2d.drawString("Hello", new Double(bounds.getMinX()).intValue()+20, new Double(bounds.getMaxY()).intValue()-50);
                FontMetrics metrics = g2d.getFontMetrics();
 
                for (int i = 0; i < visibleLabel.size(); i++) {