Пример #1
0
  public void initialise(DrawingContext attributes) {
    attributes.put(
        "GradientColorContext.BLACK",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.BLACK);
    attributes.put(
        "GradientColorContext.BLUE", ContextResources.GRAPHICS_CONTEXT, GradientColorContext.BLUE);
    attributes.put(
        "GradientColorContext.CYAN", ContextResources.GRAPHICS_CONTEXT, GradientColorContext.CYAN);
    attributes.put(
        "GradientColorContext.DARK_GRAY",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.DARK_GRAY);
    attributes.put(
        "GradientColorContext.GRAY", ContextResources.GRAPHICS_CONTEXT, GradientColorContext.GRAY);
    attributes.put(
        "GradientColorContext.GREEN",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.GREEN);
    attributes.put(
        "GradientColorContext.LIGHT_GRAY",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.LIGHT_GRAY);
    attributes.put(
        "GradientColorContext.MAGENTA",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.MAGENTA);
    attributes.put(
        "GradientColorContext.ORANGE",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.ORANGE);
    attributes.put(
        "GradientColorContext.PINK", ContextResources.GRAPHICS_CONTEXT, GradientColorContext.PINK);
    attributes.put(
        "GradientColorContext.RED", ContextResources.GRAPHICS_CONTEXT, GradientColorContext.RED);
    attributes.put(
        "GradientColorContext.WHITE",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.WHITE);
    attributes.put(
        "GradientColorContext.YELLOW",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.YELLOW);

    attributes.put(
        "GradientColorContext.OTHER0",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.OTHER0);
    attributes.put(
        "GradientColorContext.CLUSTER11",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.CLUSTER11);
    attributes.put(
        "GradientColorContext.QUEUEING12",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.QUEUEING12);
    attributes.put(
        "GradientColorContext.NETWORK7",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.NETWORK7);
    attributes.put(
        "GradientColorContext.ADMINISTRATIVE3",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.ADMINISTRATIVE3);
    attributes.put(
        "GradientColorContext.CONFIGURATION2",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.CONFIGURATION2);
    attributes.put(
        "GradientColorContext.COMMIT5",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.COMMIT5);
    attributes.put(
        "GradientColorContext.APPLICATION1",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.APPLICATION1);
    attributes.put(
        "GradientColorContext.CONCURRENCY4",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.CONCURRENCY4);
    attributes.put(
        "GradientColorContext.SYSTEMIO9",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.SYSTEMIO9);
    attributes.put(
        "GradientColorContext.USERIO8",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.USERIO8);
    attributes.put(
        "GradientColorContext.SCHEDULER10",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.SCHEDULER10);
    attributes.put(
        "GradientColorContext.CPU", ContextResources.GRAPHICS_CONTEXT, GradientColorContext.CPU);
  }
Пример #2
0
  public void initialise(DrawingContext attributes, List eventList) {
    attributes.put(
        "GradientColorContext.BLACK",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.BLACK);
    attributes.put(
        "GradientColorContext.BLUE", ContextResources.GRAPHICS_CONTEXT, GradientColorContext.BLUE);
    attributes.put(
        "GradientColorContext.CYAN", ContextResources.GRAPHICS_CONTEXT, GradientColorContext.CYAN);
    attributes.put(
        "GradientColorContext.DARK_GRAY",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.DARK_GRAY);
    attributes.put(
        "GradientColorContext.GRAY", ContextResources.GRAPHICS_CONTEXT, GradientColorContext.GRAY);
    attributes.put(
        "GradientColorContext.GREEN",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.GREEN);
    attributes.put(
        "GradientColorContext.LIGHT_GRAY",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.LIGHT_GRAY);
    attributes.put(
        "GradientColorContext.MAGENTA",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.MAGENTA);
    attributes.put(
        "GradientColorContext.ORANGE",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.ORANGE);
    attributes.put(
        "GradientColorContext.PINK", ContextResources.GRAPHICS_CONTEXT, GradientColorContext.PINK);
    attributes.put(
        "GradientColorContext.RED", ContextResources.GRAPHICS_CONTEXT, GradientColorContext.RED);
    attributes.put(
        "GradientColorContext.WHITE",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.WHITE);
    attributes.put(
        "GradientColorContext.YELLOW",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.YELLOW);

    attributes.put(
        "GradientColorContext.OTHER0",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.OTHER0);
    attributes.put(
        "GradientColorContext.CLUSTER11",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.CLUSTER11);
    attributes.put(
        "GradientColorContext.QUEUEING12",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.QUEUEING12);
    attributes.put(
        "GradientColorContext.NETWORK7",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.NETWORK7);
    attributes.put(
        "GradientColorContext.ADMINISTRATIVE3",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.ADMINISTRATIVE3);
    attributes.put(
        "GradientColorContext.CONFIGURATION2",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.CONFIGURATION2);
    attributes.put(
        "GradientColorContext.COMMIT5",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.COMMIT5);
    attributes.put(
        "GradientColorContext.APPLICATION1",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.APPLICATION1);
    attributes.put(
        "GradientColorContext.CONCURRENCY4",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.CONCURRENCY4);
    attributes.put(
        "GradientColorContext.SYSTEMIO9",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.SYSTEMIO9);
    attributes.put(
        "GradientColorContext.USERIO8",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.USERIO8);
    attributes.put(
        "GradientColorContext.SCHEDULER10",
        ContextResources.GRAPHICS_CONTEXT,
        GradientColorContext.SCHEDULER10);
    attributes.put(
        "GradientColorContext.CPU", ContextResources.GRAPHICS_CONTEXT, GradientColorContext.CPU);

    if (eventList != null) {
      Iterator iterEvent = eventList.iterator();
      while (iterEvent.hasNext()) {
        String eventName = (String) iterEvent.next();
        attributes.put(
            eventName,
            ContextResources.GRAPHICS_CONTEXT,
            new LocalColorContext(Options.getInstance().getColor(eventName)));
      }
    }
  }