Search in sources :

Example 1 with EJDevScreenRendererDefinitionControl

use of org.entirej.framework.dev.renderer.definition.EJDevScreenRendererDefinitionControl in project rap by entirej.

the class EJRWTQueryScreenRendererDefinition method addQueryScreenControl.

@Override
public EJDevScreenRendererDefinitionControl addQueryScreenControl(EJDevBlockDisplayProperties blockDisplayProperties, Composite parent, FormToolkit formToolkit) {
    int height = blockDisplayProperties.getQueryScreenRendererProperties().getIntProperty(EJRWTScreenRendererDefinitionProperties.HEIGHT, 300);
    int width = blockDisplayProperties.getQueryScreenRendererProperties().getIntProperty(EJRWTScreenRendererDefinitionProperties.WIDTH, 300);
    int numcols = blockDisplayProperties.getQueryScreenRendererProperties().getIntProperty(EJRWTScreenRendererDefinitionProperties.NUM_COLS, 1);
    Composite screen = new Composite(parent, SWT.SHADOW_NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = numcols;
    gridLayout.horizontalSpacing = 0;
    gridLayout.verticalSpacing = 0;
    screen.setLayout(gridLayout);
    GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
    gd.horizontalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    gd.verticalAlignment = SWT.FILL;
    gd.grabExcessVerticalSpace = true;
    gd.widthHint = width;
    gd.heightHint = height;
    screen.setLayoutData(gd);
    EJRWTScreenPreviewerCreator creator = new EJRWTScreenPreviewerCreator();
    List<EJDevItemRendererDefinitionControl> itemControls = creator.addQueryScreenPreviewControl(this, blockDisplayProperties, screen, formToolkit);
    return new EJDevScreenRendererDefinitionControl(blockDisplayProperties, itemControls);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) EJDevItemRendererDefinitionControl(org.entirej.framework.dev.renderer.definition.EJDevItemRendererDefinitionControl) GridData(org.eclipse.swt.layout.GridData) EJDevScreenRendererDefinitionControl(org.entirej.framework.dev.renderer.definition.EJDevScreenRendererDefinitionControl)

Example 2 with EJDevScreenRendererDefinitionControl

use of org.entirej.framework.dev.renderer.definition.EJDevScreenRendererDefinitionControl in project rap by entirej.

the class EJRWTInsertScreenRendererDefinition method addInsertScreenControl.

@Override
public EJDevScreenRendererDefinitionControl addInsertScreenControl(EJDevBlockDisplayProperties blockDisplayProperties, Composite parent, FormToolkit formToolkit) {
    int height = blockDisplayProperties.getInsertScreenRendererProperties().getIntProperty(EJRWTScreenRendererDefinitionProperties.HEIGHT, 300);
    int width = blockDisplayProperties.getInsertScreenRendererProperties().getIntProperty(EJRWTScreenRendererDefinitionProperties.WIDTH, 300);
    int numcols = blockDisplayProperties.getInsertScreenRendererProperties().getIntProperty(EJRWTScreenRendererDefinitionProperties.NUM_COLS, 1);
    Composite screen = new Composite(parent, SWT.SHADOW_NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = numcols;
    gridLayout.horizontalSpacing = 0;
    gridLayout.verticalSpacing = 0;
    screen.setLayout(gridLayout);
    GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
    gd.horizontalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    gd.verticalAlignment = SWT.FILL;
    gd.grabExcessVerticalSpace = true;
    gd.widthHint = width;
    gd.heightHint = height;
    screen.setLayoutData(gd);
    EJRWTScreenPreviewerCreator creator = new EJRWTScreenPreviewerCreator();
    List<EJDevItemRendererDefinitionControl> itemControls = creator.addInsertScreenPreviewControl(this, blockDisplayProperties, screen, formToolkit);
    return new EJDevScreenRendererDefinitionControl(blockDisplayProperties, itemControls);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) EJDevItemRendererDefinitionControl(org.entirej.framework.dev.renderer.definition.EJDevItemRendererDefinitionControl) GridData(org.eclipse.swt.layout.GridData) EJDevScreenRendererDefinitionControl(org.entirej.framework.dev.renderer.definition.EJDevScreenRendererDefinitionControl)

Example 3 with EJDevScreenRendererDefinitionControl

use of org.entirej.framework.dev.renderer.definition.EJDevScreenRendererDefinitionControl in project rap by entirej.

the class EJRWTUpdateScreenRendererDefinition method addUpdateScreenControl.

public EJDevScreenRendererDefinitionControl addUpdateScreenControl(EJDevBlockDisplayProperties blockDisplayProperties, Composite parent, FormToolkit formToolkit) {
    int height = blockDisplayProperties.getUpdateScreenRendererProperties().getIntProperty(EJRWTScreenRendererDefinitionProperties.HEIGHT, 300);
    int width = blockDisplayProperties.getUpdateScreenRendererProperties().getIntProperty(EJRWTScreenRendererDefinitionProperties.WIDTH, 300);
    int numcols = blockDisplayProperties.getUpdateScreenRendererProperties().getIntProperty(EJRWTScreenRendererDefinitionProperties.NUM_COLS, 1);
    Composite screen = new Composite(parent, SWT.SHADOW_NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = numcols;
    gridLayout.horizontalSpacing = 0;
    gridLayout.verticalSpacing = 0;
    screen.setLayout(gridLayout);
    GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
    gd.horizontalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    gd.verticalAlignment = SWT.FILL;
    gd.grabExcessVerticalSpace = true;
    gd.widthHint = width;
    gd.heightHint = height;
    screen.setLayoutData(gd);
    EJRWTScreenPreviewerCreator creator = new EJRWTScreenPreviewerCreator();
    List<EJDevItemRendererDefinitionControl> itemControls = creator.addUpdateScreenPreviewControl(this, blockDisplayProperties, screen, formToolkit);
    return new EJDevScreenRendererDefinitionControl(blockDisplayProperties, itemControls);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) EJDevItemRendererDefinitionControl(org.entirej.framework.dev.renderer.definition.EJDevItemRendererDefinitionControl) GridData(org.eclipse.swt.layout.GridData) EJDevScreenRendererDefinitionControl(org.entirej.framework.dev.renderer.definition.EJDevScreenRendererDefinitionControl)

Aggregations

GridData (org.eclipse.swt.layout.GridData)3 GridLayout (org.eclipse.swt.layout.GridLayout)3 Composite (org.eclipse.swt.widgets.Composite)3 EJDevItemRendererDefinitionControl (org.entirej.framework.dev.renderer.definition.EJDevItemRendererDefinitionControl)3 EJDevScreenRendererDefinitionControl (org.entirej.framework.dev.renderer.definition.EJDevScreenRendererDefinitionControl)3