use of org.entirej.framework.dev.renderer.definition.EJDevItemRendererDefinitionControl 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);
}
use of org.entirej.framework.dev.renderer.definition.EJDevItemRendererDefinitionControl 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);
}
use of org.entirej.framework.dev.renderer.definition.EJDevItemRendererDefinitionControl in project rap by entirej.
the class EJRWTHtmlEditorItemRendererDefinition method getItemControl.
@Override
public EJDevItemRendererDefinitionControl getItemControl(EJDevScreenItemDisplayProperties itemProperties, Composite parent, FormToolkit toolkit) {
Text text = new Text(parent, SWT.NULL);
text.setText("HTML EDITOR");
text.setEditable(false);
EJDevItemRendererDefinitionControl definitionControl = new EJDevItemRendererDefinitionControl(itemProperties, text);
definitionControl.setUseFontDimensions(false);
return definitionControl;
}
use of org.entirej.framework.dev.renderer.definition.EJDevItemRendererDefinitionControl in project rap by entirej.
the class EJRWTLabelItemRendererDefinition method getItemControl.
@Override
public EJDevItemRendererDefinitionControl getItemControl(EJDevScreenItemDisplayProperties itemProperties, Composite parent, FormToolkit toolkit) {
// toolkit.createText(parent,
Label text = new Label(parent, SWT.NULL);
// itemProperties.getLabel(),
// SWT.NULL);
text.setText(itemProperties.getLabel());
EJDevBlockItemDisplayProperties blockItemDisplayProperties = itemProperties.getBlockItemDisplayProperties();
if (blockItemDisplayProperties != null) {
EJFrameworkExtensionProperties itemRendererProperties = blockItemDisplayProperties.getItemRendererProperties();
if (itemRendererProperties != null) {
String labelAlignment = itemRendererProperties.getStringProperty(PROPERTY_ALIGNMENT);
if (PROPERTY_ALIGNMENT_LEFT.equals(labelAlignment)) {
text.setAlignment(SWT.LEFT);
} else if (PROPERTY_ALIGNMENT_RIGHT.equals(labelAlignment)) {
text.setAlignment(SWT.RIGHT);
} else if (PROPERTY_ALIGNMENT_CENTER.equals(labelAlignment)) {
text.setAlignment(SWT.CENTER);
}
}
}
return new EJDevItemRendererDefinitionControl(itemProperties, text);
}
use of org.entirej.framework.dev.renderer.definition.EJDevItemRendererDefinitionControl in project rap by entirej.
the class EJRWTButtonItemRendererDefinition method getItemControl.
@Override
public EJDevItemRendererDefinitionControl getItemControl(EJDevScreenItemDisplayProperties itemDisplayProperties, Composite parent, FormToolkit toolkit) {
Button button = new Button(parent, SWT.FLAT);
if (itemDisplayProperties.getLabel() != null && itemDisplayProperties.getLabel().trim().length() > 0) {
button.setText(itemDisplayProperties.getLabel());
}
EJDevItemRendererDefinitionControl control = new EJDevItemRendererDefinitionControl(itemDisplayProperties, button, false);
return control;
}
Aggregations