use of org.gephi.utils.sparklines.SparklineComponent in project gephi-plugins-bootcamp by gephi.
the class InteractiveSparkline method execute.
@Override
public void execute() {
// Show interactive sparkline window:
// Dimension is automatically updated by SparklineComponent
SparklineParameters parameters = new SparklineParameters(200, 20, SparklineParameters.DEFAULT_LINE_COLOR, new Color(225, 255, 255), Color.RED, Color.GREEN);
parameters.setHighlightTextColor(SparklineParameters.DEFAULT_TEXT_COLOR);
parameters.setHighlightTextBoxColor(SparklineParameters.DEFAULT_TEXT_BOX_COLOR);
// True makes it interactive to mouse
SparklineComponent sparklineUI = new SparklineComponent(xValues, yValues, parameters, true);
// Initial size
sparklineUI.setPreferredSize(new Dimension(200, 20));
// Using Netbeans RCP Dialogs API:
DialogDescriptor dd = new DialogDescriptor(sparklineUI, column.getTitle());
dd.setModal(false);
// No buttons
dd.setOptions(new Object[0]);
DialogDisplayer.getDefault().createDialog(dd).setVisible(true);
}
Aggregations