summaryrefslogtreecommitdiff
path: root/src/FamilyButton.java
blob: 994e8487c7a9048504f05256810aeaf647e71781 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import javax.swing.JToggleButton;

/*
 * @author
 * Kian Agheli
 *
 * References:
 * https://www.geeksforgeeks.org/java-swing-jtogglebutton-class/
 *
 * Date:
 * 2024-05-25
 *
 * Purpose of class:
 * Provide an interative button to toggle FontFamily metadata.
 */

public class FamilyButton extends JToggleButton {
	private FontFamily family; // A FamilyButton has-a font family

	public FamilyButton(FontFamily family)
	{
		this.family = family; // Set family to provided
	}

	/**
	 * Return the FontFamily associated with the instantiated button.
	 */
	public FontFamily getFamily() {
		return family;
	}
}