Skip to main content
summaryrefslogtreecommitdiffstats
blob: e344a6e966e6e7952ab08fc9ea1fdc5ee3b5ec4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *    Martin Fluegge - initial API and implementation
 */
package org.eclipse.emf.cdo.dawn.appearance;

import org.eclipse.emf.cdo.dawn.spi.DawnState;

import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;

/**
 * This interface is used do influence the appearance of an UI element by a certain state. Implementations allow to
 * change the appearance for the adapted types of editors.
 * 
 * @author Martin Fluegge
 * @since 2.0
 */
public interface DawnElementStylizer
{
  public void setDefault(Object element);

  public void setConflicted(Object element, int type);

  public void setLocked(Object element, int type);

  /**
   * Returns the image that represents the state for the given object.
   */
  public Image getImage(Object element, DawnState state);

  /**
   * Returns the foreground color that represents the state for the given object.
   */
  public Color getForegroundColor(Object element, DawnState state);

  /**
   * Returns the background color that represents the state for the given object.
   */
  public Color getBackgroundColor(Object element, DawnState state);
}

Back to the top