Package com.jsevy.jdxf
Class DXFStyle
- java.lang.Object
-
- com.jsevy.jdxf.DXFDatabaseObject
-
- com.jsevy.jdxf.DXFTableRecord
-
- com.jsevy.jdxf.DXFStyle
-
- All Implemented Interfaces:
DXFObject
public class DXFStyle extends DXFTableRecord
Class representing a text style for use in a DXF document. Encapsulates text parameters (font, style), and associates an arbitrary "name" for use in text entities which use that style. Unfortunately, some programs (e.g. LibreCAD) use the "name" - group code 2 - as the name of the font file, skipping the style table. Thus we use the font file name (group code 3) as the "name" (group code 2) to accommodate those programs skipping the style table. Grrr....- Author:
- jsevy
-
-
Field Summary
-
Fields inherited from class com.jsevy.jdxf.DXFDatabaseObject
LINEWEIGHT_BYBLOCK, LINEWEIGHT_BYLAYER
-
-
Constructor Summary
Constructors Constructor Description DXFStyle(java.awt.Font font)
Create a style object corresponding to the supplied Java typeface object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object otherStyle)
Equals method for use in determining if a Style is already present; overrides Object equals method.java.lang.String
getStyleName()
Get the name for this style object, for use within a DXFText entity.java.lang.String
toDXFString()
Implementation of DXFObject interface method; creates DXF text representing the text style.-
Methods inherited from class com.jsevy.jdxf.DXFDatabaseObject
getDXFLineWeight, getHandle, getHandleCount
-
-
-
-
Method Detail
-
toDXFString
public java.lang.String toDXFString()
Implementation of DXFObject interface method; creates DXF text representing the text style.- Specified by:
toDXFString
in interfaceDXFObject
- Overrides:
toDXFString
in classDXFTableRecord
-
equals
public boolean equals(java.lang.Object otherStyle)
Equals method for use in determining if a Style is already present; overrides Object equals method.- Overrides:
equals
in classjava.lang.Object
- Parameters:
otherStyle
- Another style representing a font- Returns:
- True if the associated Android fonts used to create the styles are equal
-
getStyleName
public java.lang.String getStyleName()
Get the name for this style object, for use within a DXFText entity.- Returns:
- identifier for this Style
-
-