com.esri.arcgis.addinframework
Class InternalToolPalette

java.lang.Object
  extended by com.esri.arcgis.addinframework.AddIn
      extended by com.esri.arcgis.addinframework.InternalButton
          extended by com.esri.arcgis.addinframework.InternalToolPalette
All Implemented Interfaces:
ICommand, IToolPalette, java.io.Serializable

public class InternalToolPalette
extends InternalButton
implements IToolPalette

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.systemUI.IToolPalette
IID, IID5678b14a_102b_493f_badb_1a83ae8a3830, xxDummy
 
Constructor Summary
InternalToolPalette()
           
 
Method Summary
 int getPaletteColumns()
          The Number of Columns to display
 java.lang.String getPaletteItem(int index)
          The CLSID for the item on this menu at the specified index.
 int getPaletteItemCount()
          The number of items in this menu.
 void init(IApplication app)
          Initializes this button with the ArcGIS application it is hosted in.
 boolean isChecked()
          Indicates if this command is checked.
 boolean isEnabled()
          Indicates if this command is enabled.
 boolean isMenuStyle()
          The menu style
 boolean isTearOff()
          The tearoff style
 void onClick()
          Occurs when this command is clicked.
 void setParameters(IAddInRecord record, IFactoryHook factoryHook)
           
 
Methods inherited from class com.esri.arcgis.addinframework.InternalButton
seed
 
Methods inherited from class com.esri.arcgis.addinframework.AddIn
getApp, nativeGetPictureFromIStream, nativeGetPictureFromStream, read, readCursorFromStream, readPictureFromIStream, readPictureFromStream, readSubnode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.systemUI.ICommand
getBitmap, getCaption, getCategory, getHelpContextID, getHelpFile, getMessage, getName, getTooltip, onCreate
 

Constructor Detail

InternalToolPalette

public InternalToolPalette()
Method Detail

setParameters

public final void setParameters(IAddInRecord record,
                                IFactoryHook factoryHook)
Overrides:
setParameters in class InternalButton

getPaletteColumns

public final int getPaletteColumns()
                            throws java.io.IOException,
                                   AutomationException
The Number of Columns to display

Specified by:
getPaletteColumns in interface IToolPalette
Returns:
The columns
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPaletteItem

public final java.lang.String getPaletteItem(int index)
                                      throws java.io.IOException,
                                             AutomationException
The CLSID for the item on this menu at the specified index.

Specified by:
getPaletteItem in interface IToolPalette
Parameters:
pos - The pos (in)
Returns:
The iD
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPaletteItemCount

public final int getPaletteItemCount()
                              throws java.io.IOException,
                                     AutomationException
The number of items in this menu.

Specified by:
getPaletteItemCount in interface IToolPalette
Returns:
The numItems
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isMenuStyle

public final boolean isMenuStyle()
                          throws java.io.IOException,
                                 AutomationException
The menu style

Specified by:
isMenuStyle in interface IToolPalette
Returns:
The menu
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isTearOff

public final boolean isTearOff()
                        throws java.io.IOException,
                               AutomationException
The tearoff style

Specified by:
isTearOff in interface IToolPalette
Returns:
The tearOff
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onClick

public void onClick()
Description copied from class: InternalButton
Occurs when this command is clicked.

Remarks

When implementing ICommand to create a custom command, write the code that performs the action when the command is clicked in the OnClick method.

Example:

public void onClick() {     
   //In this example, a message is displayed in console.     
   System.out.println("Clicked on my command");
}

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
onClick in interface ICommand
Overrides:
onClick in class InternalButton

init

public void init(IApplication app)
          throws java.io.IOException,
                 AutomationException
Description copied from class: InternalButton
Initializes this button with the ArcGIS application it is hosted in.

This method is automatically called by the host ArcGIS application when the button is initialized. It marks the start of the button's lifecycle. Clients must not call this method.

Overrides:
init in class InternalButton
Parameters:
app - the ArcGIS application that hosts this button
Throws:
java.io.IOException - if there are interop problems.
AutomationException - if the component throws an ArcObjects exception.

isChecked

public boolean isChecked()
                  throws java.io.IOException,
                         AutomationException
Description copied from class: InternalButton
Indicates if this command is checked.

Remarks

The Checked property indicates the state of this Command. If a command item appears depressed on a commandbar, the command is checked. The active tool will appear checked. Also commands that serve as a toggle will be checked when that toggle is on.
A system event is periodically called to set the state of the commands on the commandbars indicating which ones are checked.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isChecked in interface ICommand
Overrides:
isChecked in class InternalButton
Returns:
The checked
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEnabled

public boolean isEnabled()
                  throws java.io.IOException,
                         AutomationException
Description copied from class: InternalButton
Indicates if this command is enabled.

Remarks

When implementing ICommand to create a custom command, add some logic to the Enabled property to specify in what state the application should be in for the command to be enabled.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isEnabled in interface ICommand
Overrides:
isEnabled in class InternalButton
Returns:
The enabled
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.