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)

Method Summary
int getColumnResizable(int iX)
int getColumnTotal()
int getRowResizable(int iY)
int getRowTotal()
boolean getPacked()
void setPacked(boolean iPacked)
GC getConstraints(String iName)
void setColumnResizable(int iX, int iW)
void setConstraints(CATDialog iDialog, GC iConstraints)
void setConstraints(String iName, GC iConstraints)
void setRowResizable(int iY, int iW)
void setDefaultButton(CATButton iButton)
CATButton getDefaultButton()


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

    int getColumnResizable(int iX)

Returns a column's weight.

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

getColumnTotal

    int getColumnTotal()

Computes the sum of column weights.

Returns:
The sum of column weights.

getRowResizable

    int getRowResizable(int iY)

Returns a row's weight.

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

getRowTotal

    int getRowTotal()

Computes the sum of row weights.

Returns:
The sum of row weights.

getPacked

    boolean getPacked()

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

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

setPacked

    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.

getConstraints

    GC getConstraints(String iName)

Returns a child component layout constraint set.

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

setColumnResizable

    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

    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

    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.

setRowResizable

    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.

setDefaultButton

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

getDefaultButton

    CATButton getDefaultButton()

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

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


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