API Documentation > Interfaces > Interface UICommand
Interface UICommand
Description
An action-listener object for menu commands.
The method UICreateCommand creates a UICommand object that contains a UICommandActionListener. You should override the OnCommand method in the ActionListener with the code you want to have execute when the user clicks on that button.
See Also:
Methods Inherited from Interface com.ptc.pfc.pfcBase.ActionSource :
Method Summary
void
Designate (String MessageFile, String Label, /*optional*/ String Help, /*optional*/ String Description)
Designates the command to appear as placeable in the Screen Customization dialog. This may not be used for existing Creo Parametric commands.
void
SetIcon (String IconFile)
Designates the icon to be used with a user-created command. Adds the icon to the command of Creo Parametric.
Method Detail
SetIcon
void
SetIcon
(String IconFile)
Designates the icon to be used with a user-created command. Adds the icon to the command of Creo Parametric.
Exceptions thrown (but not limited to):
XToolkitNotFound - The icon file was not found.
XToolkitInvalidFile - The file specified was not a Creo Parametric .BIF file or a custom .GIF file.
XToolkitInvalidFile - The file specified was not of required format.
User Guide References:
Parameters:
IconFile
The name of the icon file including the extension. It can be either a Creo Parametric .BIF file, or a custom .GIF file. In order to fit with standard Creo Parametric button sizes, the size of the icon should be at most 20 x 20 pixels. The default search paths for finding the icons are: Creo Parametric loadpoint/text/resource Application text dir/resource Application text dir/(language)/resource The location of the application text dir is specifed in the registry file.
Returns:
Designate
void
Designate
(String MessageFile, String Label, /*optional*/ String Help, /*optional*/ String Description)
Designates the command to appear as placeable in the Screen Customization dialog. This may not be used for existing Creo Parametric commands.
Exceptions thrown (but not limited to):
XToolkitNotFound - The message file was not found.
XToolkitMsgNotFound - One or more messages was not found in the message file.
User Guide References:
Parameters:
MessageFile
Message file name for the two keystrings.
Label
Message keystring referring to the button label . If the command was not assigned an icon, the button name will appear on the toolbar button by default.
Help
Message keystring referring to the button help. This could be null.
Description
The message shown in the customization dialog when you click on Description. This could be null .
Returns:
Was this helpful?