blob: 43337dd9b19057c07057cac3280bcca3a57c52bb [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2010 BSI Business Systems Integration AG.
* 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:
* BSI Business Systems Integration AG - initial API and implementation
******************************************************************************/
package org.eclipse.scout.rt.ui.swing.icons;
import org.eclipse.scout.commons.logger.IScoutLogger;
import org.eclipse.scout.commons.logger.ScoutLogManager;
import org.eclipse.scout.rt.client.services.common.icon.IconProviderService;
import org.eclipse.scout.rt.client.services.common.icon.IconSpec;
import org.eclipse.scout.rt.client.ui.IIconLocator;
import org.eclipse.scout.rt.shared.AbstractIcons;
import org.eclipse.scout.rt.ui.swing.services.common.icon.SwingBundleIconProviderService;
public class SwingBundleIconLocator implements IIconLocator {
private static final IScoutLogger LOG = ScoutLogManager.getLogger(SwingBundleIconLocator.class);
private final IconProviderService m_swingIconProviderService;
public SwingBundleIconLocator() {
m_swingIconProviderService = new SwingBundleIconProviderService();
}
@Override
public IconSpec getIconSpec(String name) {
if (name == null || AbstractIcons.Null.equals(name)) {
return null;
}
return m_swingIconProviderService.getIconSpec(name);
}
}