Example usage for com.google.gwt.graphics.client Color LIMEGREEN

List of usage examples for com.google.gwt.graphics.client Color LIMEGREEN

Introduction

In this page you can find the example usage for com.google.gwt.graphics.client Color LIMEGREEN.

Prototype

Color LIMEGREEN

To view the source code for com.google.gwt.graphics.client Color LIMEGREEN.

Click Source Link

Usage

From source file:com.google.speedtracer.client.visualizations.view.ServerEventColors.java

License:Apache License

public static Color getColorFor(ServerEvent event) {
    assert event.getType() == EventRecordType.SERVER_EVENT : "event is not a ServerEvent";
    if (colorByTypeString == null) {
        final IterableFastStringMap<Color> map = new IterableFastStringMap<Color>();

        map.put("HTTP", Color.ORANGE);

        // Spring Insight only.
        map.put("WEB_REQUEST", Color.BLUEVIOLET);
        map.put("VIEW_RENDER", Color.MIDNIGHT_BLUE);
        map.put("JDBC", Color.INDIAN_RED);
        map.put("VIEW_RESOLVER", Color.CYAN);
        map.put("TRANSACTION", Color.LIGHT_BLUE);
        map.put("CONTROLLER_METHOD", Color.LIGHTGREEN);
        map.put("MODEL_ATTRIBUTE", Color.DARKGREEN);
        map.put("ANNOTATED_METHOD", Color.PEACH);
        map.put("GRAILS_CONTROLLER_METHOD", Color.YELLOW);
        map.put("LIFECYCLE", Color.DARKBLUE);
        map.put("INIT_BINDER", Color.BROWN);
        map.put("SIMPLE", Color.LIMEGREEN);

        // AppStats only.
        map.put("API", Color.LIGHT_BLUE);
        colorByTypeString = map;/*from w  w w. j  ava 2 s.  c  o  m*/
    }

    final Color color = colorByTypeString.get(event.getServerEventData().getType());
    return (color == null) ? Color.LIGHTGREY : color;
}