All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hfg.xml.msofficexml.xlsx.spreadsheetml.SsmlPane Maven / Gradle / Ivy

There is a newer version: 20240423
Show newest version
package com.hfg.xml.msofficexml.xlsx.spreadsheetml;

import com.hfg.util.StringUtil;
import com.hfg.xml.msofficexml.xlsx.CellRef;
import com.hfg.xml.msofficexml.xlsx.Xlsx;

//------------------------------------------------------------------------------
/**
 Represents an Office Open XML worksheet pane (<ssml:pane>) tag.

 @author J. Alex Taylor, hairyfatguy.com
 */
//------------------------------------------------------------------------------
// com.hfg XML/HTML Coding Library
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com
// [email protected]
//------------------------------------------------------------------------------

public class SsmlPane extends SsmlXMLTag
{
   //###########################################################################
   // CONSTRUCTORS
   //###########################################################################

   //---------------------------------------------------------------------------
   public SsmlPane(Xlsx inXlsx)
   {
      super(SsmlXML.PANE, inXlsx);
   }

   //###########################################################################
   // PUBLIC METHODS
   //###########################################################################

   //---------------------------------------------------------------------------
   /**
    Specifies the horizontal split position - the right-most col index of the left pane.
    */
   public SsmlPane setXSplit(int inValue)
   {
      setAttribute(SsmlXML.X_SPLIT_ATT, inValue);
      return this;
   }

   //---------------------------------------------------------------------------
   /**
    Returns the horizontal split position - the right-most col index of the left pane.
    */
   public Integer getXSplit()
   {
      String stringValue = getAttributeValue(SsmlXML.X_SPLIT_ATT);
      Integer value =  null;
      if (StringUtil.isSet(stringValue))
      {
         value = Integer.parseInt(stringValue);
      }

      return value;
   }

   //---------------------------------------------------------------------------
   /**
    Specifies the vertical split position - the bottom-most row index of the top pane.
    */
   public SsmlPane setYSplit(int inValue)
   {
      setAttribute(SsmlXML.Y_SPLIT_ATT, inValue);
      return this;
   }

   //---------------------------------------------------------------------------
   /**
    Returns the vertical split position - the bottom-most row index of the top pane.
    */
   public Integer getYSplit()
   {
      String stringValue = getAttributeValue(SsmlXML.Y_SPLIT_ATT);
      Integer value =  null;
      if (StringUtil.isSet(stringValue))
      {
         value = Integer.parseInt(stringValue);
      }

      return value;
   }

   //---------------------------------------------------------------------------
   /**
    Specifies the top left visible cell.
    */
   public SsmlPane setTopLeftVisibleCell(CellRef inValue)
   {
      setAttribute(SsmlXML.TOP_LEFT_CELL_ATT, inValue);
      return this;
   }

   //---------------------------------------------------------------------------
   /**
    Returns the top left visible cell.
    */
   public CellRef getTopLeftVisibleCell()
   {
      String stringValue = getAttributeValue(SsmlXML.TOP_LEFT_CELL_ATT);
      CellRef value =  null;
      if (StringUtil.isSet(stringValue))
      {
         value = new CellRef(stringValue);
      }

      return value;
   }

   //---------------------------------------------------------------------------
   /**
    Specifies the active portion of the pane.
    */
   public SsmlPane setActivePane(SsmlActivePane inValue)
   {
      setAttribute(SsmlXML.ACTIVE_PANE_ATT, inValue);
      return this;
   }

   //---------------------------------------------------------------------------
   /**
    Returns the active portion of the pane.
    */
   public SsmlActivePane getActivePane()
   {
      String stringValue = getAttributeValue(SsmlXML.ACTIVE_PANE_ATT);
      SsmlActivePane value =  null;
      if (StringUtil.isSet(stringValue))
      {
         value = SsmlActivePane.valueOf(stringValue);
      }

      return value;
   }

   //---------------------------------------------------------------------------
   /**
    Specifies the split state of the pane.
    */
   public SsmlPane setState(SsmlPaneState inValue)
   {
      setAttribute(SsmlXML.STATE_ATT, inValue);
      return this;
   }

   //---------------------------------------------------------------------------
   /**
    Returns the split state of the pane.
    */
   public SsmlPaneState getState()
   {
      String stringValue = getAttributeValue(SsmlXML.STATE_ATT);
      SsmlPaneState value =  null;
      if (StringUtil.isSet(stringValue))
      {
         value = SsmlPaneState.valueOf(stringValue);
      }

      return value;
   }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy