com.partnersoft.formats.dxf
Class DxfAttrib

java.lang.Object
  extended by com.partnersoft.formats.dxf.DxfEntity
      extended by com.partnersoft.formats.dxf.DxfAttrib
All Implemented Interfaces:
DxfStructure

public class DxfAttrib
extends DxfEntity

A DXF attrib entity.

Author:
Paul Reavis Copyright 2000 Partner Software, Inc.

Field Summary
 java.lang.String value
           
 
Constructor Summary
DxfAttrib()
           
 
Method Summary
 double getAlignmentX()
          Alignment point X, code 11, optional, default 0.
 double getAlignmentY()
          Alignment point Y, code 21, optional, default 0.
 double getAlignmentZ()
          Alignment point Z, code 31, optional, default 0.
 double getExtrusionX()
          Extrusion direction X, group 210, optional, default 0.
 double getExtrusionY()
          Extrusion direction Y, group 220, optional, default 0.
 double getExtrusionZ()
          Extrusion direction Z, group 230, optional, default 1.
 int getFieldLength()
          Field length, code 73, optional, default 0.
 java.util.List<DxfGroup> getGroups(DxfVersion version)
          Get the internal state as DXFGroups.
 double getHeight()
          Text height, code 40.
 DxfHorizontalJustification getHorizontalJustification()
          Horizontal text justification; code 72, optional, default LEFT.
 double getObliqueAngle()
          Oblique angle, code 51, optional, default 0.
 double getRotation()
          Text rotation, code 50, optional, default 0.
 double getScaleX()
          Relative X scale factor (width), code 41, optional, default 1.
 java.lang.String getStyle()
          Text style name, code 7, optional, default STANDARD.
 java.lang.String getTag()
          Attribute tag, code 2, no default.
 double getThickness()
          Thickness, code 39, optional, default 0.
 java.lang.String getType()
          The type name of this structure.
 java.lang.String getValue()
          Default value, code 1.
 DxfVerticalJustification getVerticalJustification()
          Vertical text justification, code 74, optional, default BASELINE.
 double getX()
          Text start point X, code 10, required.
 double getY()
          Text start point Y, code 20, required.
 double getZ()
          Text start point Z, code 30, required.
 boolean isBackward()
          If true, text is backward (mirrored in X).
 boolean isConstant()
          True if this is a constant attribute.
 boolean isInvisible()
          Attribute invisible.
 boolean isPositionLocked()
          True if attribute's position is locked within the block reference.
 boolean isPreset()
          True if attribute is preset (not prompted during insertion).
 boolean isUpsideDown()
          If true, text is upside-down (mirrored in Y).
 boolean isVerificationRequired()
          True if verification is required on input of this attribute.
 void setAlignmentX(double newX)
           
 void setAlignmentY(double newY)
           
 void setAlignmentZ(double newZ)
           
 void setBackward(boolean isit)
           
 void setConstant(boolean isit)
           
 void setExtrusionX(double extrusionX)
           
 void setExtrusionY(double extrusionY)
           
 void setExtrusionZ(double extrusionZ)
           
 void setFieldLength(int newLength)
           
 void setGroups(java.util.List<DxfGroup> groups)
          Set the internal state based on the given groups.
 void setHeight(double newHeight)
           
 void setHorizontalJustification(DxfHorizontalJustification justice)
           
 void setInvisible(boolean isit)
           
 void setObliqueAngle(double newAngle)
           
 void setPositionLocked(boolean tizit)
           
 void setPresent(boolean isit)
           
 void setRotation(double newRotation)
           
 void setScaleX(double newScale)
           
 void setStyle(java.lang.String newStyle)
           
 void setTag(java.lang.String newTag)
           
 void setThickness(double newThickness)
           
 void setUpsideDown(boolean tizit)
           
 void setValue(java.lang.String newValue)
           
 void setVerificationRequired(boolean isit)
           
 void setVerticalJustification(DxfVerticalJustification justice)
           
 void setX(double newX)
           
 void setY(double newY)
           
 void setZ(double newZ)
           
 java.lang.String toString()
           
 
Methods inherited from class com.partnersoft.formats.dxf.DxfEntity
getApplicationDefinedStructures, getColor, getColorName, getHandle, getLayer, getLinetype, getLinetypeScale, getLineWeight, getMaterial, getOwnerHandle, getPlotStyle, getProxyEntityGraphics, getRgbColor, getShadowMode, getTransparency, isPaperSpace, setApplicationDefinedStructures, setColor, setColorName, setHandle, setLayer, setLinetype, setLinetypeScale, setLineWeight, setMaterial, setOwnerHandle, setPaperSpace, setPlotStyle, setProxyEntityGraphics, setRgbColor, setShadowMode, setTransparency
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public java.lang.String value
Constructor Detail

DxfAttrib

public DxfAttrib()
Method Detail

getAlignmentX

public double getAlignmentX()
Alignment point X, code 11, optional, default 0.

Present only if horizontalJustification (72) and/or verticalJustification (74) are present and non-default.


getAlignmentY

public double getAlignmentY()
Alignment point Y, code 21, optional, default 0.

Present only if horizontalJustification (72) and/or verticalJustification (74) are present and non-default.


getAlignmentZ

public double getAlignmentZ()
Alignment point Z, code 31, optional, default 0.

Present only if horizontalJustification (72) and/or verticalJustification (74) are present and non-default.


getExtrusionX

public double getExtrusionX()
Extrusion direction X, group 210, optional, default 0.

Returns:
x value of the extrusion vector

getExtrusionY

public double getExtrusionY()
Extrusion direction Y, group 220, optional, default 0.

Returns:
y value of the extrusion vector

getExtrusionZ

public double getExtrusionZ()
Extrusion direction Z, group 230, optional, default 1.

Returns:
z value of the extrusion vector

getFieldLength

public int getFieldLength()
Field length, code 73, optional, default 0.

2007 spec notes that this is not currently used.


getGroups

public java.util.List<DxfGroup> getGroups(DxfVersion version)
Description copied from interface: DxfStructure
Get the internal state as DXFGroups.

Specified by:
getGroups in interface DxfStructure
Overrides:
getGroups in class DxfEntity
Returns:
list of groups containing the state data for this structure

getHeight

public double getHeight()
Text height, code 40.


getHorizontalJustification

public DxfHorizontalJustification getHorizontalJustification()
Horizontal text justification; code 72, optional, default LEFT.


getObliqueAngle

public double getObliqueAngle()
Oblique angle, code 51, optional, default 0.


getRotation

public double getRotation()
Text rotation, code 50, optional, default 0.


getScaleX

public double getScaleX()
Relative X scale factor (width), code 41, optional, default 1.


getStyle

public java.lang.String getStyle()
Text style name, code 7, optional, default STANDARD.


getTag

public java.lang.String getTag()
Attribute tag, code 2, no default.


getThickness

public double getThickness()
Thickness, code 39, optional, default 0.


getType

public java.lang.String getType()
Description copied from interface: DxfStructure
The type name of this structure. Generally this will be the same for all instances of the same implementing Java class, so a typical example might be:
 \/**
  * Type name of this structure. Always returns "POINT".
  * \@return "POINT"
  *\/
 public String getType() {
     return "POINT";
 }
 

Specified by:
getType in interface DxfStructure
Specified by:
getType in class DxfEntity
Returns:
type name of structure as defined in AutoCAD DXF specification

getValue

public java.lang.String getValue()
Default value, code 1.


getVerticalJustification

public DxfVerticalJustification getVerticalJustification()
Vertical text justification, code 74, optional, default BASELINE.


getX

public double getX()
Text start point X, code 10, required.


getY

public double getY()
Text start point Y, code 20, required.


getZ

public double getZ()
Text start point Z, code 30, required.


isBackward

public boolean isBackward()
If true, text is backward (mirrored in X).

This is derived from bit 2 of group 71.


isConstant

public boolean isConstant()
True if this is a constant attribute.

This is derived from bit 2 of the attribute flags (code 70).


isInvisible

public boolean isInvisible()
Attribute invisible.

This is derived from bit 1 of the attribute flags (code 70).

Overrides:
isInvisible in class DxfEntity

isPositionLocked

public boolean isPositionLocked()
True if attribute's position is locked within the block reference.

This is code 280.


isPreset

public boolean isPreset()
True if attribute is preset (not prompted during insertion).

This is derived from bit 8 of the attribute tags (code 70).


isUpsideDown

public boolean isUpsideDown()
If true, text is upside-down (mirrored in Y).

This is derived from bit 4 of group 71.


isVerificationRequired

public boolean isVerificationRequired()
True if verification is required on input of this attribute.

This is derived from bit 4 of the attribute flags (code 70).


setAlignmentX

public void setAlignmentX(double newX)

setAlignmentY

public void setAlignmentY(double newY)

setAlignmentZ

public void setAlignmentZ(double newZ)

setBackward

public void setBackward(boolean isit)

setConstant

public void setConstant(boolean isit)

setExtrusionX

public void setExtrusionX(double extrusionX)

setExtrusionY

public void setExtrusionY(double extrusionY)

setExtrusionZ

public void setExtrusionZ(double extrusionZ)

setFieldLength

public void setFieldLength(int newLength)

setGroups

public void setGroups(java.util.List<DxfGroup> groups)
Description copied from interface: DxfStructure
Set the internal state based on the given groups.

Specified by:
setGroups in interface DxfStructure
Overrides:
setGroups in class DxfEntity
Parameters:
groups - list of groups containing data for this structure

setHeight

public void setHeight(double newHeight)

setHorizontalJustification

public void setHorizontalJustification(DxfHorizontalJustification justice)

setInvisible

public void setInvisible(boolean isit)
Overrides:
setInvisible in class DxfEntity

setObliqueAngle

public void setObliqueAngle(double newAngle)

setPositionLocked

public void setPositionLocked(boolean tizit)

setPresent

public void setPresent(boolean isit)

setRotation

public void setRotation(double newRotation)

setScaleX

public void setScaleX(double newScale)

setStyle

public void setStyle(java.lang.String newStyle)

setTag

public void setTag(java.lang.String newTag)

setThickness

public void setThickness(double newThickness)

setUpsideDown

public void setUpsideDown(boolean tizit)

setValue

public void setValue(java.lang.String newValue)

setVerificationRequired

public void setVerificationRequired(boolean isit)

setVerticalJustification

public void setVerticalJustification(DxfVerticalJustification justice)

setX

public void setX(double newX)

setY

public void setY(double newY)

setZ

public void setZ(double newZ)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object