X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Felement%2Fhandler%2Fimpl%2Fproxy%2FProxyFillColor.java;h=e0926342f8ba32143daecab912902da438b277b9;hb=refs%2Fchanges%2F38%2F238%2F2;hp=37e7358397ef922fe289ad68fb61c1b452dffd77;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/proxy/ProxyFillColor.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/proxy/ProxyFillColor.java index 37e735839..e0926342f 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/proxy/ProxyFillColor.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/proxy/ProxyFillColor.java @@ -1,44 +1,44 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * 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: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.g2d.element.handler.impl.proxy; - -import java.awt.Color; - -import org.simantics.g2d.element.IElement; -import org.simantics.g2d.element.handler.FillColor; - -/** - * @author Toni Kalajainen - */ -public class ProxyFillColor implements FillColor { - - private static final long serialVersionUID = -4916395116541022436L; - - FillColor orig; - IProxyProvider provider; - - public ProxyFillColor(IProxyProvider provider, FillColor orig) { - this.provider = provider; - this.orig = orig; - } - - @Override - public Color getFillColor(IElement e) { - return orig.getFillColor(provider.provide(e)); - } - - @Override - public void setFillColor(IElement e, Color c) { - orig.setFillColor(provider.provide(e), c); - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * 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: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.g2d.element.handler.impl.proxy; + +import java.awt.Color; + +import org.simantics.g2d.element.IElement; +import org.simantics.g2d.element.handler.FillColor; + +/** + * @author Toni Kalajainen + */ +public class ProxyFillColor implements FillColor { + + private static final long serialVersionUID = -4916395116541022436L; + + FillColor orig; + IProxyProvider provider; + + public ProxyFillColor(IProxyProvider provider, FillColor orig) { + this.provider = provider; + this.orig = orig; + } + + @Override + public Color getFillColor(IElement e) { + return orig.getFillColor(provider.provide(e)); + } + + @Override + public void setFillColor(IElement e, Color c) { + orig.setFillColor(provider.provide(e), c); + } + +}