TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.report.core.internal
Class DFont

java.lang.Object
  extended by org.eclipse.tptp.platform.report.core.internal.DFont
All Implemented Interfaces:
IDFont, IDObject

Deprecated. As of TPTP 4.5.0, use the TPTP Business Intelligence and Reporting Tools (BIRT) reporting infrastructure (org.eclipse.tptp.platform.report.birt).

public class DFont
extends java.lang.Object
implements IDFont

A DFont defines the appearance of a font. A DFont is defined by three strings: the font name (ie "Arial"), the family name (ie "Arial") and the scripts name (ie "latin-1). The family name and the script name can be set to NULL. Other parameters can be modified such as the font size in pixels or the style (NORMAL | ITALIC | BOLD | UNDERLINE | DASHED ...).


Field Summary
 
Fields inherited from interface org.eclipse.tptp.platform.report.core.internal.IDFont
BOLD, DASHED, ITALIC, LINE_STYLES, NORMAL, OVERLINE, STRIKE, UNDERLINE
 
Constructor Summary
DFont()
          Deprecated. Creates a DFont with a null familly a null script a non valid size and a NORMAL style.
DFont(IDFont font)
          Deprecated. Creates a DFont copying values from given parameter.
DFont(java.lang.String family, java.lang.String script, int size, int style)
          Deprecated. Creates a DFont.
 
Method Summary
 void addStyle(int _style_mask)
          Deprecated. Adds the given style to font's style.
 boolean equals(java.lang.Object o)
          Deprecated. Returns true if the DFont of the object passed in parameters equals the DFont.
 java.lang.String getFamily()
          Deprecated. Gets the family name of the DFont.
 java.lang.String getID()
          Deprecated.  
 java.lang.String getScript()
          Deprecated. Gets the script name of the DFont.
 int getSize()
          Deprecated. Gets the size of the DFont.
 java.lang.String getStringStyle()
          Deprecated. Returns the style value of the DFont in an equivalent string value.
static java.lang.String GetStringStyle(int style)
          Deprecated. Returns the style value in an equivalent string value.
 int getStyle()
          Deprecated. Gets the style of the DFont.
 boolean haveStyle(int _style_mask)
          Deprecated. Checks if the font has one or more property style with a mask.
static boolean HaveStyle(int _style, int _mask)
          Deprecated. Checks if the styke has one or more property.
 boolean isStyle(int _style_mask)
          Deprecated. Checks if the font has the same style.
static boolean IsStyle(int _style, int _mask)
          Deprecated. Checks if the style has a property.
 void removeStyle(int _style_mask)
          Deprecated. Removes the given style from font's style.
 void setFamily(java.lang.String f)
          Deprecated. Sets the Family name.
 void setScript(java.lang.String script)
          Deprecated. Sets the script name of the DFont.
 void setSize(int size)
          Deprecated. Sets the size of the DFont.
 void setStyle(int _style_mask)
          Deprecated. Sets the font's style.
 void setStyle(java.lang.String s)
          Deprecated. Sets the style of the font with a string value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DFont

public DFont(java.lang.String family,
             java.lang.String script,
             int size,
             int style)
Deprecated. 
Creates a DFont.

Parameters:
f - font family name (can be NULL)
s - font script name (can be NULL)
si - font size in pixels
st - font style (NORMAL | ITALIC | BOLD | UNDERLINE | DASHED). The use of the binary operator '|' allows to combine different types.

DFont

public DFont()
Deprecated. 
Creates a DFont with a null familly a null script a non valid size and a NORMAL style.


DFont

public DFont(IDFont font)
Deprecated. 
Creates a DFont copying values from given parameter.

Parameters:
font - the font to copy.
Method Detail

IsStyle

public static boolean IsStyle(int _style,
                              int _mask)
Deprecated. 
Checks if the style has a property.

Returns:
true is _style have all _mask bit set. For example IsStyle( BOLD|UNDERLINE, UNDERLINE) return false. For example IsStyle( BOLD|UNDERLINE, UNDERLINE|BOLD) return true.

HaveStyle

public static boolean HaveStyle(int _style,
                                int _mask)
Deprecated. 
Checks if the styke has one or more property.

Returns:
true is _style have one (or more) _mask bit set. For example HaveStyle( BOLD|UNDERLINE, UNDERLINE) return true.

equals

public boolean equals(java.lang.Object o)
Deprecated. 
Returns true if the DFont of the object passed in parameters equals the DFont. Two fonts are equal if family, size, scrpt and style are equals.

Overrides:
equals in class java.lang.Object

isStyle

public boolean isStyle(int _style_mask)
Deprecated. 
Checks if the font has the same style.

Specified by:
isStyle in interface IDFont
Returns:
true if font is exactly the given style.

haveStyle

public boolean haveStyle(int _style_mask)
Deprecated. 
Checks if the font has one or more property style with a mask.

Specified by:
haveStyle in interface IDFont
Returns:
true if font have one (or more) style from given mask.

getFamily

public java.lang.String getFamily()
Deprecated. 
Gets the family name of the DFont.

Specified by:
getFamily in interface IDFont

getScript

public java.lang.String getScript()
Deprecated. 
Gets the script name of the DFont.

Specified by:
getScript in interface IDFont

getSize

public int getSize()
Deprecated. 
Gets the size of the DFont.

Specified by:
getSize in interface IDFont

getStyle

public int getStyle()
Deprecated. 
Gets the style of the DFont.

Specified by:
getStyle in interface IDFont

addStyle

public void addStyle(int _style_mask)
Deprecated. 
Adds the given style to font's style.

Parameters:
_style_mask - the styles (for example DFont.BOLD|DFont.UNDERLINE)

removeStyle

public void removeStyle(int _style_mask)
Deprecated. 
Removes the given style from font's style.

Parameters:
_style_mask - the styles (for example DFont.BOLD|DFont.UNDERLINE)

setStyle

public void setStyle(int _style_mask)
Deprecated. 
Sets the font's style.

Specified by:
setStyle in interface IDFont
Parameters:
_style_mask - the styles (for example DFont.BOLD|DFont.UNDERLINE)

setFamily

public void setFamily(java.lang.String f)
Deprecated. 
Sets the Family name.

Specified by:
setFamily in interface IDFont
Parameters:
f - font family parameter

setScript

public void setScript(java.lang.String script)
Deprecated. 
Sets the script name of the DFont.

Specified by:
setScript in interface IDFont
Parameters:
script - font script name

setSize

public void setSize(int size)
Deprecated. 
Sets the size of the DFont.

Specified by:
setSize in interface IDFont
Parameters:
size - font size

setStyle

public void setStyle(java.lang.String s)
Deprecated. 
Sets the style of the font with a string value. The string has the following syntax:
BOLD|ITALIC|UNDERLINE


getStringStyle

public java.lang.String getStringStyle()
Deprecated. 
Returns the style value of the DFont in an equivalent string value. syntax:
BOLD|ITALIC|UNDERLINE

See Also:
setStyle(String)

GetStringStyle

public static java.lang.String GetStringStyle(int style)
Deprecated. 
Returns the style value in an equivalent string value. syntax:
BOLD|ITALIC|UNDERLINE

See Also:
getStyle()

getID

public java.lang.String getID()
Deprecated. 
Specified by:
getID in interface IDFont
Returns:
the unique id of the font.

TPTP 4.5.0 Platform Project
Internal API Specification