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

de.rpgframework.jfx.PoolCell Maven / Gradle / Ivy

package de.rpgframework.jfx;

import de.rpgframework.genericrpg.Pool;
import javafx.scene.control.TableCell;
import javafx.scene.control.Tooltip;

/**
 * @author Stefan
 *
 * T = Type (e.g. Attribute), C = ValueType (e.g. AttributeValue), R = RowType
 */
public class PoolCell extends TableCell> {

	//--------------------------------------------------------------------
	public PoolCell() {
	}

	//--------------------------------------------------------------------
	/**
	 * @see javafx.scene.control.Cell#updateItem(java.lang.Object, boolean)
	 */
	@Override
	public void updateItem(Pool item, boolean empty) {
		super.updateItem(item, empty);

		if (empty) {
			setText(null);
			setTooltip(null);
		} else {
			setText(item.toString());
			setTooltip(new Tooltip(item.toExplainString()));
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy