Search in sources :

Example 6 with GridData

use of org.eclipse.scout.rt.client.ui.form.fields.GridData in project scout.rt by eclipse.

the class AbstractListBox method rebuildFieldGrid.

@Override
public void rebuildFieldGrid() {
    GridData gd = getListBoxFilterBox().getGridDataHints();
    gd.x = 0;
    gd.y = 0;
    getListBoxFilterBox().setGridDataInternal(gd);
}
Also used : GridData(org.eclipse.scout.rt.client.ui.form.fields.GridData)

Example 7 with GridData

use of org.eclipse.scout.rt.client.ui.form.fields.GridData in project scout.rt by eclipse.

the class TabBoxGrid method validate.

@Override
public void validate(ITabBox tabBox) {
    // reset
    m_gridColumns = 0;
    m_gridRows = 0;
    ArrayList<IFormField> list = new ArrayList<IFormField>();
    // filter
    for (IFormField f : tabBox.getGroupBoxes()) {
        if (f.isVisible()) {
            list.add(f);
        } else {
            GridData data = GridDataBuilder.createFromHints(f, 1);
            f.setGridDataInternal(data);
        }
    }
    m_fields = list.toArray(new IFormField[list.size()]);
    layoutStatic();
}
Also used : IFormField(org.eclipse.scout.rt.client.ui.form.fields.IFormField) ArrayList(java.util.ArrayList) GridData(org.eclipse.scout.rt.client.ui.form.fields.GridData)

Example 8 with GridData

use of org.eclipse.scout.rt.client.ui.form.fields.GridData in project scout.rt by eclipse.

the class SplitBoxGrid method layoutStatic.

private void layoutStatic() {
    int x = 0;
    for (int i = 0; i < m_fields.length; i++) {
        GridData data = GridDataBuilder.createFromHints(m_fields[i], 1);
        data.x = x;
        data.y = 0;
        if (data.weightX < 0) {
            data.weightX = data.w;
        }
        m_fields[i].setGridDataInternal(data);
        x = x + data.w;
        m_gridRows = Math.max(m_gridRows, data.h);
    }
    m_gridColumns = x;
}
Also used : GridData(org.eclipse.scout.rt.client.ui.form.fields.GridData)

Example 9 with GridData

use of org.eclipse.scout.rt.client.ui.form.fields.GridData in project scout.rt by eclipse.

the class SplitBoxGrid method validate.

@Override
public void validate(ISplitBox splitBox) {
    // reset
    m_gridColumns = 2;
    m_gridRows = 1;
    ArrayList<IFormField> list = new ArrayList<IFormField>();
    // filter
    for (IFormField f : splitBox.getFields()) {
        if (f.isVisible()) {
            list.add(f);
        } else {
            GridData data = GridDataBuilder.createFromHints(f, 1);
            f.setGridDataInternal(data);
        }
    }
    m_fields = list.toArray(new IFormField[list.size()]);
    layoutStatic();
}
Also used : IFormField(org.eclipse.scout.rt.client.ui.form.fields.IFormField) ArrayList(java.util.ArrayList) GridData(org.eclipse.scout.rt.client.ui.form.fields.GridData)

Example 10 with GridData

use of org.eclipse.scout.rt.client.ui.form.fields.GridData in project scout.rt by eclipse.

the class FormUtility method initRootBoxGridData.

private static void initRootBoxGridData(IForm form, ICompositeField rootBox) {
    // layout data for root group box
    GridData rootData = new GridData(rootBox.getGridDataHints());
    if (rootData.w == IFormField.FULL_WIDTH) {
        rootData.w = rootBox.getFieldGrid().getGridColumnCount();
    }
    rootBox.setGridDataInternal(rootData);
}
Also used : GridData(org.eclipse.scout.rt.client.ui.form.fields.GridData)

Aggregations

GridData (org.eclipse.scout.rt.client.ui.form.fields.GridData)24 IFormField (org.eclipse.scout.rt.client.ui.form.fields.IFormField)12 ArrayList (java.util.ArrayList)7 IButton (org.eclipse.scout.rt.client.ui.form.fields.button.IButton)3 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Iterator (java.util.Iterator)1 ITable (org.eclipse.scout.rt.client.ui.basic.table.ITable)1 VerticalGridMatrix (org.eclipse.scout.rt.client.ui.form.fields.groupbox.internal.matrix.VerticalGridMatrix)1 ISequenceBox (org.eclipse.scout.rt.client.ui.form.fields.sequencebox.ISequenceBox)1