3.9.1 Custom Buttons

Custom Button Example

Configuring a Custom Button

You can add a custom button to the report toolbar by using a ViewerAction. A ViewerAction object specifies the icon and label for the button and the action to take when the button is pressed. The ViewerAction interface in inetsoft.sree package defines the API for the custom button object.

Table 2. ViewerAction methods

getIconResource()

Return the icon resource name. The icon will be loaded as the specified resource and used to create a button on the viewer.

getLabel()

Return the label for the button. If the viewer is configured to use a text-only toolbar on a browser, the label is used to create a text based tool button. Otherwise, the label is used as the tool tip for the tool button.

actionPerformed()

Handles button click action. It can perform application specific actions when the button is pressed.

<< 3.9 Portal Customization © 1996-2013 InetSoft Technology Corporation (v11.4) Custom Button Example >>