Package org.pentaho.reporting.engine.classic.core

Examples of org.pentaho.reporting.engine.classic.core.Band.addElement()


              return false;
            }
          }
        }

        target.addElement(element);
        return element;
      }
      catch (CloneNotSupportedException e1)
      {
        UncaughtExceptionsModel.getInstance().addException(e1);
View Full Code Here


    {
      final Element visualReportElement = parentBand.getElement(i);
      if (element == visualReportElement)
      {
        parentBand.removeElement(visualReportElement);
        parentBand.addElement(0, visualReportElement);

        return new CompoundUndoEntry
                (new ElementEditUndoEntry(parentBand.getObjectID(), i, visualReportElement, null),
                        new ElementEditUndoEntry(parentBand.getObjectID(), 0, null,
                                visualReportElement));
View Full Code Here

      final ReportDocumentContext context = getActiveContext();
      final UndoManager undo = context.getUndo();
      undo.addChange(ActionMessages.getString("InsertElementAction.UndoName"),
          new ElementEditUndoEntry(band.getObjectID(), band.getElementCount(), null, visualElement));
      band.addElement(visualElement);
    }
    catch (Exception ex)
    {
      UncaughtExceptionsModel.getInstance().addException(ex);
    }
View Full Code Here

    {
      final Element visualReportElement = parentBand.getElement(i);
      if (element == visualReportElement)
      {
        parentBand.removeElement(visualReportElement);
        parentBand.addElement(i - 1, visualReportElement);
        return new CompoundUndoEntry
            (new ElementEditUndoEntry(parentBand.getObjectID(), i, visualReportElement, null),
                new ElementEditUndoEntry(parentBand.getObjectID(), i - 1, null, visualReportElement));
      }
    }
View Full Code Here

    {
      final Element visualReportElement = reportElement.getElement(i);
      if (element == visualReportElement)
      {
        reportElement.removeElement(visualReportElement);
        reportElement.addElement(i + 1, visualReportElement);

        return new CompoundUndoEntry
            (new ElementEditUndoEntry(reportElement.getObjectID(), i, visualReportElement, null),
                new ElementEditUndoEntry(reportElement.getObjectID(), i + 1, null, visualReportElement));
      }
View Full Code Here

    {
      final Element visualReportElement = reportElement.getElement(i);
      if (element == visualReportElement)
      {
        reportElement.removeElement(visualReportElement);
        reportElement.addElement(visualReportElement);

        return new CompoundUndoEntry
            (new ElementEditUndoEntry(reportElement.getObjectID(), i, visualReportElement, null),
                new ElementEditUndoEntry(reportElement.getObjectID(), reportElement.getElementCount() - 1, null, visualReportElement));
      }
View Full Code Here

    {
      elementById.removeElement(newElement);
    }
    if (oldElement != null)
    {
      elementById.addElement(position, oldElement);
    }
  }

  public void redo(final ReportDocumentContext renderContext)
  {
View Full Code Here

    {
      elementById.removeElement(oldElement);
    }
    if (newElement != null)
    {
      elementById.addElement(position, newElement);
    }
  }

  public UndoEntry merge(final UndoEntry newEntry)
  {
View Full Code Here

    tableCell1.setAttribute(AttributeNames.Table.NAMESPACE, AttributeNames.Table.ROWSPAN, Integer.valueOf(2));
    final Band tableCell2 = TableTestUtil.createCell(0, 1, 100, 20, TableTestUtil.createDataItem("Text2", 100, 20));

    final Band tableRow = new Band();
    tableRow.setLayout(BandStyleKeys.LAYOUT_TABLE_ROW);
    tableRow.addElement(tableCell1);
    tableRow.addElement(tableCell2);

    final Band tableCell3 = TableTestUtil.createCell(1, 1, 100, 20, TableTestUtil.createDataItem("Text3", 100, 20));
    final Band tableRow2 = new Band();
    tableRow2.setLayout(BandStyleKeys.LAYOUT_TABLE_ROW);
View Full Code Here

    final Band tableCell2 = TableTestUtil.createCell(0, 1, 100, 20, TableTestUtil.createDataItem("Text2", 100, 20));

    final Band tableRow = new Band();
    tableRow.setLayout(BandStyleKeys.LAYOUT_TABLE_ROW);
    tableRow.addElement(tableCell1);
    tableRow.addElement(tableCell2);

    final Band tableCell3 = TableTestUtil.createCell(1, 1, 100, 20, TableTestUtil.createDataItem("Text3", 100, 20));
    final Band tableRow2 = new Band();
    tableRow2.setLayout(BandStyleKeys.LAYOUT_TABLE_ROW);
    tableRow2.addElement(tableCell3);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.