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);
}
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();
}
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;
}
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();
}
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);
}
Aggregations