Package com.dassault_systemes.catjdialog

   
Class CATFrame

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

Framework : CATJDialog

Module : CATJDialog

Class Description

public class CATFrame

The frame graphical component.

Description:

This is a container component providing a grid layout implementation.
It has no associated visualisation, its only purpose is to layout components.

Introducing Grid Layout:

The grid layout is a flexible layout manager that lays out children components in a rectangular grid of cells, with each component occupying one or more cells.
Every child component layout in the container grid is associated with a GC (Grid Constraint) object that specifies how the component is laid out on the grid.
The GC object gives the following controls:

In order to determine how to distribute extra space (needed for resizing), the container grid also provides a way of defining rows and columns weights. Extra space is distributed to columns and rows proportionally to their weights.
Note: By default all columns and rows of the grid have a null weight. If all columns and rows have a null weight, then the algorithm shares extra space equally.

See the CAA Use Case "Creating a Command" for a simple Grid Layout sample.
See the CAA Use Case "Grid Constraint Layout" for a complex Grid Layout sample.

CATFrame Properties:

CATFrame Notifications:

   All Implemented Interfaces:
CATIDefaultButton
See Also:
GC
Field Summary

Constructor Summary
CATFrame(CATDialog iDialog, String iName)
Creates a frame container with the specified parent and name.

Method Summary
public int getColumnResizable(int iX)
Returns a column's weight.
public int getColumnTotal()
Computes the sum of column weights.
public GC getConstraints(String iName)
Returns a child component layout constraint set.
public CATButton getDefaultButton()
Retrieves the default button in the DialogBox (may be null).
public boolean getPacked()
Determines whether this frame is packed to its minimum size or not.
public int getRowResizable(int iY)
Returns a row's weight.
public int getRowTotal()
Computes the sum of row weights.
public void setColumnResizable(int iX, int iW)
Sets a column's weight.
public void setConstraints(CATDialog iDialog, GC iConstraints)
Sets a child component layout constraint set.
public void setConstraints(String iName, GC iConstraints)
Set a child component layout constraint set.
public void setDefaultButton(CATButton iButton)
Defines the default button.
public void setPacked(boolean iPacked)
Enables/disables packing this frame to its minimum size.
public void setRowResizable(int iY, int iW)
Sets a row's weight.


Field Detail

Constructor Detail

CATFrame

    CATFrame(CATDialog iDialog, String iName)

Creates a frame container with the specified parent and name.

Parameters:
iParent
The parent component.
iName
This frame 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

getColumnResizable

    public int getColumnResizable(int iX)

Returns a column's weight.

Parameters:
iX
The column's index.
Return:
The column's weight.

getColumnTotal

    public int getColumnTotal()

Computes the sum of column weights.

Return:
The sum of column weights.

getConstraints

    public GC getConstraints(String iName)

Returns a child component layout constraint set.

Parameters:
iName
The child component's name.
Return:
The constraint set associated to the given child.

getDefaultButton

    public CATButton getDefaultButton()

Retrieves the default button in the DialogBox (may be null).

Return:
The default button component if any.
See Also:
CATIDefaultButton#getDefaultButton()

getPacked

    public boolean getPacked()

Determines whether this frame is packed to its minimum size or not. Default is not packed.

Return:
true if this frame is packed; false otherwise.

getRowResizable

    public int getRowResizable(int iY)

Returns a row's weight.

Parameters:
iY
The row's index.
Return:
The row's weight.

getRowTotal

    public int getRowTotal()

Computes the sum of row weights.

Return:
The sum of row weights.

setColumnResizable

    public void setColumnResizable(int iX, int iW)

Sets a column's weight. Default weight is 0 for all columns.

Parameters:
iX
The column's index.
iW
The weight to set to the column.

setConstraints

    public void setConstraints(CATDialog iDialog, GC iConstraints)

Sets a child component layout constraint set.

Parameters:
iDialog
A child component.
iConstraints
A constraints set to associate to the given child.

setConstraints

    public void setConstraints(String iName, GC iConstraints)

Set a child component layout constraint set.

Parameters:
iName
A child component's name.
iConstraints
A constraints set to associate to the given child.

setDefaultButton

    public void setDefaultButton(CATButton iButton)

Defines the default button.

That causes the default button to be automatically triggered (as if it was pressed) when the user presses ENTER.

Parameters:
iButton
The button component to set as default (null sets no default button).

setPacked

    public void setPacked(boolean iPacked)

Enables/disables packing this frame to its minimum size.

Parameters:
iPacked
If true, this frame is packed to its minimum size.

setRowResizable

    public void setRowResizable(int iY, int iW)

Sets a row's weight. Default weight is 0 for all rows.

Parameters:
iY
The row's index.
iW
The weight to set to the row.


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