Search in sources :

Example 1 with RadialGradientPaintFactory

use of org.cytoscape.ding.customgraphics.paint.RadialGradientPaintFactory in project cytoscape-impl by cytoscape.

the class GradientOvalLayer method update.

public void update() {
    // First, remove all layers.
    layers.clear();
    shape = new Ellipse2D.Double(-width / 2, -height / 2, width, height);
    paintFactory = new RadialGradientPaintFactory(colorList, stopList);
    final CustomGraphicLayer cg = new PaintCustomGraphic(shape, paintFactory);
    layers.add(cg);
}
Also used : CustomGraphicLayer(org.cytoscape.view.presentation.customgraphics.CustomGraphicLayer) RadialGradientPaintFactory(org.cytoscape.ding.customgraphics.paint.RadialGradientPaintFactory) Ellipse2D(java.awt.geom.Ellipse2D)

Aggregations

Ellipse2D (java.awt.geom.Ellipse2D)1 RadialGradientPaintFactory (org.cytoscape.ding.customgraphics.paint.RadialGradientPaintFactory)1 CustomGraphicLayer (org.cytoscape.view.presentation.customgraphics.CustomGraphicLayer)1