Examples of Section


Examples of com.lowagie.text.Section

                }
                case Element.SECTION:
                case Element.CHAPTER: {
                    // Chapters and Sections only differ in their constructor
                    // so we cast both to a Section
                    Section section = (Section) element;
                    PdfPageEvent pageEvent = writer.getPageEvent();
                   
                    boolean hasTitle = section.isNotAddedYet()
                      && section.getTitle() != null;
                   
                    // if the section is a chapter, we begin a new page
                    if (section.isTriggerNewPage()) {
                        newPage();
                    }

                    if (hasTitle) {
                      float fith = indentTop() - currentHeight;
                      int rotation = pageSize.getRotation();
                      if (rotation == 90 || rotation == 180)
                        fith = pageSize.getHeight() - fith;
                      PdfDestination destination = new PdfDestination(PdfDestination.FITH, fith);
                      while (currentOutline.level() >= section.getDepth()) {
                        currentOutline = currentOutline.parent();
                      }
                      PdfOutline outline = new PdfOutline(currentOutline, destination, section.getBookmarkTitle(), section.isBookmarkOpen());
                      currentOutline = outline;
                    }
                   
                    // some values are set
                    carriageReturn();
                    indentation.sectionIndentLeft += section.getIndentationLeft();
                    indentation.sectionIndentRight += section.getIndentationRight();
     
                    if (section.isNotAddedYet() && pageEvent != null)
                        if (element.type() == Element.CHAPTER)
                            pageEvent.onChapter(writer, this, indentTop() - currentHeight, section.getTitle());
                        else
                            pageEvent.onSection(writer, this, indentTop() - currentHeight, section.getDepth(), section.getTitle());
                   
                    // the title of the section (if any has to be printed)
                    if (hasTitle) {
                        isSectionTitle = true;
                        add(section.getTitle());
                        isSectionTitle = false;
                    }
                    indentation.sectionIndentLeft += section.getIndentation();
                    // we process the section
                    element.process(this);
                    flushLines();
                    // some parameters are set back to normal again
                    indentation.sectionIndentLeft -= (section.getIndentationLeft() + section.getIndentation());
                    indentation.sectionIndentRight -= section.getIndentationRight();

                    if (section.isComplete() && pageEvent != null)
                        if (element.type() == Element.CHAPTER)
                            pageEvent.onChapterEnd(writer, this, indentTop() - currentHeight);
                        else
                            pageEvent.onSectionEnd(writer, this, indentTop() - currentHeight);
View Full Code Here

Examples of com.redhat.ceylon.common.tools.help.Markdown.Section

                "\n" +
                "A sentence\n" +
                "\n");
        List<Section> sections = Markdown.extractSections(doc);
        Assert.assertEquals(3, sections.size());
        Section section = sections.get(0);
        Assert.assertNull(section.getHeading());
        Document sectionBody = section.getDoc();
        Assert.assertEquals("<p>Some stuff</p>", html(sectionBody).trim());
       
        section = sections.get(1);
        Assert.assertEquals("<h1> First <code>H1</code></h1>",
                html(section.getHeading()).trim());
        sectionBody = section.getDoc();
        Assert.assertEquals(""+
"<p>A sentence</p>\n"+
"\n"+
"<h2> <code>H2</code> under first <code>H1</code></h2>\n"+
"\n"+
"<p>A sentence</p>", html(sectionBody).trim());
       
        section = sections.get(2);
        Assert.assertEquals("<h1> Second <code>H1</code></h1>",
                html(section.getHeading()).trim());
        sectionBody = section.getDoc();
        Assert.assertEquals(""+
"<p>A sentence</p>\n"+
"\n"+
"<h2> <code>H2</code> under second <code>H1</code></h2>\n"+
"\n"+
View Full Code Here

Examples of com.thoughtworks.example.domain.Section

  @Test
  public void shouldCreateEntityBasedOnAnnotation() throws ExcelParsingException {
    List<Section> entityList = parser.createEntity(sheet, sheetName, Section.class);
    assertEquals(1, entityList.size());
    Section section = entityList.get(0);
    assertEquals("IV", section.getYear());
    assertEquals("B", section.getSection());
    assertEquals(3, section.getStudents().size());
   
    assertEquals(2001L, section.getStudents().get(0).getRoleNumber().longValue());
    assertEquals("Adam", section.getStudents().get(0).getName());
    SimpleDateFormat simpleDateFormat= new SimpleDateFormat("dd/MM/yyyy");
    assertEquals("01/01/2002", simpleDateFormat.format(section.getStudents().get(0).getDateOfBirth()));
    assertEquals("A", section.getStudents().get(0).getFatherName());
    assertEquals("D", section.getStudents().get(0).getMotherName());
    assertEquals("XYZ", section.getStudents().get(0).getAddress());
    assertNull(section.getStudents().get(0).getTotalScore());
  }
View Full Code Here

Examples of de.filiadata.lucene.spider.generated.msoffice2000.word.Section

      // iterate through the sections
      StringBuffer content = new StringBuffer(DEFAULT_BUFFER_SIZE);
      Sections sections = doc.getSections();
      for (int i = 1; i <= sections.getCount(); i++) {
        Section sec = sections.item(i);

        // Get the header of the first section as title
        if (i == 1) {
          int headerFirstPage = WdHeaderFooterIndex.wdHeaderFooterFirstPage;
          HeaderFooter firstHeader = sec.getHeaders().item(headerFirstPage);
          String title = firstHeader.getRange().getText();
          setTitle(title);
        }

        // Get the text
        sec.getRange().select();
        content.append(getSelection(mWordApplication) + "\n");
      }

      // iterate through the shapes
      Shapes shapes = doc.getShapes();
View Full Code Here

Examples of ds.moteur.route.Section

  public void load(DataInputStream dis) throws IOException {
    //Reconstitution des sections
    int nSections = dis.readShort();
    for(int i=0; i<nSections; i++){
      Section section = new Section();;
      section.load(dis);
      this.addSection(section);
    }
   
    //Reconstitution des connexions entre sections
    for(int i=0; i<nSections; i++){
      int nConnexions = dis.readShort();
      for(int j=0; j<nConnexions; j++){
        int index = dis.readShort();
        sections.get(i).addConnexion(sections.get(index));
      }
    }
    this.etablirConnexion();
   
    //Reconstitution des points d'insertion
    int nInsertions = dis.readShort();
    for(int i=0; i<nInsertions; i++){
      int indexSection = dis.readShort();
      Section section = sections.get(indexSection);
      int indexEntree = dis.readShort();
      PointEntree entree = section.getEntrees().get(indexEntree);
      this.addInsertion(entree);
    }
  }
View Full Code Here

Examples of eu.hansolo.enzo.common.Section

        series.getData().add(new XYChart.Data("17:00", 30.05));
        series.getData().add(new XYChart.Data("18:00", 31.25));

        chart = new SimpleLineChart();
        chart.setSections(new Section[]{
            new Section(0, 10),
            new Section(10, 15),
            new Section(15, 25),
            new Section(25, 30),
            new Section(30, 40)
        });
        chart.getStyleClass().addAll(SimpleLineChart.STYLE_CLASS_BLUE_TO_RED_5);
        chart.setSectionRangeVisible(true);
        chart.setUnit("°C");
        chart.setSeries(series);
View Full Code Here

Examples of fr.soleil.lib.flyscan.model.parsing.configuration.section.Section

        component.setBorder(BorderFactory.createLineBorder(Color.red));
    }

    protected String getErrorLocation(Entry entry, EntryContainer entryContainer) {
        FSObject fsObject = null;
        Section section = null;
        if (entryContainer instanceof FSObject) {
            fsObject = (FSObject) entryContainer;
            final EntryContainer fsObjectParent = ((FSObject) entryContainer).getParent();
            if (fsObjectParent instanceof Section) {
                section = (Section) fsObjectParent;
View Full Code Here

Examples of gov.nysenate.openleg.model.Section

                logger.error("Unable to parse relDate for supplement=" + xmlSupp.getId(),e);
            }
        }

        if (xmlSupp.getSections()!=null) {
            Section section = null;

            // Get the existing set of sections if available.
            if (supplemental.getSections() == null)
                supplemental.setSections(new ArrayList<Section>());
            List<Section> sections = supplemental.getSections();
View Full Code Here

Examples of info.textgrid.lab.noteeditor.mei2013.Section

    Body body = new Body();
    Mdiv mdiv = new Mdiv();
    Score score = new Score();
    ScoreDef scoreDef = createScoreDef(stavesCount);
    score.getGapsAndSbsAndCorrs().add(scoreDef);
    Section section = new Section();
    Measure measureFirst = new Measure();
    Staff staffFirst = new Staff();
    Layer layerFirst = new Layer();
    staffFirst.getSbsAndSymbolsAndOrigs().add(layerFirst);
    measureFirst.getAnnotsAndSlursAndTupletSpen().add(staffFirst);
    for (int stavesIter = 1; stavesIter < stavesCount; stavesIter++) {
      Staff staff = new Staff();
      Layer layer = new Layer();
      staff.getSbsAndSymbolsAndOrigs().add(layer);
      measureFirst.getAnnotsAndSlursAndTupletSpen().add(staff);
    }
    section.getUnclearsAndSbsAndApps().add(measureFirst);

    for (int measureIter = 1; measureIter < measureCount; measureIter++) {
      Measure measure = new Measure();
      for (int stavesIter = 0; stavesIter < stavesCount; stavesIter++) {
        Staff staff = new Staff();
        Layer layer = new Layer();
        staff.getSbsAndSymbolsAndOrigs().add(layer);
        measure.getAnnotsAndSlursAndTupletSpen().add(staff);
      }
      section.getUnclearsAndSbsAndApps().add(measure);
    }
    score.getGapsAndSbsAndCorrs().add(section);
    mdiv.setScore(score);
    body.getMdivs().add(mdiv);
    music.setBody(body);
View Full Code Here

Examples of jimm.datavision.Section

    // Copy of field's bounds
    origBounds =
  new jimm.datavision.field.Rectangle(b.x, b.y, b.width, b.height);

    // Section's bounding rectangle
    Section sect = fw.getSectionWidget().getSection();
    sectionBounds = new java.awt.Rectangle(0, 0, (int)sect.getWidth(),
             (int)sect.getMinHeight());

    // Field's bounds in screen coordinates
    java.awt.Point screenPos = fw.getComponent().getLocationOnScreen();
    screenBounds = new java.awt.Rectangle(screenPos.x, screenPos.y,
            (int)b.width, (int)b.height);
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.