All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.theme.ThemePackage Maven / Gradle / Ivy

Go to download

JCommunique is a free, open-source desktop notification library. It offers a range of features with a simple-to-use API. This is a maven repack, code is unchanged

The newest version!
package com.theme;

import java.util.HashMap;
import java.util.Map;

/**
 * Contains a collection of themes that can be accessed later.
 */
public class ThemePackage {
	private Map, Object> m_themes;

	public ThemePackage() {
		m_themes = new HashMap, Object>();
	}

	/**
	 * Sets the theme object related with the theme class. The first parameter should be the class of the second
	 * parameter.
	 *
	 * @param 
	 *            the Class of the theme
	 * @param themeClass
	 *            the Class of the theme to set
	 * @param theme
	 *            the theme to set
	 */
	public  void setTheme(Class themeClass, T theme) {
		m_themes.put(themeClass, theme);
	}

	/**
	 * Gets the theme object related with the theme class.
	 *
	 * @param 
	 *            the Class of the theme
	 * @param themeClass
	 *            the Class of the theme to return
	 * @return the theme corresponding with the given Class
	 */
	public  T getTheme(Class themeClass) {
		@SuppressWarnings("unchecked")
		T theme = (T) m_themes.get(themeClass);
		return theme;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy