1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2011 Association for Decentralized Information Management in
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.sysdyn.ui.trend.chart.properties;
\r
14 import org.eclipse.jface.resource.ColorDescriptor;
\r
15 import org.eclipse.jface.resource.ResourceManager;
\r
16 import org.eclipse.swt.graphics.Color;
\r
17 import org.eclipse.swt.graphics.RGB;
\r
18 import org.simantics.browsing.ui.swt.widgets.impl.ITrackedColorProvider;
\r
21 * ColorProvider providing coloring scheme for chart tab text widgets
\r
23 * @author Teemu Lempinen
\r
26 public class JFreeChartPropertyColorProvider implements ITrackedColorProvider {
\r
28 private final ResourceManager resourceManager;
\r
30 private final ColorDescriptor highlightColor = ColorDescriptor.createFrom(new RGB(254, 255, 197));
\r
31 private final ColorDescriptor inactiveColor = ColorDescriptor.createFrom(new RGB(255, 255, 255));
\r
32 private final ColorDescriptor invalidInputColor = ColorDescriptor.createFrom(new RGB(255, 128, 128));
\r
34 public JFreeChartPropertyColorProvider(ResourceManager resourceManager) {
\r
35 this.resourceManager = resourceManager;
\r
39 public Color getEditingBackground() {
\r
44 public Color getHoverBackground() {
\r
45 return resourceManager.createColor(highlightColor);
\r
49 public Color getInactiveBackground() {
\r
50 return resourceManager.createColor(inactiveColor);
\r
54 public Color getInvalidBackground() {
\r
55 return resourceManager.createColor(invalidInputColor);
\r