com.esri.arcgis.display
Interface IStyleGallery

All Superinterfaces:
Serializable
All Known Implementing Classes:
ServerStyleGallery, StyleGallery

public interface IStyleGallery
extends Serializable

Provides access to members modify the Style Gallery.

Description

IStyleGallery is used to access styles, add new items with AddItem, remove items with RemoveItem, make updates with UpdateItem and save your changes with SaveStyle. Styles provide storage for your colors, map elements, symbols, and properties of symbols.

Product Availability

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


Method Summary
 void addItem(IStyleGalleryItem item)
          Adds an item to the target style file.
 void clear()
          Removes all styles from the Style Gallery.
 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.
 IEnumStyleGalleryItem getItems(String className, String styleSet, String category)
          The style items from the specified style file, in the specified class and category.
 void importStyle(String fileName)
          Imports a style from a file other than a .style file.
 void loadStyle(String fileName, String className)
          Loads a style from a file.
 void removeItem(IStyleGalleryItem item)
          Removes an item from the target style file.
 void saveStyle(String fileName, String styleSet, String className)
          Saves the specified style to a file.
 void updateItem(IStyleGalleryItem item)
          Updates an existing item in target style file.
 

Method Detail

getClassCount

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

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_getClass

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.

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

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

Product Availability

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

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

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.

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

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

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

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

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

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

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

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

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

loadStyle

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

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

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

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

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

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