Java 类net.sf.jasperreports.engine.base.JRBaseChartPlot.JRBaseSeriesColor 实例源码

项目:PDFReporter-Studio    文件:SeriesColorPage.java   
public Collection<JRBaseSeriesColor> getValue() {
    List<JRBaseSeriesColor> lst = new ArrayList<JRBaseSeriesColor>();
    int i = 0;
    for (SeriesColorDTO p : value)
        lst.add(new JRBaseSeriesColor(i++, p.getValue()));
    return lst;
}
项目:PDFReporter-Studio    文件:SeriesColorPage.java   
public void setValue(SortedSet<JRBaseSeriesColor> val) {
    value = new ArrayList<SeriesColorDTO>();
    if (val != null) {
        for (JRBaseSeriesColor bs : val)
            value.add(new SeriesColorDTO(bs.getColor()));
    }
    if (table != null)
        fillTable(table);
}
项目:PDFReporter-Studio    文件:SeriesColorCellEditor.java   
@SuppressWarnings("unchecked")
@Override
protected Object openDialogBox(Control cellEditorWindow) {
    SeriesColorEditor wizard = new SeriesColorEditor();
    wizard.setValue((SortedSet<JRBaseSeriesColor>) getValue());
    WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(),
            wizard);
    dialog.create();
    if (dialog.open() == Dialog.OK) {
        return wizard.getValue();
    }
    return null;
}
项目:PDFReporter-Studio    文件:SeriesColorEditor.java   
public void setValue(SortedSet<JRBaseSeriesColor> value) {
    if (page0 != null)
        page0.setValue(value);
    this.value = value;
}
项目:PDFReporter-Studio    文件:SeriesColorEditor.java   
@Override
public void addPages() {
    page0 = new SeriesColorPage("SeriesColor"); //$NON-NLS-1$
    page0.setValue((SortedSet<JRBaseSeriesColor>) value);
    addPage(page0);
}
项目:PDFReporter-Studio    文件:SPColorSeries.java   
public void setData(APropertyNode pnode, Object b) {
    series = (SortedSet<JRBaseSeriesColor>) b;
    SeriesColorPropertyDescriptor pd = (SeriesColorPropertyDescriptor) pDescriptor;
    ftext.setText(pd.getLabelProvider().getText(series));
}
项目:ireport-fork    文件:SeriesColorsProperty.java   
public static boolean isListChanged(List values, SortedSet originalValues)
{
        if (values == null && originalValues == null)
        {
            return false;
        }

        if (values != null && originalValues != null)
        {
            // Check if the colors are the same...
            List l1 = values;
            List l2 = sortedSetAsList(originalValues);

            boolean areEq = true;
            if (l1.size() != l2.size())
            {
                areEq = false;
            }
            if (areEq)
            {
                for (int i=0; areEq && i<l1.size(); ++i)
                {
                    if (l1.get(i) instanceof JRBaseSeriesColor && l2.get(i) instanceof JRBaseSeriesColor)
                    {
                        JRBaseSeriesColor c1 = (JRBaseSeriesColor)l1.get(i);
                        JRBaseSeriesColor c2 = (JRBaseSeriesColor)l2.get(i);

                        if (c1 == null || c2 == null)
                        {
                            if (c1 != c2)
                            {
                                areEq = false;
                            }
                        }
                        else
                        {
                            if (c1.getSeriesOrder() != c2.getSeriesOrder())
                            {
                                areEq = false;
                            }
                            else if (c1.getColor() != c2.getColor() || (c1.getColor() != null && !c1.getColor().equals(c2.getColor()))  )
                            {
                                areEq = false;
                            }
                        }


                    }
                    else if (!(l1.get(i).equals(l2.get(i))))
                    {
                        areEq = false;
                    }
                }
            }

            return !areEq;
        }
        return true;
}