com.esri.arcgis.framework
Class StyleGallery

java.lang.Object
  extended by com.esri.arcgis.framework.StyleGallery
All Implemented Interfaces:
IStyleGallery, IStyleGalleryStorage, com.esri.arcgis.interop.RemoteObjRef, IPersist, IPersistStream, Externalizable, Serializable

public class StyleGallery
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IStyleGallery, IStyleGalleryStorage, IPersistStream, Externalizable

The Style Gallery object.

Remarks

This coclass is a Singleton.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Singleton:

This type is a singleton.

See Also:
Serialized Form

Constructor Summary
StyleGallery()
          Constructs a StyleGallery using ArcGIS Engine.
StyleGallery(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
StyleGallery theStyleGallery = (StyleGallery) obj;
 
Method Summary
 void addFile(String path)
          Adds a file to the Style Gallery.
 void addItem(IStyleGalleryItem item)
          Adds an item to the target style file.
 void clear()
          Removes all styles from the Style Gallery.
 boolean equals(Object o)
          Compare this object with another
 IStyleGalleryClass esri_getClass(int index)
          The class at the given index.
 IEnumBSTR getCategories(String className)
          The categories within the given class.
 int getClassCount()
          Number of classes in the Style Gallery.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 String getDefaultStylePath()
          The default file path for searching for standard styles.
 String getFile(int index)
          The file at the given index.
 int getFileCount()
          The number of files in the Style Gallery.
 IEnumStyleGalleryItem getItems(String className, String styleSet, String category)
          The style items from the specified style file, in the specified class and category.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 String getTargetFile()
          The target output file for adding, updating and removing items.
 int hashCode()
          the hashcode for this object
 void importStyle(String fileName)
          Imports a style from a file other than a .style file.
 boolean isCanUpdate(String path)
          Indicates if the specified file can be updated.
 void isDirty()
          isDirty
 void load(IStream pstm)
          load
 void loadStyle(String fileName, String className)
          Loads a style from a file.
 void readExternal(ObjectInput in)
           
 void removeFile(String path)
          Removes a file from the Style Gallery.
 void removeItem(IStyleGalleryItem item)
          Removes an item from the target style file.
 void save(IStream pstm, int fClearDirty)
          save
 void saveStyle(String fileName, String styleSet, String className)
          Saves the specified style to a file.
 void setTargetFile(String path)
          The target output file for adding, updating and removing items.
 void updateItem(IStyleGalleryItem item)
          Updates an existing item in target style file.
 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

StyleGallery

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

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

StyleGallery

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

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

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

getClassCount

public int getClassCount()
                  throws IOException,
                         AutomationException
Number of classes in the Style Gallery.

Description

Returns the number of classes, item types, associated with the current IStyleGallery object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

esri_getClass

public IStyleGalleryClass esri_getClass(int index)
                                 throws IOException,
                                        AutomationException
The class at the given index.

Product Availability

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

Specified by:
esri_getClass in interface IStyleGallery
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.display.IStyleGalleryClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCategories

public IEnumBSTR getCategories(String className)
                        throws IOException,
                               AutomationException
The categories within the given class.

Product Availability

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

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

getItems

public IEnumStyleGalleryItem getItems(String className,
                                      String styleSet,
                                      String category)
                               throws IOException,
                                      AutomationException
The style items from the specified style file, in the specified class and category. The style set and category may be blank to return all items.

Product Availability

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

Specified by:
getItems in interface IStyleGallery
Parameters:
className - The className (in)
styleSet - The styleSet (in)
category - The category (in)
Returns:
A reference to a com.esri.arcgis.display.IEnumStyleGalleryItem
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addItem

public void addItem(IStyleGalleryItem item)
             throws IOException,
                    AutomationException
Adds an item to the target style file.

Description

Additem adds the item to it's associated Class folder within the Style Gallery.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addItem in interface IStyleGallery
Parameters:
item - A reference to a com.esri.arcgis.display.IStyleGalleryItem (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

updateItem

public void updateItem(IStyleGalleryItem item)
                throws IOException,
                       AutomationException
Updates an existing item in target style file.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
updateItem in interface IStyleGallery
Parameters:
item - A reference to a com.esri.arcgis.display.IStyleGalleryItem (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeItem

public void removeItem(IStyleGalleryItem item)
                throws IOException,
                       AutomationException
Removes an item from the target style file.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
removeItem in interface IStyleGallery
Parameters:
item - A reference to a com.esri.arcgis.display.IStyleGalleryItem (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clear

public void clear()
           throws IOException,
                  AutomationException
Removes all styles from the Style Gallery.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

loadStyle

public void loadStyle(String fileName,
                      String className)
               throws IOException,
                      AutomationException
Loads a style from a file. If class is specified, only items in that class will be loaded.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
loadStyle in interface IStyleGallery
Parameters:
fileName - The fileName (in)
className - The className (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveStyle

public void saveStyle(String fileName,
                      String styleSet,
                      String className)
               throws IOException,
                      AutomationException
Saves the specified style to a file. If class is specified, only items in that class will be saved.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
saveStyle in interface IStyleGallery
Parameters:
fileName - The fileName (in)
styleSet - The styleSet (in)
className - The className (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

importStyle

public void importStyle(String fileName)
                 throws IOException,
                        AutomationException
Imports a style from a file other than a .style file.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getFileCount

public int getFileCount()
                 throws IOException,
                        AutomationException
The number of files in the Style Gallery.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getFile

public String getFile(int index)
               throws IOException,
                      AutomationException
The file at the given index.

Product Availability

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

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

isCanUpdate

public boolean isCanUpdate(String path)
                    throws IOException,
                           AutomationException
Indicates if the specified file can be updated.

Product Availability

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

Specified by:
isCanUpdate in interface IStyleGalleryStorage
Parameters:
path - The path (in)
Returns:
The canUpdate
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTargetFile

public String getTargetFile()
                     throws IOException,
                            AutomationException
The target output file for adding, updating and removing items.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTargetFile in interface IStyleGalleryStorage
Returns:
The path
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTargetFile

public void setTargetFile(String path)
                   throws IOException,
                          AutomationException
The target output file for adding, updating and removing items.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

addFile

public void addFile(String path)
             throws IOException,
                    AutomationException
Adds a file to the Style Gallery.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

removeFile

public void removeFile(String path)
                throws IOException,
                       AutomationException
Removes a file from the Style Gallery.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDefaultStylePath

public String getDefaultStylePath()
                           throws IOException,
                                  AutomationException
The default file path for searching for standard styles.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDefaultStylePath in interface IStyleGalleryStorage
Returns:
The path
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.

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