Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.7.0)

E12063-08

oracle.dss.graph
Class GraphFont

java.lang.Object
  extended by oracle.dss.dataView.BaseComponentXML
      extended by oracle.dss.graph.GraphFont
All Implemented Interfaces:
DataviewFont, FontAttribute

public class GraphFont
extends BaseComponentXML
implements FontAttribute, DataviewFont

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


Field Summary
protected static java.lang.String a_graphProportionalFontSize
           
protected static java.lang.String a_style
           
protected  java.awt.Color fontColor
           
protected  int fontSize
           
protected  int fontStyle
           
protected  java.lang.String fontTypeface
           
protected  int graphProportionalFontSize
           
protected  CommonGraph m_commonGraph
           
protected  oracle.dss.graph.pfj.draw.IdentObj m_identObj
           
protected  oracle.dss.graph.pfj.draw.IdentObj m_identObj2
           
protected  PFJ m_pfj
           
 
Fields inherited from class oracle.dss.dataView.BaseComponentXML
m_jsfHashMap
 
Constructor Summary
GraphFont(CommonGraph graph, oracle.dss.graph.pfj.draw.IdentObj identObj)
           
 
Method Summary
protected  int convertStyleToInt(java.lang.String str)
           
protected  java.lang.String getComponentName()
           
 java.awt.Font getFont()
          Retrieves a Font object.
 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 getStyleXML(boolean allProperties, oracle.dss.util.xml.ObjectNode node)
           
 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.
protected  void resetStyle()
           
 void setFont(java.awt.Font f)
          Specifies a Font object.
 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 setNonstyleXML(oracle.dss.util.xml.ObjectNode node)
           
protected  void setObjectId(oracle.dss.graph.pfj.draw.IdentObj id)
           
 void setStyleXML(oracle.dss.util.xml.ObjectNode node)
           
 void setStyleXML(oracle.dss.util.xml.ObjectNode node, java.util.HashMap map)
           
 void setUnderline(boolean underline)
          Specifies whether the text is underlined.
 
Methods inherited from class oracle.dss.dataView.BaseComponentXML
getNonstyleXML, getStyleXML, getXML, setNonstyleXML, setXML, setXML, setXML, setXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fontTypeface

protected java.lang.String fontTypeface
For internal use only. Application developers should not use this

fontStyle

protected int fontStyle
For internal use only. Application developers should not use this

fontSize

protected int fontSize
For internal use only. Application developers should not use this

fontColor

protected java.awt.Color fontColor
For internal use only. Application developers should not use this

graphProportionalFontSize

protected int graphProportionalFontSize
For internal use only. Application developers should not use this

m_commonGraph

protected CommonGraph m_commonGraph
For internal use only. Application developers should not use this

m_pfj

protected PFJ m_pfj
For internal use only. Application developers should not use this

m_identObj

protected oracle.dss.graph.pfj.draw.IdentObj m_identObj
For internal use only. Application developers should not use this

m_identObj2

protected oracle.dss.graph.pfj.draw.IdentObj m_identObj2
For internal use only. Application developers should not use this

a_style

protected static final java.lang.String a_style
See Also:
Constant Field Values
For internal use only. Application developers should not use this

a_graphProportionalFontSize

protected static final java.lang.String a_graphProportionalFontSize
See Also:
Constant Field Values
For internal use only. Application developers should not use this
Constructor Detail

GraphFont

public GraphFont(CommonGraph graph,
                 oracle.dss.graph.pfj.draw.IdentObj identObj)
Parameters:
graph - The graph that this object belongs to.
identObj - The Perspective for Java object that represents the identity of this object. Perspective for Java is a third party package of objects that are used and manipulated by the BI Beans.
For internal use only. Application developers should not use this
Constructor. Application developers should not have to construct this object, because the graph does it automatically.
Method Detail

getGraphFontColor

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

Specified by:
getGraphFontColor in interface DataviewFont
Returns:
The font color.

setGraphFontColor

public void setGraphFontColor(java.awt.Color newColor)
Specifies the font color.

Specified by:
setGraphFontColor in interface DataviewFont
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. Values less than 1 are ignored. If size is greater than 128, then the property is set to 128.
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.

Specified by:
getGraphFontStyle in interface DataviewFont
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.

Specified by:
setGraphFontStyle in interface DataviewFont
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:
isItalic - 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.

setFont

public void setFont(java.awt.Font f)
Description copied from interface: FontAttribute
Specifies a Font object. A Font object is an awt object with attributes such as name, style, and absolute size.

Specified by:
setFont in interface FontAttribute
Parameters:
f - A Font object that specifies font properties.
For internal use only. Application developers should not use this
Specifies a Font object that specifies font properties. The font size in the Font must be a value from 1 to 128. If you pass a value smaller than 1 or greater than 128, this method logs a message with the error handler, and the font remains the same size as it was before the call.

getFont

public java.awt.Font getFont()
Description copied from interface: FontAttribute
Retrieves a Font object. A Font object is an awt object with attributes such as name, style, and absolute size.

Specified by:
getFont in interface FontAttribute
Returns:
A Font object that specifies font properties.
For internal use only. Application developers should not use this
Retrieves a Font object that specifies font properties.

convertStyleToInt

protected int convertStyleToInt(java.lang.String str)
For internal use only. Application developers should not use this
convert style string constants to int constants

getComponentName

protected java.lang.String getComponentName()
Overrides:
getComponentName in class BaseComponentXML
For internal use only. Application developers should not use this
Retrieves the name of the component

setObjectId

protected void setObjectId(oracle.dss.graph.pfj.draw.IdentObj id)
For internal use only. Application developers should not use this
Sets the object id that corresponds to the current component being used.

getStyleXML

public boolean getStyleXML(boolean allProperties,
                           oracle.dss.util.xml.ObjectNode node)
Overrides:
getStyleXML in class BaseComponentXML
For internal use only. Application developers should not use this
Retrieves Style XML from this GraphFont object returns whether if the style is overridden

setNonstyleXML

public void setNonstyleXML(oracle.dss.util.xml.ObjectNode node)
Overrides:
setNonstyleXML in class BaseComponentXML
For internal use only. Application developers should not use this
Sets Nonstyle properties of this GraphFont from XML

setStyleXML

public void setStyleXML(oracle.dss.util.xml.ObjectNode node,
                        java.util.HashMap map)

setStyleXML

public void setStyleXML(oracle.dss.util.xml.ObjectNode node)
Overrides:
setStyleXML in class BaseComponentXML
For internal use only. Application developers should not use this
Sets Style properties of this GraphFont from XML

resetStyle

protected void resetStyle()
For internal use only. Application developers should not use this
reset style properties

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.7.0)

E12063-08

Copyright © 1997, 2013, Oracle. All rights reserved.