Package org.apache.poi.hssf.util

Examples of org.apache.poi.hssf.util.PaneInformation


    public PaneInformation getPaneInformation() {
      PaneRecord rec = (PaneRecord)findFirstRecordBySid(PaneRecord.sid);
      if (rec == null)
        return null;
       
      return new PaneInformation(rec.getX(), rec.getY(), rec.getTopRow(),
                             rec.getLeftColumn(), (byte)rec.getActivePane(), windowTwo.getFreezePanes());     
    }
View Full Code Here


    public PaneInformation getPaneInformation() {
      PaneRecord rec = (PaneRecord)findFirstRecordBySid(PaneRecord.sid);
      if (rec == null)
        return null;

      return new PaneInformation(rec.getX(), rec.getY(), rec.getTopRow(),
                                 rec.getLeftColumn(), (byte)rec.getActivePane(), windowTwo.getFreezePanes());
    }
View Full Code Here

     * @return null if no pane configured, or the pane information.
     */
    public PaneInformation getPaneInformation() {
        CTPane pane = getPane();
        CellReference cellRef = pane.isSetTopLeftCell() ? new CellReference(pane.getTopLeftCell()) : null;
        return new PaneInformation((short)pane.getXSplit(), (short)pane.getYSplit(),
                (short)(cellRef == null ? 0 : cellRef.getRow()),(cellRef == null ? 0 : cellRef.getCol()),
                (byte)pane.getActivePane().intValue(), pane.getState() == STPaneState.FROZEN);
    }
View Full Code Here

        // still null
        assertNull(sheet.getPaneInformation());

        sheet.createFreezePane(2, 3);

        PaneInformation info = sheet.getPaneInformation();


        assertEquals(PaneInformation.PANE_LOWER_RIGHT, info.getActivePane());
        assertEquals(3, info.getHorizontalSplitPosition());
        assertEquals(3, info.getHorizontalSplitTopRow());
        assertEquals(2, info.getVerticalSplitLeftColumn());
        assertEquals(2, info.getVerticalSplitPosition());

        sheet.createFreezePane(0, 0);
        // If both colSplit and rowSplit are zero then the existing freeze pane is removed
        assertNull(sheet.getPaneInformation());

        sheet.createFreezePane(0, 3);

        info = sheet.getPaneInformation();

        assertEquals(PaneInformation.PANE_LOWER_LEFT, info.getActivePane());
        assertEquals(3, info.getHorizontalSplitPosition());
        assertEquals(3, info.getHorizontalSplitTopRow());
        assertEquals(0, info.getVerticalSplitLeftColumn());
        assertEquals(0, info.getVerticalSplitPosition());

        sheet.createFreezePane(3, 0);

        info = sheet.getPaneInformation();

        assertEquals(PaneInformation.PANE_UPPER_RIGHT, info.getActivePane());
        assertEquals(0, info.getHorizontalSplitPosition());
        assertEquals(0, info.getHorizontalSplitTopRow());
        assertEquals(3, info.getVerticalSplitLeftColumn());
        assertEquals(3, info.getVerticalSplitPosition());

        sheet.createFreezePane(0, 0);
        // If both colSplit and rowSplit are zero then the existing freeze pane is removed
        assertNull(sheet.getPaneInformation());
    }
View Full Code Here

           }
        }

        // Create the Freeze Pane
        s.createFreezePane(colSplit, rowSplit, leftmostColumn, topRow);
        PaneInformation paneInfo = s.getPaneInformation();

        // Check it
        assertEquals(colSplit,       paneInfo.getVerticalSplitPosition());
        assertEquals(rowSplit,       paneInfo.getHorizontalSplitPosition());
        assertEquals(leftmostColumn, paneInfo.getVerticalSplitLeftColumn());
        assertEquals(topRow,         paneInfo.getHorizontalSplitTopRow());


        // Now a row only freezepane
        s.createFreezePane(0, 3);
        paneInfo = s.getPaneInformation();

        assertEquals(0,  paneInfo.getVerticalSplitPosition());
        assertEquals(3,  paneInfo.getHorizontalSplitPosition());
        assertEquals(0,  paneInfo.getVerticalSplitLeftColumn());
        assertEquals(3,  paneInfo.getHorizontalSplitTopRow());

        // Now a column only freezepane
        s.createFreezePane(4, 0);
        paneInfo = s.getPaneInformation();

        assertEquals(4,  paneInfo.getVerticalSplitPosition());
        assertEquals(0,  paneInfo.getHorizontalSplitPosition());
        assertEquals(4 , paneInfo.getVerticalSplitLeftColumn());
        assertEquals(0,  paneInfo.getHorizontalSplitTopRow());
    }
View Full Code Here

    public PaneInformation getPaneInformation() {
      PaneRecord rec = (PaneRecord)findFirstRecordBySid(PaneRecord.sid);
      if (rec == null)
        return null;

      return new PaneInformation(rec.getX(), rec.getY(), rec.getTopRow(),
                                 rec.getLeftColumn(), (byte)rec.getActivePane(), windowTwo.getFreezePanes());
    }
View Full Code Here

    public PaneInformation getPaneInformation() {
      PaneRecord rec = (PaneRecord)findFirstRecordBySid(PaneRecord.sid);
      if (rec == null)
        return null;

      return new PaneInformation(rec.getX(), rec.getY(), rec.getTopRow(),
                                 rec.getLeftColumn(), (byte)rec.getActivePane(), windowTwo.getFreezePanes());
    }
View Full Code Here

    public PaneInformation getPaneInformation() {
      PaneRecord rec = (PaneRecord)findFirstRecordBySid(PaneRecord.sid);
      if (rec == null)
        return null;

      return new PaneInformation(rec.getX(), rec.getY(), rec.getTopRow(),
                                 rec.getLeftColumn(), (byte)rec.getActivePane(), windowTwo.getFreezePanes());
    }
View Full Code Here

    public PaneInformation getPaneInformation() {
      PaneRecord rec = (PaneRecord)findFirstRecordBySid(PaneRecord.sid);
      if (rec == null)
        return null;

      return new PaneInformation(rec.getX(), rec.getY(), rec.getTopRow(),
                                 rec.getLeftColumn(), (byte)rec.getActivePane(), windowTwo.getFreezePanes());
    }
View Full Code Here

     * @return null if no pane configured, or the pane information.
     */
    public PaneInformation getPaneInformation() {
        CTPane pane = getPane();
        CellReference cellRef = pane.isSetTopLeftCell() ? new CellReference(pane.getTopLeftCell()) : null;
        return new PaneInformation((short)pane.getXSplit(), (short)pane.getYSplit(),
                (short)(cellRef == null ? 0 : cellRef.getRow()),(cellRef == null ? 0 : cellRef.getCol()),
                (byte)pane.getActivePane().intValue(), pane.getState() == STPaneState.FROZEN);
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.util.PaneInformation

Copyright © 2018 www.massapicom. 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.