org.simpleods
public class PageStyle extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
STYLE_PAPERFORMAT_A3 |
static int |
STYLE_PAPERFORMAT_A4 |
static int |
STYLE_PAPERFORMAT_A5 |
static int |
STYLE_PAPERFORMAT_LEGAL |
static int |
STYLE_PAPERFORMAT_LETTER |
static int |
STYLE_PAPERFORMAT_USER |
static int |
STYLE_PRINTORIENTATION_HORIZONTAL |
static int |
STYLE_PRINTORIENTATION_VERTICAL |
static int |
STYLE_WRITINGMODE_LR |
static int |
STYLE_WRITINGMODE_LRTB |
static int |
STYLE_WRITINGMODE_PAGE |
static int |
STYLE_WRITINGMODE_RL |
static int |
STYLE_WRITINGMODE_RLTB |
static int |
STYLE_WRITINGMODE_TB |
static int |
STYLE_WRITINGMODE_TBLR |
static int |
STYLE_WRITINGMODE_TBRL |
Constructor and Description |
---|
PageStyle(java.lang.String sName,
OdsFile odsFile)
Create a new page style.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBackgroundColor() |
java.lang.String |
getMarginBottom() |
java.lang.String |
getMarginLeft() |
java.lang.String |
getMarginRight() |
java.lang.String |
getMarginTop() |
java.lang.String |
getName()
Get the name of this page style.
|
java.lang.String |
getPageHeight() |
java.lang.String |
getPageWidth() |
int |
getPaperFormat()
Get the paper format as one of PageStyle.STYLE_PAPERFORMAT_*.
|
int |
getWritingMode()
Get the writing mode
. |
void |
setAllMargins(java.lang.String margin)
Set the margin at the top,bottom,left and right.
|
void |
setBackgroundColor(java.lang.String sColor)
Set the background color to sColor, a six-digit hex value.
|
void |
setMarginBottom(java.lang.String margin)
Set the margin at the bottom.
|
void |
setMarginLeft(java.lang.String margin)
Set the margin at the left.
|
void |
setMarginRight(java.lang.String margin)
Set the margin at the right.
|
void |
setMarginTop(java.lang.String margin)
Set the margin at the top.
|
void |
setPageHeight(java.lang.String pageHeight)
Set the page height.
|
void |
setPageWidth(java.lang.String pageWidth)
Set the page width.
|
void |
setPaperFormat(int nPaperFormat)
Set the paper format to one of
PageStyle.STYLE_PAPERFORMAT_A3 PageStyle.STYLE_PAPERFORMAT_A4 PageStyle.STYLE_PAPERFORMAT_A5 PageStyle.STYLE_PAPERFORMAT_LETTER PageStyle.STYLE_PAPERFORMAT_LEGAL PageStyle.STYLE_PAPERFORMAT_USER , automatically used if you use setPageHeight() or setPageWidth(). |
void |
setPrintOrientationHorizontal() |
void |
setPrintOrientationVertical() |
void |
setWritingMode(int writingMode)
Set the writing mode to one of
STYLE_WRITINGMODE_LRTB lr-tb (left to right; top to bottom) STYLE_WRITINGMODE_RLTB STYLE_WRITINGMODE_TBRL STYLE_WRITINGMODE_TBLR STYLE_WRITINGMODE_LR STYLE_WRITINGMODE_RL STYLE_WRITINGMODE_TB STYLE_WRITINGMODE_PAGE |
public static final int STYLE_PAPERFORMAT_A3
public static final int STYLE_PAPERFORMAT_A4
public static final int STYLE_PAPERFORMAT_A5
public static final int STYLE_PAPERFORMAT_LETTER
public static final int STYLE_PAPERFORMAT_LEGAL
public static final int STYLE_PAPERFORMAT_USER
public static final int STYLE_PRINTORIENTATION_VERTICAL
public static final int STYLE_PRINTORIENTATION_HORIZONTAL
public static final int STYLE_WRITINGMODE_LRTB
public static final int STYLE_WRITINGMODE_RLTB
public static final int STYLE_WRITINGMODE_TBRL
public static final int STYLE_WRITINGMODE_TBLR
public static final int STYLE_WRITINGMODE_LR
public static final int STYLE_WRITINGMODE_RL
public static final int STYLE_WRITINGMODE_TB
public static final int STYLE_WRITINGMODE_PAGE
public PageStyle(java.lang.String sName, OdsFile odsFile)
sName
- A unique name for this stylepublic void setPrintOrientationVertical()
public void setPrintOrientationHorizontal()
public int getPaperFormat()
public void setPaperFormat(int nPaperFormat)
nPaperFormat
- public int getWritingMode()
public void setWritingMode(int writingMode)
writingMode
- public java.lang.String getPageHeight()
public void setPageHeight(java.lang.String pageHeight)
pageHeight
- public java.lang.String getPageWidth()
public void setPageWidth(java.lang.String pageWidth)
pageWidth
- public java.lang.String getMarginBottom()
public void setMarginBottom(java.lang.String margin)
margin
- public java.lang.String getMarginLeft()
public void setMarginLeft(java.lang.String margin)
margin
- public java.lang.String getMarginRight()
public void setMarginRight(java.lang.String margin)
margin
- public java.lang.String getMarginTop()
public void setMarginTop(java.lang.String margin)
margin
- public void setAllMargins(java.lang.String margin)
margin
- public java.lang.String getBackgroundColor()
public void setBackgroundColor(java.lang.String sColor)
sColor
- public java.lang.String getName()