|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscg.ac.ni.pmf.newgraph.graphdata.Vertex
public class Vertex
Represents a graph vertex. Each vertex in a graph has a unique ID number. The additional properties of a vertex are the (X, Y) coordinates in the graphical representation of the graph.
Method Summary | |
---|---|
java.util.Set |
component()
Retrieves the component that the vertex belongs to. |
int |
degree()
Retrieves the degree of the vertex. |
void |
delete()
Deletes the vertex. |
void |
deselect()
Deselects this vertex. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is equal to this one. |
VertexData |
getData()
Retrieves the vertex data of the vertex. |
int |
getID()
Retrieves the identification number (ID) of the vertex. |
java.util.Set |
getIncident()
Retrieves the set of edges incident with the specified vertex. |
java.util.Enumeration |
getNeighbors()
Retrieves an enumeration of neighbors of the specified vertex. |
float |
getX()
Retrieves the horizontal coordinate (X) of the vertex on the graphical representation of the graph. |
float |
getY()
Retrieves the vertical coordinate (Y) of the vertex on the graphical representation of the graph. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isAdjanced(Vertex v)
Retrieves is the vertex adjanced to the specified vertex. |
boolean |
isIncident(Edge e)
Retrieves is the vertex incident with the specified edge. |
boolean |
isPrimarySelected()
Retrieves is the vertex primary selected. |
boolean |
isSelected()
Retrieves is the vertex selected. |
void |
moveFor(float dx,
float dy)
Moves the vertex for the specified distance. |
void |
moveTo(float x,
float y)
Moves the vertex to the specified coordinates. |
void |
select()
Selects this vertex. |
void |
setPrimarySelected()
Sets the vertex as primary selected. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public int getID()
public float getX()
public float getY()
public VertexData getData()
public boolean isAdjanced(Vertex v)
v
- The vertex.
public boolean isIncident(Edge e)
e
- The edge.
public boolean isSelected()
isSelected
in interface Element
public boolean isPrimarySelected()
public java.util.Enumeration getNeighbors()
Vertex
.public java.util.Set getIncident()
null
.
Edge
.public void delete()
delete
in interface Element
Element.delete()
public void select()
select
in interface Element
public void deselect()
deselect
in interface Element
public void setPrimarySelected()
setPrimarySelected
in interface Element
Element.setPrimarySelected()
public void moveTo(float x, float y)
x
- The horizontal (X) coordinate.y
- The vertical (Y) coordinate.public void moveFor(float dx, float dy)
dx
- The horizontal (X) distance.dy
- The vertical (Y) distance.public int degree()
public java.util.Set component()
Vertex
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |