com.esri.arcgis.display
Class Template

java.lang.Object
  extended by com.esri.arcgis.display.Template
All Implemented Interfaces:
ITemplate, com.esri.arcgis.interop.RemoteObjRef, IClone, IPersist, IPersistStream, Externalizable, Serializable

public class Template
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ITemplate, IPersistStream, IPersist, IClone, Externalizable

Stores information on the mark and gap patterns for lines.

Description

Use Template store information about the pattern of marks and gaps on a line symbol. When you create a Template , you will assign it to an ILineSymbol 's ILineProperties .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
IHashLineSymbol, ILineProperties, ILineSymbol, ITemplate, ICartographicLineSymbol, IMultiLayerLineSymbol, IPictureLineSymbol, Serialized Form

Constructor Summary
Template()
          Constructs a Template using ArcGIS Engine.
Template(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
Template theTemplate = (Template) obj;
 
Method Summary
 void addPatternElement(double mark, double gap)
          Adds a pattern element.
 void assign(IClone src)
          Assigns the properties of src to the receiver.
 void clearPatternElements()
          Clears all pattern elements.
 void deletePatternElement(int index)
          Removes the pattern element at the given index.
 boolean equals(Object o)
          Compare this object with another
 IClone esri_clone()
          Clones the receiver and assigns the result to *clone.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 IGeometry getGeometry()
          The pattern geometry.
 double getInterval()
          The interval.
 void getPatternElement(int index, double[] mark, double[] gap)
          Gets pattern element properties for a given index.
 int getPatternElementCount()
          The number of pattern elements.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 int hashCode()
          the hashcode for this object
 void isDirty()
          isDirty
 boolean isEqual(IClone other)
          Returns TRUE when the receiver and other have the same properties.
 boolean isIdentical(IClone other)
          Returns TRUE when the receiver and other are the same object.
 void load(IStream pstm)
          load
 void movePatternElement(int fromIndex, int toIndex)
          Moves a pattern element.
 void queryNextLine(IGeometry pGeometry)
          Queries for the next line in the pattern.
 void queryNextPoint(IPoint pPoint, double[] pAngle)
          Queries for the next point in the pattern.
 void readExternal(ObjectInput in)
           
 void reset()
          Resets the enumerator.
 void save(IStream pstm, int fClearDirty)
          save
 void setGeometryByRef(IGeometry ppGeometry)
          The pattern geometry.
 void setInterval(double interval)
          The interval.
 void setup(int hDC, ITransformation transformation, ILineSymbol lineSym)
          Set up items needed by template.
 void writeExternal(ObjectOutput out)
           
 
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

Template

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

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

Template

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

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

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

setup

public void setup(int hDC,
                  ITransformation transformation,
                  ILineSymbol lineSym)
           throws IOException,
                  AutomationException
Set up items needed by template.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setup in interface ITemplate
Parameters:
hDC - The hDC (A COM typedef) (in)
transformation - A reference to a com.esri.arcgis.geometry.ITransformation (in)
lineSym - A reference to a com.esri.arcgis.display.ILineSymbol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPatternElementCount

public int getPatternElementCount()
                           throws IOException,
                                  AutomationException
The number of pattern elements.

Description

PatternElementCount is the number of pattern elements that have been added to the ITemplate object. A pattern element is one mark and one gap.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getPatternElementCount in interface ITemplate
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPatternElement

public void getPatternElement(int index,
                              double[] mark,
                              double[] gap)
                       throws IOException,
                              AutomationException
Gets pattern element properties for a given index.

Description

GetPatternElement returns the pattern element based on the pattern element index you specify.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getPatternElement in interface ITemplate
Parameters:
index - The index (in)
mark - The mark (out: use single element array)
gap - The gap (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addPatternElement

public void addPatternElement(double mark,
                              double gap)
                       throws IOException,
                              AutomationException
Adds a pattern element.

Description

AddPatternElement adds a new pattern element to the ITemplate object. A pattern element is a mark and a gap value.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addPatternElement in interface ITemplate
Parameters:
mark - The mark (in)
gap - The gap (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deletePatternElement

public void deletePatternElement(int index)
                          throws IOException,
                                 AutomationException
Removes the pattern element at the given index.

Description

DeletePatternElement removes the specified pattern element from the ITemplate object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
deletePatternElement in interface ITemplate
Parameters:
index - The index (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

movePatternElement

public void movePatternElement(int fromIndex,
                               int toIndex)
                        throws IOException,
                               AutomationException
Moves a pattern element.

Description

MovePatternElement moves one pattern element at the specified index in the ITemplate to a different position in the template. Use the PatternElementCount method to verify the number of pattern elements.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
movePatternElement in interface ITemplate
Parameters:
fromIndex - The fromIndex (in)
toIndex - The toIndex (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearPatternElements

public void clearPatternElements()
                          throws IOException,
                                 AutomationException
Clears all pattern elements.

Description

ClearPatternElements removes all the pattern elements from the ITemplate object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
clearPatternElements in interface ITemplate
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getInterval

public double getInterval()
                   throws IOException,
                          AutomationException
The interval.

Description

Interval is the multiplier that determines the width of the marks and gaps in a pattern element. Each mark and gap value is multiplied by the Interval when the line symbol is drawn. The units that the marks and gaps are specified in are points (approx. 1/72 inch).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getInterval in interface ITemplate
Returns:
The interval
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setInterval

public void setInterval(double interval)
                 throws IOException,
                        AutomationException
The interval.

Description

Interval is the multiplier that determines the width of the marks and gaps in a pattern element. Each mark and gap value is multiplied by the Interval when the line symbol is drawn. The initial size of the mark and gap is derived from the MarkSize property (WHICH DOES NOT EXIST YET!!!!)

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setInterval in interface ITemplate
Parameters:
interval - The interval (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGeometry

public IGeometry getGeometry()
                      throws IOException,
                             AutomationException
The pattern geometry.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getGeometry in interface ITemplate
Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setGeometryByRef

public void setGeometryByRef(IGeometry ppGeometry)
                      throws IOException,
                             AutomationException
The pattern geometry.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setGeometryByRef in interface ITemplate
Parameters:
ppGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryNextPoint

public void queryNextPoint(IPoint pPoint,
                           double[] pAngle)
                    throws IOException,
                           AutomationException
Queries for the next point in the pattern.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryNextPoint in interface ITemplate
Parameters:
pPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
pAngle - The pAngle (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryNextLine

public void queryNextLine(IGeometry pGeometry)
                   throws IOException,
                          AutomationException
Queries for the next line in the pattern.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryNextLine in interface ITemplate
Parameters:
pGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reset

public void reset()
           throws IOException,
                  AutomationException
Resets the enumerator.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
reset in interface ITemplate
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirty in interface IPersistStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_clone

public IClone esri_clone()
                  throws IOException,
                         AutomationException
Clones the receiver and assigns the result to *clone.

Product Availability

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

Specified by:
esri_clone in interface IClone
Returns:
A reference to a com.esri.arcgis.system.IClone
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

assign

public void assign(IClone src)
            throws IOException,
                   AutomationException
Assigns the properties of src to the receiver.

Description

Use Assign method to assign the properties of source object to receiver object. Both objects need to have the same CLSIDs. Both source and receiver objects need to be instantiated.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
assign in interface IClone
Parameters:
src - A reference to a com.esri.arcgis.system.IClone (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEqual

public boolean isEqual(IClone other)
                throws IOException,
                       AutomationException
Returns TRUE when the receiver and other have the same properties.

Description

IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isEqual in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The equal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isIdentical

public boolean isIdentical(IClone other)
                    throws IOException,
                           AutomationException
Returns TRUE when the receiver and other are the same object.

Description

IsIdentical returns true if the receiver and the source reference the same object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isIdentical in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The identical
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException