/* * [ConstellationNode.java] * * Summary: Base class for ConstellationFileLeaf and ConstellationDirNode. * * Copyright: (c) 2011-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 2011-01-31 initial version */ package com.mindprod.constellation; import javax.swing.ImageIcon; /** * Base class for ConstellationFileLeaf and ConstellationDirNode. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2011-01-31 initial version * @since 2011-01-31 */ public abstract class ConstellationNode { /** * state of this node, how user has decided to include/exclude it */ IncludeState includeState; /** * get icon to render this node, varying by IncludedState * * @return ImageIcon to represent tho node or leaf in the JTree */ abstract ImageIcon getStateIcon(); /** * What state is this nod in now? * * @return e.g. INCLUDED EXCLUDED.. */ public IncludeState getIncludeState() { return includeState; } /** * set the user's decision about inclusion of this node. * * @param includeState e.g. INCLUDED EXCLUDED */ public void setIncludeState( final IncludeState includeState ) { this.includeState = includeState; } }