org.grinvin.gui.icons
Class SmallGraphIcon
- GraphIcon, Icon, SelectUnselectIcon
public class SmallGraphIcon
Icon that represents a Graph. It uses the first embedding of the
GraphBundleView to draw the icon.
int | getIconHeight()
|
int | getIconWidth()
|
protected void | paintEdges(Graphics2D g2) - Paint all edges of the graph using the current renderer.
|
void | paintIcon(Component c, Graphics g, int x, int y) - First paints the edges and then the vertices.
|
protected void | paintVertices(Graphics2D g2) - Paint all vertices of the graph using the current vertex renderer.
|
void | setSize(int size) - Set or change the size of the bounding square of this icon.
|
SmallGraphIcon
public SmallGraphIcon(EmbeddingView embedding,
AnnotationView annotation,
Renderer renderer,
int size)
Create a graph icon for the given embedded graph.
The (two-dimensional) embedding is assumed to be restricted to
coordinates in the range (-1.0,-1.0) - (1.0,1.0) which will be scaled
to a square of the indicated size.
embedding
- Two-dimensional embedding of a graphrenderer
- Renderer which is used to draw the graphsize
- Size in pixels for the width and height of the enclosing square
SmallGraphIcon
public SmallGraphIcon(GraphBundleView bundle,
Renderer renderer,
int size)
Create a graph icon based on the first embedding stored in the given
graph bundle.
paintEdges
protected void paintEdges(Graphics2D g2)
paintVertices
protected void paintVertices(Graphics2D g2)
setSize
public void setSize(int size)
Set or change the size of the bounding square of this icon.