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
public static final int HORIZONTAL
Toolbar layout: horizontal
public static final int VERTICAL
Toolbar layout: vertical

Constructor Summary
CATToolbar(CATDialog iParent, String iName)
Creates a toolbar with the specified parent and name.

Method Summary
public CATToolbarCommandNotification getCommandNotification()
Returns the toolbar command notification.
public int getLayout()
Returns the toolbar orientation.
public CATMenuModel getModel()
Returns the toolbar menu model.
public String getModelURL()
Returns the model URL (if any).
public void setLayout(int iLayout)
Sets the toolbar orientation.
public void setModel(CATMenuModel iModel)
Sets the toolbar menu model.
public void setModelURL(String iModelURL)
Sets the toolbar model URL.


Field Detail

HORIZONTAL

    public static final int HORIZONTAL
Toolbar layout: horizontal


VERTICAL

    public static final int VERTICAL
Toolbar layout: vertical


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

getCommandNotification

    public CATToolbarCommandNotification getCommandNotification()

Returns the toolbar command notification.

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

Return:
The toolbar command notification.

getLayout

    public int getLayout()

Returns the toolbar orientation. Default orientation is HORIZONTAL.

Return:
The toolbar orientation (HORIZONTAL or VERTICAL).

getModel

    public CATMenuModel getModel()

Returns the toolbar menu model.

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

getModelURL

    public String getModelURL()

Returns the model URL (if any).

Return:
The toolbar model URL.

setLayout

    public void setLayout(int iLayout)

Sets the toolbar orientation.

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

setModel

    public void setModel(CATMenuModel iModel)

Sets the toolbar menu model.

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

setModelURL

    public 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.


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