com.sun.electric.tool.routing
Class RouteElement

java.lang.Object
  extended by com.sun.electric.tool.routing.RouteElement
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RouteElementArc, RouteElementPort

public abstract class RouteElement
extends java.lang.Object
implements java.io.Serializable

A Route describes a new connection to be made. A Route consists of RouteElements, which in one sense are either nodes are arcs. However, in another sense we can consider them to be actions, such as new node, new arc, or arc delete, or node delete.

Arc/node delete happens when an existing arc is replaced by two or more new arcs, or when an existing route needs to be uprooted in order to make room for new routes. Author: gainsley

See Also:
Serialized Form

Nested Class Summary
static class RouteElement.RouteElementAction
          RouteElementAction is a type safe enum class for describing the action to be take by a RouteElement object.
 
Constructor Summary
protected RouteElement(RouteElement.RouteElementAction action, Cell cell)
          Private Constructor
 
Method Summary
abstract  void addHighlightArea(Highlighter highlighter)
          Adds RouteElement to highlights
abstract  ElectricObject doAction()
          Perform the action specified by RouteElementAction action.
 RouteElement.RouteElementAction getAction()
          get RouteElementAction
 Cell getCell()
          Return the cell in which this RouteElement will do it's action
 boolean isDone()
          see if action has been done
 boolean isShowHighlight()
          Get show highlight property
 void setDone()
          set done to true to indication action has been done
 void setShowHighlight(boolean b)
          Set show highlight property
abstract  java.lang.String toString()
          Return string decribing the RouteElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RouteElement

protected RouteElement(RouteElement.RouteElementAction action,
                       Cell cell)
Private Constructor

Parameters:
action - the action this RouteElementAction will do.
Method Detail

isDone

public boolean isDone()
see if action has been done


setDone

public void setDone()
set done to true to indication action has been done


getAction

public RouteElement.RouteElementAction getAction()
get RouteElementAction


getCell

public Cell getCell()
Return the cell in which this RouteElement will do it's action


isShowHighlight

public boolean isShowHighlight()
Get show highlight property


setShowHighlight

public void setShowHighlight(boolean b)
Set show highlight property


toString

public abstract java.lang.String toString()
Return string decribing the RouteElement

Overrides:
toString in class java.lang.Object

doAction

public abstract ElectricObject doAction()
Perform the action specified by RouteElementAction action. Note that this method performs database editing, and should only be called from within a Job.

Returns:
the object created, or null if deleted or nothing done.

addHighlightArea

public abstract void addHighlightArea(Highlighter highlighter)
Adds RouteElement to highlights