FileDocCategorySizeDatePackage
CharacterProperties.javaAPI DocApache Poi 3.0.19544Mon Jan 01 18:55:30 GMT 2007org.apache.poi.hwpf.usermodel

CharacterProperties

public class CharacterProperties extends CHPAbstractType implements Cloneable
author
Ryan Ackley

Fields Summary
public static final short
SPRM_FRMARKDEL
public static final short
SPRM_FRMARK
public static final short
SPRM_FFLDVANISH
public static final short
SPRM_PICLOCATION
public static final short
SPRM_IBSTRMARK
public static final short
SPRM_DTTMRMARK
public static final short
SPRM_FDATA
public static final short
SPRM_SYMBOL
public static final short
SPRM_FOLE2
public static final short
SPRM_HIGHLIGHT
public static final short
SPRM_OBJLOCATION
public static final short
SPRM_ISTD
public static final short
SPRM_FBOLD
public static final short
SPRM_FITALIC
public static final short
SPRM_FSTRIKE
public static final short
SPRM_FOUTLINE
public static final short
SPRM_FSHADOW
public static final short
SPRM_FSMALLCAPS
public static final short
SPRM_FCAPS
public static final short
SPRM_FVANISH
public static final short
SPRM_KUL
public static final short
SPRM_DXASPACE
public static final short
SPRM_LID
public static final short
SPRM_ICO
public static final short
SPRM_HPS
public static final short
SPRM_HPSPOS
public static final short
SPRM_ISS
public static final short
SPRM_HPSKERN
public static final short
SPRM_YSRI
public static final short
SPRM_RGFTCASCII
public static final short
SPRM_RGFTCFAREAST
public static final short
SPRM_RGFTCNOTFAREAST
public static final short
SPRM_CHARSCALE
public static final short
SPRM_FDSTRIKE
public static final short
SPRM_FIMPRINT
public static final short
SPRM_FSPEC
public static final short
SPRM_FOBJ
public static final short
SPRM_PROPRMARK
public static final short
SPRM_FEMBOSS
public static final short
SPRM_SFXTEXT
public static final short
SPRM_DISPFLDRMARK
public static final short
SPRM_IBSTRMARKDEL
public static final short
SPRM_DTTMRMARKDEL
public static final short
SPRM_BRC
public static final short
SPRM_SHD
public static final short
SPRM_IDSIRMARKDEL
public static final short
SPRM_CPG
public static final short
SPRM_NONFELID
public static final short
SPRM_FELID
public static final short
SPRM_IDCTHINT
int
_ico24
Constructors Summary
public CharacterProperties()

 // default to -1 so we can ignore it for word 97 files

   
  
    field_17_fcPic = -1;
    field_22_dttmRMark = new DateAndTime();
    field_23_dttmRMarkDel = new DateAndTime();
    field_36_dttmPropRMark = new DateAndTime();
    field_40_dttmDispFldRMark = new DateAndTime();
    field_41_xstDispFldRMark = new byte[36];
    field_42_shd = new ShadingDescriptor();
    field_43_brc = new BorderCode();
    field_7_hps = 20;
    field_24_istd = 10;
    field_16_wCharScale = 100;
    field_13_lidDefault = 0x0400;
    field_14_lidFE = 0x0400;
  
Methods Summary
public java.lang.Objectclone()

    CharacterProperties cp = (CharacterProperties)super.clone();
    cp.field_22_dttmRMark = (DateAndTime)field_22_dttmRMark.clone();
    cp.field_23_dttmRMarkDel = (DateAndTime)field_23_dttmRMarkDel.clone();
    cp.field_36_dttmPropRMark = (DateAndTime)field_36_dttmPropRMark.clone();
    cp.field_40_dttmDispFldRMark = (DateAndTime)field_40_dttmDispFldRMark.clone();
    cp.field_41_xstDispFldRMark = (byte[])field_41_xstDispFldRMark.clone();
    cp.field_42_shd = (ShadingDescriptor)field_42_shd.clone();

    cp._ico24 = _ico24;

    return cp;
  
public intgetCharacterSpacing()

    return getDxaSpace();
  
public intgetColor()

    return super.getIco();
  
public intgetFontSize()

    return getHps();
  
