2015-02-05 12:00:08 -05:00
|
|
|
/* ====================================================================
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
==================================================================== */
|
|
|
|
|
|
|
|
package org.apache.poi.wp.usermodel;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This class represents a run of text that share common properties.
|
|
|
|
*/
|
2015-02-05 12:35:09 -05:00
|
|
|
public interface CharacterRun {
|
2015-09-28 19:16:58 -04:00
|
|
|
boolean isBold();
|
|
|
|
void setBold(boolean bold);
|
2015-02-05 12:00:08 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
boolean isItalic();
|
|
|
|
void setItalic(boolean italic);
|
2015-02-05 12:00:08 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
boolean isSmallCaps();
|
|
|
|
void setSmallCaps(boolean smallCaps);
|
2015-02-05 12:00:08 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
boolean isCapitalized();
|
|
|
|
void setCapitalized(boolean caps);
|
2015-02-05 12:00:08 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
boolean isStrikeThrough();
|
|
|
|
void setStrikeThrough(boolean strike);
|
|
|
|
boolean isDoubleStrikeThrough();
|
|
|
|
void setDoubleStrikethrough(boolean dstrike);
|
2015-02-05 12:00:08 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
boolean isShadowed();
|
|
|
|
void setShadow(boolean shadow);
|
2015-02-05 12:00:08 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
boolean isEmbossed();
|
|
|
|
void setEmbossed(boolean emboss);
|
2015-02-05 12:00:08 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
boolean isImprinted();
|
|
|
|
void setImprinted(boolean imprint);
|
2015-02-05 12:00:08 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
int getFontSize();
|
|
|
|
void setFontSize(int halfPoints);
|
2015-02-05 12:00:08 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
int getCharacterSpacing();
|
|
|
|
void setCharacterSpacing(int twips);
|
2015-02-05 12:00:08 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
int getKerning();
|
|
|
|
void setKerning(int kern);
|
2015-11-05 10:15:36 -05:00
|
|
|
|
|
|
|
boolean isHighlighted();
|
|
|
|
|
|
|
|
// HWPF has colour indexes, XWPF has a highlight enum with the colours in
|
|
|
|
// byte getHighlightedColor();
|
|
|
|
// void setHighlighted(byte color);
|
|
|
|
|
|
|
|
// HWPF has colour indexes, XWPF colour names
|
|
|
|
// int getColor();
|
|
|
|
// void setColor(int color);
|
|
|
|
|
2015-02-05 12:35:09 -05:00
|
|
|
|
2015-11-05 10:15:36 -05:00
|
|
|
/**
|
|
|
|
* Gets the fonts which shall be used to display the text contents of
|
|
|
|
* this run. Specifies a font which shall be used to format all "normal"
|
|
|
|
* characters in the run
|
|
|
|
*
|
|
|
|
* @return a string representing the font
|
|
|
|
*/
|
2015-09-28 19:16:58 -04:00
|
|
|
String getFontName();
|
2015-02-05 12:35:09 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return The text of the run, including any tabs/spaces/etc
|
|
|
|
*/
|
2015-09-28 19:16:58 -04:00
|
|
|
String text();
|
2015-02-05 12:35:09 -05:00
|
|
|
|
2015-02-05 12:25:02 -05:00
|
|
|
// HWPF uses indexes, XWPF special
|
2015-09-28 19:16:58 -04:00
|
|
|
// int getUnderlineCode();
|
|
|
|
// void setUnderlineCode(int kul);
|
2015-02-05 12:00:08 -05:00
|
|
|
|
2015-02-05 12:25:02 -05:00
|
|
|
// HWPF uses indexes, XWPF special vertical alignments
|
2015-09-28 19:16:58 -04:00
|
|
|
// short getSubSuperScriptIndex();
|
|
|
|
// void setSubSuperScriptIndex(short iss);
|
2015-02-05 12:00:08 -05:00
|
|
|
|
2015-02-05 12:35:09 -05:00
|
|
|
// TODO Review these, and add to XWPFRun if possible
|
|
|
|
/*
|
2015-09-28 19:16:58 -04:00
|
|
|
boolean isFldVanished();
|
|
|
|
void setFldVanish(boolean fldVanish);
|
2015-02-05 12:35:09 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
boolean isOutlined();
|
|
|
|
void setOutline(boolean outlined);
|
2015-02-05 12:35:09 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
boolean isVanished();
|
|
|
|
void setVanished(boolean vanish);
|
2015-02-05 12:00:08 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
boolean isMarkedDeleted();
|
|
|
|
void markDeleted(boolean mark);
|
2015-02-05 12:35:09 -05:00
|
|
|
|
2015-09-28 19:16:58 -04:00
|
|
|
boolean isMarkedInserted();
|
|
|
|
void markInserted(boolean mark);
|
2015-02-05 12:35:09 -05:00
|
|
|
*/
|
2015-02-05 12:00:08 -05:00
|
|
|
}
|