Example usage for org.jfree.data SelectableValue setSelected

List of usage examples for org.jfree.data SelectableValue setSelected

Introduction

In this page you can find the example usage for org.jfree.data SelectableValue setSelected.

Prototype

public void setSelected(boolean selected) 

Source Link

Document

Sets the selection state.

Usage

From source file:org.jfree.data.pie.DefaultPieDataset.java

public void setSelected(Comparable key, boolean selected, boolean notify) {
    SelectableValue item = (SelectableValue) this.data.getObject(key);
    item.setSelected(selected);
    if (notify) {
        fireSelectionEvent();/*  w  w  w.j a v a2  s.  c om*/
    }
}

From source file:org.jfree.data.pie.DefaultPieDataset.java

public void clearSelection() {
    int itemCount = getItemCount();
    for (int i = 0; i < itemCount; i++) {
        SelectableValue item = (SelectableValue) this.data.getObject(i);
        item.setSelected(false);
    }//from  w  w w  .  j a  v a2  s . co m
    fireSelectionEvent();
}