public intgetIco24()
Get the ico24 field for the CHP record.

    if ( _ico24 == -1 )
    {
      switch(field_11_ico) // convert word 97 colour numbers to 0xBBGGRR value
      {
        case 0: // auto
          return -1;
        case 1: // black
          return 0x000000;
        case 2: // blue
          return 0xFF0000;
        case 3: // cyan
          return 0xFFFF00;
        case 4: // green
          return 0x00FF00;
        case 5: // magenta
          return 0xFF00FF;
        case 6: // red
          return 0x0000FF;
        case 7: // yellow
          return 0x00FFFF;
        case 8: // white
          return 0x0FFFFFF;
        case 9: // dark blue
          return 0x800000;
        case 10: // dark cyan
          return 0x808000;
        case 11: // dark green
          return 0x008000;
        case 12: // dark magenta
          return 0x800080;
        case 13: // dark red
          return 0x000080;
        case 14: // dark yellow
          return 0x008080;
        case 15: // dark grey
          return 0x808080;
        case 16: // light grey
         return 0xC0C0C0;
      }
    }
    return _ico24;
  
public intgetKerning()

    return super.getHpsKern();
  
public shortgetSubSuperScriptIndex()

    return getIss();
  
public intgetUnderlineCode()

    return super.getKul();
  
public intgetVerticalOffset()

    return super.getHpsPos();
  
public booleanisBold()

    return isFBold();
  
public booleanisCapitalized()

    return isFCaps();
  
public booleanisDoubleStrikeThrough()

    return isFDStrike();
  
public booleanisEmbossed()

    return isFEmboss();
  
public booleanisFldVanished()

    return isFFldVanish();
  
public booleanisHighlighted()

    return super.isFHighlight();
  
public booleanisImprinted()

    return isFImprint();
  
public booleanisItalic()

    return isFItalic();
  
public booleanisMarkedDeleted()

    return isFRMarkDel();
  
public booleanisMarkedInserted()

    return isFRMark();
  
public booleanisOutlined()

    return isFOutline();
  
public booleanisShadowed()

    return isFShadow();
  
public booleanisSmallCaps()

    return isFSmallCaps();
  
public booleanisStrikeThrough()

    return isFStrike();
  
public booleanisVanished()

    return isFVanish();
  
public voidmarkDeleted(boolean mark)

    super.setFRMarkDel(mark);
  
public voidmarkInserted(boolean mark)

    super.setFRMark(mark);
  
public voidsetBold(boolean bold)

    super.setFBold(bold);
  
public voidsetCapitalized(boolean caps)

    super.setFCaps(caps);
  
public voidsetCharacterSpacing(int twips)

    super.setDxaSpace(twips);
  
public voidsetColor(int color)

    super.setIco((byte)color);
  
public voidsetDoubleStrikeThrough(boolean dstrike)

    super.setFDStrike(dstrike);
  
public voidsetEmbossed(boolean emboss)

    super.setFEmboss(emboss);
  
public voidsetFldVanish(boolean fldVanish)

    super.setFFldVanish(fldVanish);
  
public voidsetFontSize(int halfPoints)

    super.setHps(halfPoints);
  
public voidsetHighlighted(byte color)

    super.setIcoHighlight(color);
  
public voidsetIco24(int colour24)
Set the ico24 field for the CHP record.

    _ico24 = colour24 & 0xFFFFFF; // only keep the 24bit 0xBBGGRR colour
  
public voidsetImprinted(boolean imprint)

    super.setFImprint(imprint);
  
public voidsetItalic(boolean italic)

    super.setFItalic(italic);
  
public voidsetKerning(int kern)

    super.setHpsKern(kern);
  
public voidsetOutline(boolean outlined)

    super.setFOutline(outlined);
  
public voidsetShadow(boolean shadow)

    super.setFShadow(shadow);

  
public voidsetSmallCaps(boolean smallCaps)

    super.setFSmallCaps(smallCaps);
  
public voidsetSubSuperScriptIndex(short iss)

    super.setDxaSpace(iss);
  
public voidsetUnderlineCode(int kul)

    super.setKul((byte)kul);
  
public voidsetVanished(boolean vanish)

    super.setFVanish(vanish);

  
public voidsetVerticalOffset(int hpsPos)

    super.setHpsPos(hpsPos);
  
public voidstrikeThrough(boolean strike)

    super.setFStrike(strike);