public class EdgeAttributeReaderImpl<V,E extends Edge<V>> extends Object implements EdgeAttributesReader<V,E>
Modifier and Type | Field and Description |
---|---|
static String |
EDGE_COLOR |
protected static Map<String,float[]> |
m_pattern |
Constructor and Description |
---|
EdgeAttributeReaderImpl(StyleManager<V,E> styleManager,
GraphBackend<V,E> backend,
NodeAttributesReader nreader) |
Modifier and Type | Method and Description |
---|---|
void |
copyFrom(EdgeAttributesReader fereader) |
void |
damage()
The current item will be changed: mark its current area as damaged if needed.
|
EdgeAnchor |
getAnchor() |
Rectangle |
getBounds()
get the boundary rectangle for the selected item.
|
EdgePattern |
getDash()
set the edge as dashed.
|
EdgeStyle<V,E> |
getDefaultEdgeStyle()
Get the default style used for the edges in this graph.
|
Color |
getLineColor() |
EdgeEnd |
getLineEnd() |
float |
getLineWidth() |
List<Point> |
getPoints() |
EdgeStyle |
getStyle() |
boolean |
hasReverseEdge()
Check if the graph also contains the reversed edge.
|
boolean |
isCurve()
Is this edge curve?
This only affects edges with intermediate points.
|
void |
move(int dx,
int dy)
Move the item.
|
void |
refresh()
Let listeners know that the item has been updated
|
void |
render(Graphics2D g)
Render an edge on a given graphics.
|
void |
renderMoving(Graphics2D g,
MovingEdgeType type,
int movex,
int movey)
Render an edge while the edge or at least one of its connected node is moved.
|
void |
renderMovingPoint(Graphics2D g,
int idx,
int movex,
int movey) |
boolean |
select(Point p)
Test if a point can be used to select the current item.
|
void |
setAnchor(EdgeAnchor anchor) |
void |
setCurve(boolean curve)
Set the edge as curve property.
|
void |
setEdge(E obj)
set the edge on which we work
|
void |
setEdge(E obj,
boolean selected)
Set the edge on which we work, knowing that it is selected.
|
void |
setPoints(List<Point> l)
set points used by this edge
|
void |
setStyle(EdgeStyle style) |
void |
writeGINML(XMLWriter writer)
Save the visual settings in GINML.
|
public static final String EDGE_COLOR
public EdgeAttributeReaderImpl(StyleManager<V,E> styleManager, GraphBackend<V,E> backend, NodeAttributesReader nreader)
styleManager
- backend
- nreader
- public Rectangle getBounds()
AttributesReader
getBounds
in interface AttributesReader
public void setEdge(E obj)
EdgeAttributesReader
public void setEdge(E obj, boolean selected)
EdgeAttributesReader
public float getLineWidth()
getLineWidth
in interface EdgeAttributesReader<V,E extends Edge<V>>
public Color getLineColor()
getLineColor
in interface EdgeAttributesReader<V,E extends Edge<V>>
public void refresh()
AttributesReader
refresh
in interface AttributesReader
public void damage()
AttributesReader
damage
in interface AttributesReader
public EdgeEnd getLineEnd()
getLineEnd
in interface EdgeAttributesReader<V,E extends Edge<V>>
public void setPoints(List<Point> l)
EdgeAttributesReader
public boolean hasReverseEdge()
EdgeAttributesReader
hasReverseEdge
in interface EdgeAttributesReader<V,E extends Edge<V>>
public EdgePattern getDash()
EdgeAttributesReader
public void copyFrom(EdgeAttributesReader fereader)
public EdgeAnchor getAnchor()
public void setAnchor(EdgeAnchor anchor)
public boolean isCurve()
EdgeAttributesReader
public void setCurve(boolean curve)
EdgeAttributesReader
public void render(Graphics2D g)
EdgeAttributesReader
public void renderMoving(Graphics2D g, MovingEdgeType type, int movex, int movey)
EdgeAttributesReader
renderMoving
in interface EdgeAttributesReader<V,E extends Edge<V>>
public void renderMovingPoint(Graphics2D g, int idx, int movex, int movey)
renderMovingPoint
in interface EdgeAttributesReader<V,E extends Edge<V>>
public boolean select(Point p)
AttributesReader
select
in interface AttributesReader
public void move(int dx, int dy)
AttributesReader
move
in interface AttributesReader
public EdgeStyle<V,E> getDefaultEdgeStyle()
EdgeAttributesReader
getDefaultEdgeStyle
in interface EdgeAttributesReader<V,E extends Edge<V>>
public void writeGINML(XMLWriter writer) throws IOException
AttributesReader
writeGINML
in interface AttributesReader
IOException
public void setStyle(EdgeStyle style)
Copyright © 2005–2020. All rights reserved.