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

jadex.extension.envsupport.observer.graphics.TextInfo Maven / Gradle / Ivy

Go to download

The Jadex kernel extension envsupport allows for using 2D spaces in concert with components.

There is a newer version: 3.0.117
Show newest version
package jadex.extension.envsupport.observer.graphics;

import java.awt.Color;
import java.awt.Font;

/** 
 * Information on how to display a text.
 */
public class TextInfo
{
	private Font font;
	private Color color;
	private String text;
	
	public TextInfo(Font font, Color color, String text)
	{
		this.font = font;
		this.color = color;
		this.text = text;
	}
	
	public Font getFont()
	{
		return font;
	}
	
	public Color getColor()
	{
		return color;
	}
	
	public String getText()
	{
		return text;
	}
	
	public void setText(String text)
	{
		this.text = text;
	}
	
	public int hashCode()
	{
		return font.hashCode()*31 + color.hashCode()*15 + text.hashCode();
	}
	
	public boolean equals(Object obj)
	{
		if (obj instanceof TextInfo)
		{
			TextInfo other = (TextInfo) obj;
			return ((font.equals(other.font)) && (color.equals(other.color)) && (text.equals(other.text)));
		}
		return false;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy