Package com.algo.structure
Class Highlights
- java.lang.Object
-
- com.algo.structure.Highlights
-
public class Highlights extends java.lang.ObjectManages highlights and annotations of vertices and edges.
-
-
Constructor Summary
Constructors Constructor Description Highlights()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidannotate(java.lang.Object o, java.lang.String annotation)Annotates the given vertex or edge with the given string.voidclearAnnotations()Removes all annotations from all vertices and all edges.voidclearSelection()voiddeselectAll(java.util.Collection<?> elems)voidfilterType(java.lang.Class<?> t)Removes all objects from the selection that have specified type.java.lang.StringgetAnnotation(java.lang.Object o)Returns the string annotation for the given vertex or edge.java.util.ArrayList<java.lang.Object>getFilteredByType(java.lang.Class<?> t)java.util.LinkedHashSet<java.lang.Object>getSelection()booleanisSelected(java.lang.Object o)Returns true if the given vertex or edge is currently selected.booleanisSelectionEmpty()java.lang.ObjectlastAdded()voidremove(java.lang.Object o)voidremoveAll(java.util.List o)voidselect(java.lang.Object o)voidselectAll(java.util.Collection<?> elems)
-
-
-
Method Detail
-
select
public void select(java.lang.Object o)
-
lastAdded
public java.lang.Object lastAdded()
-
selectAll
public void selectAll(java.util.Collection<?> elems)
-
deselectAll
public void deselectAll(java.util.Collection<?> elems)
-
clearSelection
public void clearSelection()
-
remove
public void remove(java.lang.Object o)
-
removeAll
public void removeAll(java.util.List o)
-
filterType
public void filterType(java.lang.Class<?> t)
Removes all objects from the selection that have specified type.
-
getFilteredByType
public java.util.ArrayList<java.lang.Object> getFilteredByType(java.lang.Class<?> t)
-
getSelection
public java.util.LinkedHashSet<java.lang.Object> getSelection()
-
isSelectionEmpty
public boolean isSelectionEmpty()
-
isSelected
public boolean isSelected(java.lang.Object o)
Returns true if the given vertex or edge is currently selected. There may be more than one currently selected vertex or edge.- Parameters:
o- A vertex or an edge.- Returns:
- True if the vertex or edge is currently selected.
-
annotate
public void annotate(java.lang.Object o, java.lang.String annotation)Annotates the given vertex or edge with the given string. Overrides the old annotation for this vertex/edge if present.- Parameters:
o- A vertex or an edge.annotation- The annotation.
-
clearAnnotations
public void clearAnnotations()
Removes all annotations from all vertices and all edges.
-
getAnnotation
public java.lang.String getAnnotation(java.lang.Object o)
Returns the string annotation for the given vertex or edge.- Parameters:
o- A vertex or an edge.- Returns:
- The string annotation for the given vertex or edge.
-
-