class ColorToolTip implements ToolTip
{
    private String toolTipText;
    /**
     * provides the Hex value for a Color instance.
     * @param color
     * @return
     */
    static String colorHexValue(Color color)
    {
        return String.format("%02x", color.getRed()) + String.format("%02x", color.getGreen()) +
                String.format("%02x", color.getBlue());
    }

    /**
     * Extract Color values from the row for which tooltip is going to be shown.
     * @param rowtext String instance,
     * @return float array containing color values.
     */
    float[] extractColorValues(String rowtext)
    {
        List<String> words = ToolTipController.getWords(rowtext);
        words.remove(words.size()-1);
        float[] values = new float[words.size()];
        int index = 0;
        try
        {
            for (String word : words)
            {
                values[index++] = Float.parseFloat(word);
            }
        }
        catch (NumberFormatException e)
        {
            return null;
        }
        return values;
    }

    /**
     * Create a html string that actually shows a colored rect.
     * @param hexValue
     * @return String instance, In html format.
     */
    String getMarkUp(String hexValue)
    {<FILL_FUNCTION_BODY>}

    public void setToolTipText(String toolTip)
    {
        this.toolTipText = toolTip;
    }

    @Override
    public String getToolTipText()
    {
        return toolTipText;
    }
}

         return  "<html>\n" +
                "<body bgcolor=#ffffff>\n" +
                "<div style=\"width:50px;height:20px;border:1px; background-color:#"+hexValue+";\"></div></body>\n" +
                "</html>";
    
<no_super_class>