org.grinvin.gui.icons
Class EdgesOnlyIcon
- GraphIcon, Icon, SelectUnselectIcon
public class EdgesOnlyIcon
Creates an icon for the first embedding of a graph, but draws
only the edges. Typically used for chemical graphs.
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) - Only paints the edges, first as a shadow and then as
true edges.
|
void | setSize(int size) - Set or change the size of the bounding square of this icon.
|
EdgesOnlyIcon
public EdgesOnlyIcon(EmbeddingView embedding,
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 graphsize
- Size in pixels for the width and height of the enclosing square
EdgesOnlyIcon
public EdgesOnlyIcon(GraphBundleView bundle,
int size)
Create a graph icon based on the first embedding stored in the given
graph bundle.
paintEdges
protected void paintEdges(Graphics2D g2)
paintIcon
public void paintIcon(Component c,
Graphics g,
int x,
int y)
Only paints the edges, first as a shadow and then as
true edges.
- paintIcon in interface AbstractSelectUnselectIcon
setSize
public void setSize(int size)
Set or change the size of the bounding square of this icon.