|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.odftoolkit.simple.style.DefaultStyleHandler
org.odftoolkit.simple.draw.FrameStyleHandler
public class FrameStyleHandler
This class provides functions to handle the style of a frame.
Field Summary |
---|
Fields inherited from class org.odftoolkit.simple.style.DefaultStyleHandler |
---|
isUseDefaultStyle, mDocument, mFamilyProperties, mGraphicProperties, mOdfElement, mParagraphProperties, mStyleElement, mTableCellProperties, mTextProperties, mWritableGraphicProperties, mWritableParagraphProperties, mWritableStyleElement, mWritableTableCellProperties, mWritableTextProperties |
Constructor Summary | |
---|---|
FrameStyleHandler(Frame frame)
|
Method Summary | |
---|---|
StyleTypeDefinitions.FrameHorizontalPosition |
getHorizontalPosition()
Return the horizontal position |
StyleTypeDefinitions.HorizontalRelative |
getHorizontalRelative()
Return the horizontal relative |
StyleTypeDefinitions.FrameVerticalPosition |
getVerticalPosition()
Return the vertical position |
StyleTypeDefinitions.VerticalRelative |
getVerticalRelative()
Return the vertical relative |
void |
setAchorType(StyleTypeDefinitions.AnchorType achorType)
Set how a frame is bound to a text document. |
void |
setBackgroundColor(Color color)
Set the background color of this frame. |
void |
setBackgroundFrame(boolean isBackgroundFrame)
Set whether the content of a frame is displayed in the background or foreground. |
void |
setBorders(Border border,
StyleTypeDefinitions.CellBordersType bordersType)
Set the border style of this cell. |
void |
setHorizontalPosition(StyleTypeDefinitions.FrameHorizontalPosition horizontalPos)
Set the horizontal position |
void |
setHorizontalRelative(StyleTypeDefinitions.HorizontalRelative relative)
Set the horizontal relative |
void |
setStroke(StyleTypeDefinitions.OdfDrawStroke stroke,
Color color,
String widthDesc,
String dashStyleName)
Set the style of stroke. |
void |
setVerticalPosition(StyleTypeDefinitions.FrameVerticalPosition verticalPos)
Set the vertical position |
void |
setVerticalRelative(StyleTypeDefinitions.VerticalRelative relative)
Set the vertical relative |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FrameStyleHandler(Frame frame)
Method Detail |
---|
public void setBorders(Border border, StyleTypeDefinitions.CellBordersType bordersType)
The second parameter bordersType
describes which borders you
want to apply the style to, e.g. up border, bottom border, left border,
right border, diagonal lines or four borders.
border
- - the border style descriptionbordersType
- - the type of the borderspublic void setStroke(StyleTypeDefinitions.OdfDrawStroke stroke, Color color, String widthDesc, String dashStyleName)
There are three types of stroke: none, solid and dash.
If the stroke is NONE, there is no stroke around the frame.
If the stroke is SOLID, there is solid line around the frame. color and width need to be specified.
If the stroke is DASH, there is dash line around the frame. color, width and the style name of dash line need to be specified.
stroke
- - the stroke typecolor
- - the color of the strokewidthDesc
- - the width description of the stroke, e.g. "0.01in"dashStyleName
- - the dash style nameStyleTypeDefinitions.OdfDrawStroke
public void setBackgroundColor(Color color)
If the parameter is null, there will be no background color defined for this frame. The old setting of background color will be removed.
color
- - the background color to be setpublic void setBackgroundFrame(boolean isBackgroundFrame)
isBackgroundFrame
- If true
, the frame is displayed in the
background.public void setAchorType(StyleTypeDefinitions.AnchorType achorType)
If the document is not text document, nothing will happen.
achorType
- - the point at which a frame is bound to a text documentpublic void setHorizontalPosition(StyleTypeDefinitions.FrameHorizontalPosition horizontalPos)
horizontalPos
- - the horizontal positionpublic void setHorizontalRelative(StyleTypeDefinitions.HorizontalRelative relative)
relative
- - the horizontal relativepublic void setVerticalRelative(StyleTypeDefinitions.VerticalRelative relative)
relative
- - the vertical relativepublic void setVerticalPosition(StyleTypeDefinitions.FrameVerticalPosition verticalPos)
verticalPos
- - the vertical positionpublic StyleTypeDefinitions.FrameHorizontalPosition getHorizontalPosition()
public StyleTypeDefinitions.FrameVerticalPosition getVerticalPosition()
public StyleTypeDefinitions.VerticalRelative getVerticalRelative()
public StyleTypeDefinitions.HorizontalRelative getHorizontalRelative()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |