com.esri.arcgis.systemUI
Class SystemFont

java.lang.Object
  extended by com.esri.arcgis.systemUI.SystemFont
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, Font, IFont, Serializable

public class SystemFont
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, Font, IFont

A font object encapsulating Windows font object.

Description

The SystemFont object is used when developing with the Java and C++ API and is a wrapper around the Microsoft Font CoClass.

Remarks

The SystemFont interface implements the following methods:

Name Description
get_Name Gets the name of the font family.
put_Name Sets a new name for the font family.
get_Size Gets the point size for the font.
put_Size Sets the point size for the font.
get_Bold Indicates whether the font is bold or not.
put_Bold Sets the boldness property for the font.
get_Italic Indicates whether the font is italic or not.
put_Italic Sets the italic property for the font.
get_Underline Indicates whether the font is underlined or not.
put_Underline Sets the underline property for the font.
get_Strikethrough Indicates whether the font is strikethrough or not.
put_Strikethrough Sets the strikethrough property for the font.
get_Weight Gets the weight (boldness) for the font.
put_Weight Sets the weight (boldness) for the font.
get_Charset Gets the font's character set.
put_Charset Sets the font's character set.

get_hFont

Returns a Windows HFONT handle for the font

described by this font object.

Clone

Creates a duplicate font object with a state identical

to the current font.

IsEqual Compares this font object to another for equality.

SetRatio

Converts the scaling factor for this font between

logical units and HIMETRIC units (in which is

expressed the point size in the Size property).

AddRefHfont

Notifies the font object that the previously realized

font identified with hFont (from

ISystemFont::GetHfont) should remain valid until

ISystemFont::ReleaseHfont is called or the font

object itself is released.

ReleaseHfont

Notifies the font object that the caller that

previously locked this font in the cache with

ISystemFont::AddRefHfont no longer requires the

lock.

QueryTextMetrics Fills a TEXTMETRIC structure describing the font.

SetHdc

Provides a device context handle to the font that

describes the logical mapping mode.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
Serialized Form

Constructor Summary
SystemFont()
          Constructs a SystemFont using ArcGIS Engine.
SystemFont(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
SystemFont theSystemFont = (SystemFont) obj;
 
Method Summary
 void addRefHfont(int hFont)
          addRefHfont
 boolean equals(Object o)
          Compare this object with another
 void esri_clone(IFont[] ppfont)
          esri_clone
 boolean getBold()
          getBold
 short getCharset()
          getCharset
static String getClsid()
          getClsid.
 int getHFont()
          getHFont
 boolean getItalic()
          getItalic
 String getName()
          getName
 long getSize()
          getSize
 boolean getStrikethrough()
          getStrikethrough
 boolean getUnderline()
          getUnderline
 short getWeight()
          getWeight
 int hashCode()
          the hashcode for this object
 boolean isBold()
          isBold
 void isEqual(IFont pfontOther)
          isEqual
 boolean isItalic()
          isItalic
 boolean isStrikethrough()
          isStrikethrough
 boolean isUnderline()
          isUnderline
 void releaseHfont(int hFont)
          releaseHfont
 void setBold(boolean rhs)
          setBold
 void setCharset(short rhs)
          setCharset
 void setItalic(boolean rhs)
          setItalic
 void setName(String rhs)
          setName
 void setRatio(int cyLogical, int cyHimetric)
          setRatio
 void setSize(long rhs)
          setSize
 void setStrikethrough(boolean rhs)
          setStrikethrough
 void setUnderline(boolean rhs)
          setUnderline
 void setWeight(short rhs)
          setWeight
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

SystemFont

public SystemFont()
           throws IOException,
                  UnknownHostException
Constructs a SystemFont using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

SystemFont

public SystemFont(Object obj)
           throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
SystemFont theSystemFont = (SystemFont) obj;

Construct a SystemFont using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to SystemFont.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getName

public String getName()
               throws IOException,
                      AutomationException
getName

Specified by:
getName in interface Font
Specified by:
getName in interface IFont
Returns:
The return value
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setName

public void setName(String rhs)
             throws IOException,
                    AutomationException
setName

Specified by:
setName in interface Font
Specified by:
setName in interface IFont
Parameters:
rhs - The rhs )
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSize

public long getSize()
             throws IOException,
                    AutomationException
getSize

Specified by:
getSize in interface Font
Specified by:
getSize in interface IFont
Returns:
Automation Currency type
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSize

public void setSize(long rhs)
             throws IOException,
                    AutomationException
setSize

Specified by:
setSize in interface Font
Specified by:
setSize in interface IFont
Parameters:
rhs - Automation Currency type )
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBold

public boolean getBold()
                throws IOException,
                       AutomationException
getBold

Specified by:
getBold in interface Font
Returns:
The return value
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBold

public void setBold(boolean rhs)
             throws IOException,
                    AutomationException
setBold

Specified by:
setBold in interface Font
Specified by:
setBold in interface IFont
Parameters:
rhs - The rhs )
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getItalic

public boolean getItalic()
                  throws IOException,
                         AutomationException
getItalic

Specified by:
getItalic in interface Font
Returns:
The return value
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setItalic

public void setItalic(boolean rhs)
               throws IOException,
                      AutomationException
setItalic

Specified by:
setItalic in interface Font
Specified by:
setItalic in interface IFont
Parameters:
rhs - The rhs )
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getUnderline

public boolean getUnderline()
                     throws IOException,
                            AutomationException
getUnderline

Specified by:
getUnderline in interface Font
Returns:
The return value
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setUnderline

public void setUnderline(boolean rhs)
                  throws IOException,
                         AutomationException
setUnderline

Specified by:
setUnderline in interface Font
Specified by:
setUnderline in interface IFont
Parameters:
rhs - The rhs )
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStrikethrough

public boolean getStrikethrough()
                         throws IOException,
                                AutomationException
getStrikethrough

Specified by:
getStrikethrough in interface Font
Returns:
The return value
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setStrikethrough

public void setStrikethrough(boolean rhs)
                      throws IOException,
                             AutomationException
setStrikethrough

Specified by:
setStrikethrough in interface Font
Specified by:
setStrikethrough in interface IFont
Parameters:
rhs - The rhs )
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWeight

public short getWeight()
                throws IOException,
                       AutomationException
getWeight

Specified by:
getWeight in interface Font
Specified by:
getWeight in interface IFont
Returns:
The return value
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setWeight

public void setWeight(short rhs)
               throws IOException,
                      AutomationException
setWeight

Specified by:
setWeight in interface Font
Specified by:
setWeight in interface IFont
Parameters:
rhs - The rhs )
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCharset

public short getCharset()
                 throws IOException,
                        AutomationException
getCharset

Specified by:
getCharset in interface Font
Specified by:
getCharset in interface IFont
Returns:
The return value
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCharset

public void setCharset(short rhs)
                throws IOException,
                       AutomationException
setCharset

Specified by:
setCharset in interface Font
Specified by:
setCharset in interface IFont
Parameters:
rhs - The rhs )
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isBold

public boolean isBold()
               throws IOException,
                      AutomationException
isBold

Specified by:
isBold in interface IFont
Returns:
The pbold
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isItalic

public boolean isItalic()
                 throws IOException,
                        AutomationException
isItalic

Specified by:
isItalic in interface IFont
Returns:
The pitalic
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isUnderline

public boolean isUnderline()
                    throws IOException,
                           AutomationException
isUnderline

Specified by:
isUnderline in interface IFont
Returns:
The punderline
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isStrikethrough

public boolean isStrikethrough()
                        throws IOException,
                               AutomationException
isStrikethrough

Specified by:
isStrikethrough in interface IFont
Returns:
The pstrikethrough
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHFont

public int getHFont()
             throws IOException,
                    AutomationException
getHFont

Specified by:
getHFont in interface IFont
Returns:
The phfont (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_clone

public void esri_clone(IFont[] ppfont)
                throws IOException,
                       AutomationException
esri_clone

Specified by:
esri_clone in interface IFont
Parameters:
ppfont - A reference to a com.esri.arcgis.support.ms.stdole.IFont (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEqual

public void isEqual(IFont pfontOther)
             throws IOException,
                    AutomationException
isEqual

Specified by:
isEqual in interface IFont
Parameters:
pfontOther - A reference to a com.esri.arcgis.support.ms.stdole.IFont (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setRatio

public void setRatio(int cyLogical,
                     int cyHimetric)
              throws IOException,
                     AutomationException
setRatio

Specified by:
setRatio in interface IFont
Parameters:
cyLogical - The cyLogical (in)
cyHimetric - The cyHimetric (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addRefHfont

public void addRefHfont(int hFont)
                 throws IOException,
                        AutomationException
addRefHfont

Specified by:
addRefHfont in interface IFont
Parameters:
hFont - The hFont (A COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

releaseHfont

public void releaseHfont(int hFont)
                  throws IOException,
                         AutomationException
releaseHfont

Specified by:
releaseHfont in interface IFont
Parameters:
hFont - The hFont (A COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.