< prev index next >

application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/ChartToolTipProvider.java

Print this page




 117 //                      return (auto.equals(exact)) ? htmlify(auto) : htmlify(auto + " (" + exact + ')');
 118                         return htmlify(auto);
 119                 } else {
 120                         return Messages.N_A;
 121                 }
 122         }
 123 
 124         protected void appendTagLI(Color color) {
 125                 if (color != null) {
 126                         imageMap.put("color." + colorNum, SWTColorToolkit.getColorThumbnail(SWTColorToolkit.asRGB(color))); //$NON-NLS-1$
 127                         text.append("<li style='image' value='color.").append(colorNum).append("' "); //$NON-NLS-1$ //$NON-NLS-2$
 128                         colorNum++;
 129                 } else {
 130                         text.append("<li "); //$NON-NLS-1$
 131                 }
 132 //              text.append("bindent='").append(bulletIndent).append("'> "); //$NON-NLS-1$ //$NON-NLS-2$
 133                 text.append("bindent='0'> "); //$NON-NLS-1$
 134         }
 135 
 136         protected void appendTitle(String title) {
 137                 text.append("<p><b>").append(title).append("</b></p>");
 138         }
 139 
 140         protected void appendAtIfNew(IDisplayable newAt) {
 141                 String newAtAsString = format(newAt);
 142                 if (!newAtAsString.equals(lastAt)) {
 143                         text.append("<p><span nowrap='true'>At ").append(newAtAsString).append(":<br/></span></p>"); //$NON-NLS-1$ //$NON-NLS-2$
 144                         lastAt = newAtAsString;
 145                 }
 146         }
 147 
 148         @Override
 149         public void visit(IPoint point) {
 150                 appendAtIfNew(point.getX());
 151                 appendTagLI(point.getColor());
 152                 String name = point.getName();
 153                 text.append("<span nowrap='true'>"); //$NON-NLS-1$
 154                 if (name != null) {
 155                         text.append(htmlify(name)).append(" = "); //$NON-NLS-1$
 156                 }
 157                 text.append(format(point.getY()));




 117 //                      return (auto.equals(exact)) ? htmlify(auto) : htmlify(auto + " (" + exact + ')');
 118                         return htmlify(auto);
 119                 } else {
 120                         return Messages.N_A;
 121                 }
 122         }
 123 
 124         protected void appendTagLI(Color color) {
 125                 if (color != null) {
 126                         imageMap.put("color." + colorNum, SWTColorToolkit.getColorThumbnail(SWTColorToolkit.asRGB(color))); //$NON-NLS-1$
 127                         text.append("<li style='image' value='color.").append(colorNum).append("' "); //$NON-NLS-1$ //$NON-NLS-2$
 128                         colorNum++;
 129                 } else {
 130                         text.append("<li "); //$NON-NLS-1$
 131                 }
 132 //              text.append("bindent='").append(bulletIndent).append("'> "); //$NON-NLS-1$ //$NON-NLS-2$
 133                 text.append("bindent='0'> "); //$NON-NLS-1$
 134         }
 135 
 136         protected void appendTitle(String title) {
 137                 text.append("<p><b>").append(title).append("</b></p>"); //$NON-NLS-1$ //$NON-NLS-2$
 138         }
 139 
 140         protected void appendAtIfNew(IDisplayable newAt) {
 141                 String newAtAsString = format(newAt);
 142                 if (!newAtAsString.equals(lastAt)) {
 143                         text.append("<p><span nowrap='true'>At ").append(newAtAsString).append(":<br/></span></p>"); //$NON-NLS-1$ //$NON-NLS-2$
 144                         lastAt = newAtAsString;
 145                 }
 146         }
 147 
 148         @Override
 149         public void visit(IPoint point) {
 150                 appendAtIfNew(point.getX());
 151                 appendTagLI(point.getColor());
 152                 String name = point.getName();
 153                 text.append("<span nowrap='true'>"); //$NON-NLS-1$
 154                 if (name != null) {
 155                         text.append(htmlify(name)).append(" = "); //$NON-NLS-1$
 156                 }
 157                 text.append(format(point.getY()));


< prev index next >