// Carnegie Mellon University
//   Information Networking Institute and
//   School of Computer Science
//
// Master Thesis: A Monitoring Tool for Overlay Network
// By: TungFai Chan and Annie Cheng
//
// File: VIsualElement.java
// Path: userInterfaces/graph/
// Description: Base class for all visual elements on the graph


package userInterfaces.graph;

import java.awt.*;


public abstract class VisualElement {

    final static public int NODE = 0;
    final static public int LINK = 1;

    int elementType;

    boolean selected = false;

    public abstract void draw(Graphics g, int graphType);
    public abstract String toString();

    public void setSelected(boolean select) {
        selected = select;
    }

    public int getElementType() {
        return elementType;
    }

    public boolean isSelected() {
        return selected;
    }

}

