Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.graph
Class GraphFont

oracle.dss.graph.GraphFont

public class GraphFont

Allows you to specify and retrieve font properties such as name, color, style, and size.


Method Summary
 java.awt.Color getGraphFontColor()
          Retrieves the font color.
 int getGraphFontSize()
          Retrieves the font size.
 int getGraphFontStyle()
          Retrieves the font style.
 java.lang.String getGraphFontTypeface()
          Retrieves the name of the font.
 int getGraphProportionalFontSize()
          Retrieves the font size, in proportion to the graph size.
 boolean isFontBold()
          Indicates whether this font is bold.
 boolean isFontItalic()
          Indicates whether this font is italic.
 boolean isUnderline()
          Indicates whether the text is underlined with one line.
 void setFontBold(boolean bold)
          Specifies whether this fond is bold.
 void setFontItalic(boolean isItalic)
          Specifies whether this font is italic.
 void setGraphFontColor(java.awt.Color newColor)
          Specifies the font color.
 void setGraphFontSize(int size)
          Specifies the font size.
 void setGraphFontStyle(int style)
          Specifies the font style.
 void setGraphFontTypeface(java.lang.String name)
          Specifies the name of the font.
 void setGraphProportionalFontSize(int size)
          Specifies the font size, in proportion to the graph size.
 void setUnderline(boolean underline)
          Specifies whether the text is underlined.

 

Method Detail

getGraphFontColor

public java.awt.Color getGraphFontColor()
Retrieves the font color.
Returns:
The font color.

setGraphFontColor

public void setGraphFontColor(java.awt.Color newColor)
Specifies the font color.
Parameters:
newColor - The font color.

getGraphFontSize

public int getGraphFontSize()
Retrieves the font size. The font size is expressed as it is in the awt.Font.
Returns:
The font size in points.

getGraphProportionalFontSize

public int getGraphProportionalFontSize()
Retrieves the font size, in proportion to the graph size. The value that this method returns takes effect only when the FontSizeAbsolute property of the graph is set to false.

The graph uses a virtual-coordinate system to keep its components in proportion when the graph size changes. In the virtual-coordinate system, 32000 represents the full height of the graph. A proportional font size of 3200 is 1/10 the height of the graph.

Returns:
The size of the font, in virtual coordinates.
See Also:
Graph.setFontSizeAbsolute(boolean)

setGraphFontSize

public void setGraphFontSize(int size)
Specifies the font size. The font size is the same as in the awt.Font. If you set the FontSizeAbsolute property of the graph to false, then calls to this method do nothing.
Parameters:
size - The font size in points. Valid values are from 1 to 128, inclusive. Invalid values are ignored.
See Also:
Graph.setFontSizeAbsolute(boolean)

setGraphProportionalFontSize

public void setGraphProportionalFontSize(int size)
Specifies the font size, in proportion to the graph size. The value that you specify in this method returns takes effect only when the FontSizeAbsolute property of the graph is set to false.

The graph uses a virtual-coordinate system to keep its components in proportion when the graph size changes. In the virtual-coordinate system, 32000 represents the full height of the graph. A proportional font size of 32000 is 1/10 the height of the graph.

Parameters:
size - The size of the font, in virtual coordinates.
See Also:
Graph.setFontSizeAbsolute(boolean)

getGraphFontStyle

public int getGraphFontStyle()
Retrieves the font style.
Returns:
A constant that represents the font style. Valid font styles are listed in the See Also section.
See Also:
BaseGraphComponent.FS_BOLD, BaseGraphComponent.FS_BOLD_ITALIC_UNDERLINE, BaseGraphComponent.FS_BOLD_UNDERLINE, BaseGraphComponent.FS_ITALIC, BaseGraphComponent.FS_ITALIC_BOLD, BaseGraphComponent.FS_ITALIC_UNDERLINE, BaseGraphComponent.FS_PLAIN, BaseGraphComponent.FS_UNDERLINE

setGraphFontStyle

public void setGraphFontStyle(int style)
Specifies the font style.
Parameters:
style - A constant that represents the font style. Valid constants are listed in the See Also section.
See Also:
BaseGraphComponent.FS_BOLD, BaseGraphComponent.FS_BOLD_ITALIC_UNDERLINE, BaseGraphComponent.FS_BOLD_UNDERLINE, BaseGraphComponent.FS_ITALIC, BaseGraphComponent.FS_ITALIC_BOLD, BaseGraphComponent.FS_ITALIC_UNDERLINE, BaseGraphComponent.FS_PLAIN, BaseGraphComponent.FS_UNDERLINE

isFontBold

public boolean isFontBold()
Indicates whether this font is bold.
Returns:
true if the font is bold, false if it is not.

isFontItalic

public boolean isFontItalic()
Indicates whether this font is italic.
Returns:
true if the font is italic, false if it is not.

isUnderline

public boolean isUnderline()
Indicates whether the text is underlined with one line.
Returns:
true if the text is underlined, false if it is not.

setFontBold

public void setFontBold(boolean bold)
Specifies whether this fond is bold.
Parameters:
bold - true to make the font bold, false to make it not bold.

setFontItalic

public void setFontItalic(boolean isItalic)
Specifies whether this font is italic.
Parameters:
italic - true to make this font italic, false to make this font not italic.

setUnderline

public void setUnderline(boolean underline)
Specifies whether the text is underlined.
Parameters:
underline - true to underline the text with one line, false to remove underlining.

getGraphFontTypeface

public java.lang.String getGraphFontTypeface()
Retrieves the name of the font.
Returns:
The name of the font.

setGraphFontTypeface

public void setGraphFontTypeface(java.lang.String name)
Specifies the name of the font.
Parameters:
name - The name of the font.

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.