/* This file is part of the algoviz@vt collection of algorithm visualizations. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this distribution. If not, see . */ package splayTree; import java.awt.*; /** * Holds the current state of a GraphicalNode * * @author Andy Street, alstreet@vt.edu * @version Feb 11, 2009 * */ public class VNode extends Location { public int id = -1; public int size = -1; public int height = -1; public Color fill = GraphicalNode.DEFAULT_NODE_COLOR; public Color outline = GraphicalNode.DEFAULT_BORDER_COLOR; public Color textColor = GraphicalNode.DEFAULT_TEXT_COLOR; public int left = -1; public int right = -1; public boolean isPlaceholder = false; public boolean isSelected = false; String text = null; public VNode() { super(-1, -1); } /** * @see avl.Location#toString() */ @Override public String toString() { return "[" + id + "]: (" + x + ", " + y + ")"; } }