// Path: src/main/java/com/glaurung/batMap/vo/Exit.java
// public class Exit implements Serializable {
// 
// 
//     private static final long serialVersionUID = 3983564665752135097L;
//     private String exit;
//     private String compassDir;
//     private boolean currentExit;
//     public final String TELEPORT = "teleport";
// 
// 
//     public Exit( String exit ) {
//         this.exit = exit;
//         this.compassDir = this.checkWhatExitIs( exit );
//     }
// 
//     private String checkWhatExitIs( String exit ) {
//         if (exit.equalsIgnoreCase( "n" ) || exit.equalsIgnoreCase( "north" ))
//             return "n";
//         if (exit.equalsIgnoreCase( "e" ) || exit.equalsIgnoreCase( "east" ))
//             return "e";
//         if (exit.equalsIgnoreCase( "s" ) || exit.equalsIgnoreCase( "south" ))
//             return "s";
//         if (exit.equalsIgnoreCase( "w" ) || exit.equalsIgnoreCase( "west" ))
//             return "w";
//         if (exit.equalsIgnoreCase( "ne" ) || exit.equalsIgnoreCase( "northeast" ))
//             return "ne";
//         if (exit.equalsIgnoreCase( "nw" ) || exit.equalsIgnoreCase( "northwest" ))
//             return "nw";
//         if (exit.equalsIgnoreCase( "se" ) || exit.equalsIgnoreCase( "southeast" ))
//             return "se";
//         if (exit.equalsIgnoreCase( "sw" ) || exit.equalsIgnoreCase( "southwest" ))
//             return "sw";
//         if (exit.equalsIgnoreCase( "d" ) || exit.equalsIgnoreCase( "down" ))
//             return "d";
//         if (exit.equalsIgnoreCase( "u" ) || exit.equalsIgnoreCase( "up" ))
//             return "u";
//         return null;
//     }
// 
//     public String getExit() {
//         return exit;
//     }
// 
//     public void setExit( String exit ) {
//         this.exit = exit;
//     }
// 
//     public String toString() {
//         return this.exit;
//     }
// 
//     public String getCompassDir() {
//         return compassDir;
//     }
// 
//     public boolean isCurrentExit() {
//         return currentExit;
//     }
// 
//     public void setCurrentExit( boolean currentExit ) {
//         this.currentExit = currentExit;
//     }
// 
//     public boolean equals( Object o ) {
//         if (o instanceof Exit) {
//             if (this.exit.equals( ( (Exit) o ).getExit() ))
//                 return true;
//         }
//         return false;
// 
//     }
// 
// }


import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import javax.swing.JComponent;
import com.glaurung.batMap.vo.Exit;
import edu.uci.ics.jung.visualization.renderers.DefaultEdgeLabelRenderer;
package com.glaurung.batMap.gui;






/**
 * currently used for coloring edgelabels based on selected or not
 *
 * @author lauri
 */
public class ExitLabelRenderer extends DefaultEdgeLabelRenderer {


    private static final long serialVersionUID = - 7389656600818368218L;

    protected Color pickedEdgeLabelColor = Color.blue;

    protected Color unPickedEdgeLabelColor = Color.red;

    public ExitLabelRenderer( Color pickedEdgeLabelColor, boolean rotateEdgeLabels ) {
        super( pickedEdgeLabelColor, rotateEdgeLabels );
    }


    public ExitLabelRenderer() {
        super( Color.black, false );
    }


    public <E> Component getEdgeLabelRendererComponent( JComponent vv, Object value, Font font, boolean isSelected, E edge ) {

        super.setForeground( vv.getForeground() );
        if (edge instanceof Exit) {
            Exit exit = (Exit) edge;
            if (exit.isCurrentExit()) {
                setForeground( pickedEdgeLabelColor );
            } else {
// Path: src/main/java/com/glaurung/batMap/vo/Exit.java
// public class Exit implements Serializable {
// 
// 
//     private static final long serialVersionUID = 3983564665752135097L;
//     private String exit;
//     private String compassDir;
//     private boolean currentExit;
//     public final String TELEPORT = "teleport";
// 
// 
//     public Exit( String exit ) {
//         this.exit = exit;
//         this.compassDir = this.checkWhatExitIs( exit );
//     }
// 
//     private String checkWhatExitIs( String exit ) {
//         if (exit.equalsIgnoreCase( "n" ) || exit.equalsIgnoreCase( "north" ))
//             return "n";
//         if (exit.equalsIgnoreCase( "e" ) || exit.equalsIgnoreCase( "east" ))
//             return "e";
//         if (exit.equalsIgnoreCase( "s" ) || exit.equalsIgnoreCase( "south" ))
//             return "s";
//         if (exit.equalsIgnoreCase( "w" ) || exit.equalsIgnoreCase( "west" ))
//             return "w";
//         if (exit.equalsIgnoreCase( "ne" ) || exit.equalsIgnoreCase( "northeast" ))
//             return "ne";
//         if (exit.equalsIgnoreCase( "nw" ) || exit.equalsIgnoreCase( "northwest" ))
//             return "nw";
//         if (exit.equalsIgnoreCase( "se" ) || exit.equalsIgnoreCase( "southeast" ))
//             return "se";
//         if (exit.equalsIgnoreCase( "sw" ) || exit.equalsIgnoreCase( "southwest" ))
//             return "sw";
//         if (exit.equalsIgnoreCase( "d" ) || exit.equalsIgnoreCase( "down" ))
//             return "d";
//         if (exit.equalsIgnoreCase( "u" ) || exit.equalsIgnoreCase( "up" ))
//             return "u";
//         return null;
//     }
// 
//     public String getExit() {
//         return exit;
//     }
// 
//     public void setExit( String exit ) {
//         this.exit = exit;
//     }
// 
//     public String toString() {
//         return this.exit;
//     }
// 
//     public String getCompassDir() {
//         return compassDir;
//     }
// 
//     public boolean isCurrentExit() {
//         return currentExit;
//     }
// 
//     public void setCurrentExit( boolean currentExit ) {
//         this.currentExit = currentExit;
//     }
// 
//     public boolean equals( Object o ) {
//         if (o instanceof Exit) {
//             if (this.exit.equals( ( (Exit) o ).getExit() ))
//                 return true;
//         }
//         return false;
// 
//     }
// 
// }


// Path: src/main/java/com/glaurung/batMap/gui/ExitLabelRenderer.java
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import javax.swing.JComponent;
import com.glaurung.batMap.vo.Exit;
import edu.uci.ics.jung.visualization.renderers.DefaultEdgeLabelRenderer;

package com.glaurung.batMap.gui;






/**
 * currently used for coloring edgelabels based on selected or not
 *
 * @author lauri
 */
public class ExitLabelRenderer extends DefaultEdgeLabelRenderer {


    private static final long serialVersionUID = - 7389656600818368218L;

    protected Color pickedEdgeLabelColor = Color.blue;

    protected Color unPickedEdgeLabelColor = Color.red;

    public ExitLabelRenderer( Color pickedEdgeLabelColor, boolean rotateEdgeLabels ) {
        super( pickedEdgeLabelColor, rotateEdgeLabels );
    }


    public ExitLabelRenderer() {
        super( Color.black, false );
    }


    public <E> Component getEdgeLabelRendererComponent( JComponent vv, Object value, Font font, boolean isSelected, E edge ) {

        super.setForeground( vv.getForeground() );
        if (edge instanceof Exit) {
            Exit exit = (Exit) edge;
            if (exit.isCurrentExit()) {
                setForeground( pickedEdgeLabelColor );
            } else {
                setForeground( unPickedEdgeLabelColor );