add @Override annotations

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748491 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2016-06-15 04:08:56 +00:00
parent aeddbc05e4
commit ff3ccad347

View File

@ -46,6 +46,7 @@ public class XSSFFontFormatting implements FontFormatting {
* @see #SS_SUPER * @see #SS_SUPER
* @see #SS_SUB * @see #SS_SUB
*/ */
@Override
public short getEscapementType(){ public short getEscapementType(){
if(_font.sizeOfVertAlignArray() == 0) return SS_NONE; if(_font.sizeOfVertAlignArray() == 0) return SS_NONE;
@ -61,6 +62,7 @@ public class XSSFFontFormatting implements FontFormatting {
* @see #SS_SUPER * @see #SS_SUPER
* @see #SS_SUB * @see #SS_SUB
*/ */
@Override
public void setEscapementType(short escapementType){ public void setEscapementType(short escapementType){
_font.setVertAlignArray(null); _font.setVertAlignArray(null);
if(escapementType != SS_NONE){ if(escapementType != SS_NONE){
@ -71,6 +73,7 @@ public class XSSFFontFormatting implements FontFormatting {
/** /**
* @return font color index * @return font color index
*/ */
@Override
public short getFontColorIndex(){ public short getFontColorIndex(){
if(_font.sizeOfColorArray() == 0) return -1; if(_font.sizeOfColorArray() == 0) return -1;
@ -83,6 +86,7 @@ public class XSSFFontFormatting implements FontFormatting {
/** /**
* @param color font color index * @param color font color index
*/ */
@Override
public void setFontColorIndex(short color){ public void setFontColorIndex(short color){
_font.setColorArray(null); _font.setColorArray(null);
if(color != -1){ if(color != -1){
@ -90,12 +94,14 @@ public class XSSFFontFormatting implements FontFormatting {
} }
} }
@Override
public XSSFColor getFontColor() { public XSSFColor getFontColor() {
if(_font.sizeOfColorArray() == 0) return null; if(_font.sizeOfColorArray() == 0) return null;
return new XSSFColor(_font.getColorArray(0)); return new XSSFColor(_font.getColorArray(0));
} }
@Override
public void setFontColor(Color color) { public void setFontColor(Color color) {
XSSFColor xcolor = XSSFColor.toXSSFColor(color); XSSFColor xcolor = XSSFColor.toXSSFColor(color);
if (xcolor == null) { if (xcolor == null) {
@ -117,6 +123,7 @@ public class XSSFFontFormatting implements FontFormatting {
* *
* @return fontheight (in points/20); or -1 if not modified * @return fontheight (in points/20); or -1 if not modified
*/ */
@Override
public int getFontHeight(){ public int getFontHeight(){
if(_font.sizeOfSzArray() == 0) return -1; if(_font.sizeOfSzArray() == 0) return -1;
@ -129,6 +136,7 @@ public class XSSFFontFormatting implements FontFormatting {
* *
* @param height the height in twips (in points/20) * @param height the height in twips (in points/20)
*/ */
@Override
public void setFontHeight(int height){ public void setFontHeight(int height){
_font.setSzArray(null); _font.setSzArray(null);
if(height != -1){ if(height != -1){
@ -147,6 +155,7 @@ public class XSSFFontFormatting implements FontFormatting {
* @see #U_SINGLE_ACCOUNTING * @see #U_SINGLE_ACCOUNTING
* @see #U_DOUBLE_ACCOUNTING * @see #U_DOUBLE_ACCOUNTING
*/ */
@Override
public short getUnderlineType(){ public short getUnderlineType(){
if(_font.sizeOfUArray() == 0) return U_NONE; if(_font.sizeOfUArray() == 0) return U_NONE;
CTUnderlineProperty u = _font.getUArray(0); CTUnderlineProperty u = _font.getUArray(0);
@ -170,6 +179,7 @@ public class XSSFFontFormatting implements FontFormatting {
* @see #U_SINGLE_ACCOUNTING * @see #U_SINGLE_ACCOUNTING
* @see #U_DOUBLE_ACCOUNTING * @see #U_DOUBLE_ACCOUNTING
*/ */
@Override
public void setUnderlineType(short underlineType){ public void setUnderlineType(short underlineType){
_font.setUArray(null); _font.setUArray(null);
if(underlineType != U_NONE){ if(underlineType != U_NONE){
@ -184,6 +194,7 @@ public class XSSFFontFormatting implements FontFormatting {
* *
* @return bold - whether the font is bold or not * @return bold - whether the font is bold or not
*/ */
@Override
public boolean isBold(){ public boolean isBold(){
return _font.sizeOfBArray() == 1 && _font.getBArray(0).getVal(); return _font.sizeOfBArray() == 1 && _font.getBArray(0).getVal();
} }
@ -191,6 +202,7 @@ public class XSSFFontFormatting implements FontFormatting {
/** /**
* @return true if font style was set to <i>italic</i> * @return true if font style was set to <i>italic</i>
*/ */
@Override
public boolean isItalic(){ public boolean isItalic(){
return _font.sizeOfIArray() == 1 && _font.getIArray(0).getVal(); return _font.sizeOfIArray() == 1 && _font.getIArray(0).getVal();
} }
@ -201,6 +213,7 @@ public class XSSFFontFormatting implements FontFormatting {
* @param italic - if true, set posture style to italic, otherwise to normal * @param italic - if true, set posture style to italic, otherwise to normal
* @param bold if true, set font weight to bold, otherwise to normal * @param bold if true, set font weight to bold, otherwise to normal
*/ */
@Override
public void setFontStyle(boolean italic, boolean bold){ public void setFontStyle(boolean italic, boolean bold){
_font.setIArray(null); _font.setIArray(null);
_font.setBArray(null); _font.setBArray(null);
@ -211,6 +224,7 @@ public class XSSFFontFormatting implements FontFormatting {
/** /**
* set font style options to default values (non-italic, non-bold) * set font style options to default values (non-italic, non-bold)
*/ */
@Override
public void resetFontStyle(){ public void resetFontStyle(){
_font.set(CTFont.Factory.newInstance()); _font.set(CTFont.Factory.newInstance());
} }