@Override public void execute() { if (canExecute()) { for (ICopyable n : list) ((ANode) n).setCut(true); Clipboard.getDefault().setContents(list); } }
public static MElementDataset getChartDataset( ANode parent, JRChartDataset jrObject, int newIndex) { if (jrObject == null) return null; if (parent instanceof MChart) { JRDesignChart chart = (JRDesignChart) parent.getValue(); if (chart.getChartType() == JRDesignChart.CHART_TYPE_MULTI_AXIS) return null; } if (jrObject instanceof JRDesignCategoryDataset) return new MChartCategoryDataset( parent, (JRDesignCategoryDataset) jrObject, parent.getJasperDesign()); if (jrObject instanceof JRDesignGanttDataset) return new MChartGanttDataset( parent, (JRDesignGanttDataset) jrObject, parent.getJasperDesign()); if (jrObject instanceof JRDesignHighLowDataset) return new MChartHighLowDataset( parent, (JRDesignHighLowDataset) jrObject, parent.getJasperDesign()); if (jrObject instanceof JRDesignPieDataset) return new MChartPieDataset(parent, (JRDesignPieDataset) jrObject, parent.getJasperDesign()); if (jrObject instanceof JRDesignTimePeriodDataset) return new MChartTimePeriodDataset( parent, (JRDesignTimePeriodDataset) jrObject, parent.getJasperDesign()); if (jrObject instanceof JRDesignTimeSeriesDataset) return new MChartTimeSeriesDataset( parent, (JRDesignTimeSeriesDataset) jrObject, parent.getJasperDesign()); if (jrObject instanceof JRDesignValueDataset) return new MChartValueDataset( parent, (JRDesignValueDataset) jrObject, parent.getJasperDesign()); if (jrObject instanceof JRDesignXyDataset) return new MChartXYDataset(parent, (JRDesignXyDataset) jrObject, parent.getJasperDesign()); if (jrObject instanceof JRDesignXyzDataset) return new MChartXYZDataset(parent, (JRDesignXyzDataset) jrObject, parent.getJasperDesign()); return new MChartDataset(parent, jrObject, parent.getJasperDesign()); }