Package com.dassault_systemes.catjdialog

   
Class CATToolbar

 
Class Hierarchy
java.lang.Object
  |
  +-com.dassault_systemes.catjdialog.CATCallbackSource
        |
        +-com.dassault_systemes.catjdialog.CATDialog
              |
              +-com.dassault_systemes.catjdialog.CATToolbar
Class Location

Framework : CATJDialog

Module : CATJDialog

Class Description

public class CATToolbar

The toolbar graphical component.

Description:

The toolbar displays a list of buttons with icons and/or text.
The application can be notified when a toolbar button is pressed.

CATToolbar Properties:

CATToolbar Notifications:

Field Summary
int VERTICAL
int HORIZONTAL

Constructor Summary
CATToolbar(CATDialog iParent, String iName)

Method Summary
void setModelURL(String iModelURL)
String getModelURL()
CATToolbarCommandNotification getCommandNotification()
int getLayout()
void setLayout(int iLayout)
CATMenuModel getModel()
void setModel(CATMenuModel iModel)


Field Detail

VERTICAL

    int VERTICAL
Toolbar layout: vertical


HORIZONTAL

    int HORIZONTAL
Toolbar layout: horizontal


Constructor Detail

CATToolbar

    CATToolbar(CATDialog iParent, String iName)

Creates a toolbar with the specified parent and name. Default orientation is HORIZONTAL.

Parameters:
iParent
The parent component.
iName
This toolbar name. Here are some rules for this name:
  • It is set in the constructor, and cannot be changed afterwards.
  • The name must be unique for the parent (2 children with the same name are not allowed).
  • The name may not contain any ot the following characters: '.' (dot), ' ' (blank), '_' (underscore)

Method Detail

setModelURL

    void setModelURL(String iModelURL)

Sets the toolbar model URL.

The expected format is: <model classname>@<arg1>,<arg2>,...
<model classname> must have a constructor with the following signature:
    void <Constructor>(CATDialog iDialog, String[] iArgs)

Note: This method allows to set the toolbar model inline in the XMLDlg file.
Example: <Toolbar Name="MyTools" ModelURL="com.mypackage.MyToolbarModel@myarg"...

Parameters:
iModelURL
A toolbar model URL. A null value empties the toolbar.

getModelURL

    String getModelURL()

Returns the model URL (if any).

Returns:
The toolbar model URL.

getCommandNotification

    CATToolbarCommandNotification getCommandNotification()

Returns the toolbar command notification.

This notification is sent when an active button of the toolbar is pressed.

Returns:
The toolbar command notification.

getLayout

    int getLayout()

Returns the toolbar orientation. Default orientation is HORIZONTAL.

Returns:
The toolbar orientation (HORIZONTAL or VERTICAL).

setLayout

    void setLayout(int iLayout)

Sets the toolbar orientation.

Parameters:
iLayout
The toolbar orientation (HORIZONTAL or VERTICAL).

getModel

    CATMenuModel getModel()

Returns the toolbar menu model.

Returns:
The toolbar menu model. A null value means "empty toolbar".

setModel

    void setModel(CATMenuModel iModel)

Sets the toolbar menu model.

Parameters:
iModel
The toolbar menu model. A null value empties the toolbar.


Copyright © 2000, Dassault Systèmes. All rights reserved