use of org.cytoscape.graph.render.stateful.CustomGraphicsInfo in project cytoscape-impl by cytoscape.
the class DNodeView method setCustomGraphicsPosition.
@SuppressWarnings("rawtypes")
private void setCustomGraphicsPosition(final VisualProperty<?> vp, final ObjectPosition position) {
// No need to modify
if (position == null)
return;
final VisualProperty<CyCustomGraphics> parent = getParentCustomGraphicsProperty(vp);
if (parent == null)
return;
synchronized (CG_LOCK) {
final CustomGraphicsInfo info = getCustomGraphicsInfo(parent);
info.setPosition(position);
}
}
use of org.cytoscape.graph.render.stateful.CustomGraphicsInfo in project cytoscape-impl by cytoscape.
the class DNodeView method getCustomGraphicsInfo.
/**
* If a CustomGraphicsInfo for the passed VisualProperty does not exist yet, it creates a new one.
*/
@SuppressWarnings("rawtypes")
private CustomGraphicsInfo getCustomGraphicsInfo(final VisualProperty<CyCustomGraphics> vp) {
synchronized (CG_LOCK) {
CustomGraphicsInfo info = cgInfoMap.get(vp);
if (info == null) {
info = new CustomGraphicsInfo(vp);
cgInfoMap.put(vp, info);
}
return info;
}
}
use of org.cytoscape.graph.render.stateful.CustomGraphicsInfo in project cytoscape-impl by cytoscape.
the class DNodeView method setCustomGraphics.
private void setCustomGraphics(final CustomGraphicsVisualProperty vp, final CyCustomGraphics<CustomGraphicLayer> cg) {
synchronized (CG_LOCK) {
final CustomGraphicsInfo info = getCustomGraphicsInfo(vp);
info.setCustomGraphics(cg);
}
}
use of org.cytoscape.graph.render.stateful.CustomGraphicsInfo in project cytoscape-impl by cytoscape.
the class DNodeView method setCustomGraphicsSize.
@SuppressWarnings("rawtypes")
private void setCustomGraphicsSize(final VisualProperty<Double> vp, final Double size) {
if (size == null)
return;
final VisualProperty<CyCustomGraphics> parent = DVisualLexicon.getAssociatedCustomGraphicsVP(vp);
if (parent == null)
return;
synchronized (CG_LOCK) {
final CustomGraphicsInfo info = getCustomGraphicsInfo(parent);
info.setSize(size);
}
}
Aggregations