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

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

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


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

public class XlsxComment implements Cloneable
{
   private Xlsx    mParentDoc;

   private String  mAuthor = "Unknown";
   private CellRef mCellRef;
   private SsmlXMLTag  mText;

   //---------------------------------------------------------------------------
   public XlsxComment(Xlsx inParentDoc)
   {
      mParentDoc = inParentDoc;
   }

   //---------------------------------------------------------------------------
   public XlsxComment(String inValue)
   {
      setText(inValue);
   }

   //---------------------------------------------------------------------------
   public XlsxComment setAuthor(String inValue)
   {
      mAuthor = inValue;
      return this;
   }


   //---------------------------------------------------------------------------
   @Override
   public XlsxComment clone()
   {
      XlsxComment cloneObj;
      try
      {
         cloneObj = (XlsxComment) super.clone();
      }
      catch (CloneNotSupportedException e)
      {
         throw new RuntimeException(e);
      }

      return cloneObj;
   }

   //---------------------------------------------------------------------------
   public String getAuthor()
   {
      return mAuthor;
   }

   //---------------------------------------------------------------------------
   public XlsxComment setCellRef(CellRef inValue)
   {
      mCellRef = inValue;
      return this;
   }

   //---------------------------------------------------------------------------
   public CellRef getCellRef()
   {
      return mCellRef;
   }

   //---------------------------------------------------------------------------
   public XlsxComment setText(String inValue)
   {
      mText = new SsmlTextRun(mParentDoc).setText(inValue);
      return this;
   }

   //---------------------------------------------------------------------------
   public XlsxComment setText(SsmlTextRun inValue)
   {
      mText = inValue;
      return this;
   }

   //---------------------------------------------------------------------------
   public SsmlXMLTag getText()
   {
      return mText;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy