I have two jface TableViewers in my view, both defined two occupy the same amount of space vertically, or in other words, both defined to grab the Excess vertical space and to FILL the vertical alignment.
This way, the view is correctly displayed, in a small screen the table with more input gets more space, however, in a bigger screen both tables get the same amount of space, that's fine:
However, since the input from the bottom table is the same everytime, what I really want is to make the bottom table to get only the amount of space necessary to display that input.. But I can't do it, I set the bottom table to not grab the excess vertical alignement, but what it does is this:
And then.. When I resize the window.. BAM, it displays correctly:
I can't understand this behavior.. Can somebody help?
This is my code:
private void createTableViewers(Composite parent) {
// TABLE 1
Composite compositeTableImpostos = new Composite(parent, SWT.NONE);
compositeTableImpostos.setLayout(new FillLayout());
compositeTableImpostos.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
tableImpostos = createTableViewer(compositeTableImpostos,
InterfaceVARS.REGISTOCOLABORADORES_TABLEVIEWER_COLUMNSTYLE,
LabelVARS.REGISTOCOLABORADORES_TABLEVIEWER_COLUMN_TITLES,
InterfaceVARS.REGISTOCOLABORADORES_TABLEVIEWER_COLUMNSIZE,
InterfaceVARS.STYLE_TABLE_SINGLE);
tableImpostos.setContentProvider(contentProvider = new ImpostosContentProvider(tableImpostos));
tableImpostos.setLabelProvider(new ImpostosLabelProvider());
// TABLE 2
Composite compositeTableLinhasDespesa = new Composite(parent, SWT.NONE);
compositeTableLinhasDespesa.setLayout(new FillLayout());
final GridData gridData2 = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
compositeTableLinhasDespesa.setLayoutData(gridData2);
tableLinhasDespesa = createTableViewer(compositeTableLinhasDespesa,
InterfaceVARS.REGISTODESPESAS_TABLEVIEWER_COLUMNSTYLE,
LabelVARS.REGISTODESPESA_TABLEVIEWER_COLUMN_TITLES,
InterfaceVARS.REGISTODESPESAS_TABLEVIEWER_COLUMNSIZE,
InterfaceVARS.STYLE_TABLE_MULTI);
tableLinhasDespesa.setContentProvider(linhasContentProvider = new LinhasDespesaContentProvider(tableLinhasDespesa, contentProvider));
tableLinhasDespesa.setLabelProvider(new LinhasDespesaLabelProvider());
}
public class CustomTableViewer {
//Viewer
private TableViewer tableViewer;
private TableColumnLayout tableViewerLayout;
//Columns
private String titles[];
private int columnSize[];
private int columnStyle[];
public CustomTableViewer(Composite composite, int[] columnStyle, String titles[], int[] columnSize, int STYLE){
this.titles = titles;
this.columnStyle = columnStyle;
this.columnSize = columnSize;
tableViewerLayout = new TableColumnLayout();
Composite compositeTable = new Composite(composite, SWT.NONE);
compositeTable.setLayout(tableViewerLayout);
tableViewer = new TableViewer(compositeTable, STYLE);
Table table = tableViewer.getTable();
table.setLinesVisible(true);
table.setHeaderVisible(true);
addTableViewerColumns();
addTableViewerListeners();
}
private void addTableViewerColumns() {
for(int index=0 ; index<titles.length ; index++)
createTableColumn(columnStyle[index], titles[index], columnSize[index], columnSize[index], true, true);
}
private TableViewerColumn createTableColumn(int STYLE, String title, int weight, int minWidth, boolean moveable, boolean resizable) {
TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, STYLE);
TableColumn column = viewerColumn.getColumn();
column.setText(title);
column.setMoveable(moveable);
tableViewerLayout.setColumnData(column, new ColumnWeightData(weight, minWidth, resizable));
return viewerColumn;
}
public void addTableViewerListeners() {
tableViewer.getTable().addControlListener(new ResizeListener(tableViewer));
}
public TableViewer getTableViewer(){
return tableViewer;
}
public class ResizeListener implements ControlListener {
private TableViewer tableViewer;
public ResizeListener(TableViewer tableViewer) {
this.tableViewer = tableViewer;
}
#Override
public void controlMoved(ControlEvent e) {
}
#Override
public void controlResized(ControlEvent e) {
TableColumn[] colunas = tableViewer.getTable().getColumns();
for(int i=0; i<colunas.length; i++) {
tableViewerLayout.setColumnData(colunas[i], new ColumnWeightData(
columnSize[i],columnSize[i],
true));
}
}
}
}
Calling the method layout(new Control[] {tableViewer2.getControl()}) in the parent composite of the tables after setInput() was called did the job!
Related
I have two tables, on flag i need to show one table at a time. My createControl() method is called at the time of loading and flag value is true so one table is loaded first time, when choose of false flag my second table its giving null pointer. because second time table is not called correctly. i seen in google that stacklayout will work for this type of loading which will load two table at the time of load. but i am not able to call them using stacklayout.
public void createControl(final Composite parent) {
final Font font = parent.getFont();
final Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout());
composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
composite.setFont(font);
composite.setLayout(new GridLayout());
composite.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false));
final Composite controlsComposite = WidgetFactory.getClassicToolkit().createComposite(composite);
final GridLayout gridLayout = new GridLayout(NUM_COLUMN, false);
controlsComposite.setLayout(gridLayout);
final GridData gridData = new GridData(SWT.FILL, SWT.DEFAULT, true, true);
gridData.horizontalAlignment = GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
controlsComposite.setLayoutData(gridData);
if (getWizard() instanceof TestWizard) {
final IWizardPage[] wizardPages = getWizard().getPages();
for (final IWizardPage page : wizardPages) {
if (page instanceof PSRDesignerImportWizardPage) {
TestWizard importwizardPage = (TestWizard) page;
if (importwizardPage.isInitiative()) {
setTitle("Table1");
setMessage("Hello");
gridLayout.numColumns = 1;
controlsComposite.setLayout(gridLayout);
createTable1Control(controlsComposite);
gnerImport = true;
} else {
setTitle("Table2");
setMessage("Bye");
controlsComposite.setLayout(gridLayout);
createTable2Control(controlsComposite);
rDomainImport = true;
}
}
}
} else {
creatFileSelectionGroup(controlsComposite);
}
createImportOptions(controlsComposite);
setControl(composite);
}
code 2:
#Override
public IWizardPage getNextPage() {
List<tualInitiative> ualInitiativeList = getConceptualInitiativeList(psrUserInfo);
if (ualInitiativeList.isEmpty()) {
return null;
}
IWizardPage nextPage = super.getNextPage();
if (nextPage instanceof FormatImportWizardPage) {
FormatImportWizardPage xfPage = (FormatImportWizardPage) nextPage;
if (initiative) {
xfPage.settable1Data(ualInitiativeList);
} else {
xfPage.settable2Data(ualInitiativeList);
}
}
return nextPage;
}
In the createControl(parent) method of the Wizard Page, the code is as below-
top = new Composite(parent, SWT.NONE);
top.setLayout(new FillLayout());
setControl(top);
setPageComplete(false);
createViewer(top);
I want to add a row above the composite denoted by top.
It doesn't allows me. If I add it, the composite denoted by top gets lost.
The below is rendered for the top composite -
The moment I place the below code before the top composite, the top composite gets lost -
upper = new Composite(parent, SWT.NONE);
upper.setLayout(new FillLayout());
setControl(upper);
Label label = new Label(page, SWT.NONE);
label.setText("Some text to disply");
Please suggest on how to achieve the same.
The below is the createControl snippet in my case. It breaks the scrolling and size of the table viewer if add a row.
#Override
public void createControl(Composite parent) {
/*top = new Composite(parent, SWT.NONE);
top.setLayout(new FillLayout());
setControl(top);*/
setPageComplete(false);
top = new Composite(parent, SWT.NONE);
top.setLayout(new GridLayout());
setControl(top);
Label label = new Label(top, SWT.NONE);
label.setText("Some text to disply");
label.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
createViewer(top);
}
private void createViewer(Composite parent) {
tableLayout = new TableColumnLayout();
// A separate composite containing just the table viewer is required
Composite tableComp = new Composite(parent, SWT.NONE);
tableComp.setLayout(tableLayout);
viewer = new TableViewer(tableComp, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
createColumns(parent, viewer);
final Table table = viewer.getTable();
table.setHeaderVisible(true);
table.setLinesVisible(true);
viewer.setContentProvider(new ArrayContentProvider());
// Layout the viewer
GridData gridData = new GridData();
gridData.verticalAlignment = GridData.FILL;
gridData.horizontalSpan = 2;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.horizontalAlignment = GridData.FILL;
viewer.getControl().setLayoutData(gridData);
}
public TableViewer getViewer() {
return viewer;
}
// This will create the columns for the table
private void createColumns(final Composite parent, final TableViewer viewer) {
String[] titles = { "Node Status", "Node Type", "Node Name" };
int[] bounds = { 100, 100, 100 };
Image HEADER = CommonUtility.HEADER;
TableViewerColumn col = null;
// First column is for type
col = createTableViewerColumn(HEADER, titles[0], bounds[0], 0);
col.setLabelProvider(new CentredImageCellLabelProvider() {
#Override
public Image getImage(Object element) {
GenerateSkeletonComponentsStatusModel model = (GenerateSkeletonComponentsStatusModel) element;
if (model.isNew()) {
return CommonUtility.CHECKED;
} else {
return CommonUtility.UNCHECKED;
}
}
});
// Weight for column
tableLayout.setColumnData(col.getColumn(), new ColumnWeightData(50));
// now the newly created
col = createTableViewerColumn(HEADER, titles[1], bounds[1], 1);
col.setLabelProvider(new CentredImageCellLabelProvider() {
#Override
public Image getImage(Object element) {
GenerateSkeletonComponentsStatusModel model = (GenerateSkeletonComponentsStatusModel) element;
if ("ns_flow".equals(model.getIcon())) {
return CommonUtility.FLOW_SERVICE;
}
if ("ns_open_interface".equals(model.getIcon())) {
return CommonUtility.FOLDER;
}
if ("ns_record".equals(model.getIcon())) {
return CommonUtility.DOCUMENT_TYPE;
}
if ("ns_package".equals(model.getIcon())) {
return CommonUtility.PACKAGE;
}
if("RestResource".equals(model.getIcon())){
return CommonUtility.RESTFUL_FOLDER;
}
return null;
}
});
// Weight for column
tableLayout.setColumnData(col.getColumn(), new ColumnWeightData(50));
// First column is for the component name
col = createTableViewerColumn(HEADER, titles[2], bounds[2], 2);
col.setLabelProvider(new ColumnLabelProvider() {
#Override
public String getText(Object element) {
GenerateSkeletonComponentsStatusModel model = (GenerateSkeletonComponentsStatusModel) element;
return model.getComponentName();
}
});
// Weight for column
tableLayout.setColumnData(col.getColumn(), new ColumnWeightData(100));
}
private TableViewerColumn createTableViewerColumn(Image image, String title, int bound, final int colNumber) {
final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.LEAD);
final TableColumn column = viewerColumn.getColumn();
column.setImage(image);
column.setText(title);
column.setWidth(bound);
column.setResizable(true);
column.setMoveable(true);
column.setAlignment(SWT.CENTER);
return viewerColumn;
}
A wizard page must only have one top level composite. You can add multiple controls (including nested composites) to that composite.
So for a label above to table:
top = new Composite(parent, SWT.NONE);
top.setLayout(new GridLayout());
setControl(top);
Label label = new Label(top, SWT.NONE);
label.setText("Some text to disply");
label.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
TableViewer viewer = new TableViewer(top, .... flags
viewer.getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
When trying to add a lot of labels on to a Composite that is contained in a ScrolledComposite after a certain number (1638) for me, it just seems to give up and stop drawing the components after it. Is this a hard limit on a number of things that can be displayed or something I'm doing wrong.
This also happens if I just add one label with 2000 lines of text in.
public class LoadsOfLabelsTestDialog extends Dialog
{
List<Label> displaylabels = new ArrayList<>();
Composite content, list;
ScrolledComposite scroll;
public LoadsOfLabelsTestDialog(Shell parentShell)
{
super(parentShell);
}
#Override
protected void configureShell(Shell shell)
{
super.configureShell(shell);
shell.setSize(new Point(700, 500));
shell.setText("FML"); //$NON-NLS-1$
}
#Override
public Control createDialogArea(final Composite comp)
{
content = (Composite) super.createDialogArea(comp);
content.setLayout(new GridLayout(1, false));
content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
Button set1 = new Button(content, SWT.PUSH);
set1.setText("Display List 1");
set1.addSelectionListener(new SelectionAdapter() {
#Override
public void widgetSelected(SelectionEvent e) {
List<String> rows = new ArrayList<>();
for (int i = 0; i < 2000; i++) {
rows.add(i +" row");
}
updateList(rows);
}
});
scroll = new ScrolledComposite(content, SWT.V_SCROLL);
list = new Composite(scroll, SWT.NONE);
list.setLayout(new GridLayout(1, true));
scroll.setContent(list);
scroll.setExpandHorizontal(true);
scroll.setExpandVertical(true);
scroll.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
new Label(content, SWT.HORIZONTAL | SWT.SEPARATOR);
setScrollSize();
return content;
}
private void setScrollSize() {
scroll.setMinSize(list.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
private void updateList(List<String> rows) {
if (this.displaylabels == null) {
this.displaylabels = new ArrayList<>();
}
for (Label l : displaylabels) {
l.dispose();
}
this.displaylabels.clear();
for (String item : rows) {
addListLabel(item);
}
content.layout(true, true);
setScrollSize();
}
private void addListLabel(String whoText) {
Label a = new Label(list, SWT.NONE);
a.setText(whoText);
this.displaylabels.add(a);
}
public static void main(String[] args)
{
Display d = new Display();
Shell s = new Shell();
LoadsOfLabelsTestDialog fml = new LoadsOfLabelsTestDialog(s);
fml.open();
}
}
You hit a hard limit, probably the maximum size of a control. While this limit may differ slightly on other platforms, you can't size a control arbitrarily.
As #greg-449 suggested, prefer using a Table. If the content per table row is more than just an image and text, you can add a paint listener to draw the row contents yourself.
i created a Dialog with two input fields with the following Code.
public class CCIDDialog extends TitleAreaDialog {
private Text ccidText;
private Text descriptionText;
private String CCID;
private String description;
public CCIDDialog(Shell parentShell) {
super(parentShell);
}
public void create() {
super.create();
setTitle(_title);
setMessage("Bitte geben Sie die CCID "+firstchar+"xxxxxxx und eine Beschreibung ein (max. 7-stellig): ", IMessageProvider.INFORMATION); }
#Override
protected Control createDialogArea(Composite parent) {
Composite area = (Composite) super.createDialogArea(parent);
Composite container = new Composite(area, SWT.NONE);
container.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout layout = new GridLayout(2, false);
container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
container.setLayout(layout);
createCCID(container);
createDescription(container);
return area;
}
private void createCCID(Composite container) {
Label lbtFirstName = new Label(container, SWT.NONE);
lbtFirstName.setText("CCID (ohne "+firstchar+"): ");
GridData dataCCID = new GridData();
dataCCID.grabExcessHorizontalSpace = true;
dataCCID.horizontalAlignment = GridData.FILL;
ccidText = new Text(container, SWT.BORDER);
ccidText.setLayoutData(dataCCID);
}
private void createDescription(Composite container) {
Label lbtLastName = new Label(container, SWT.NONE);
lbtLastName.setText("Beschreibung: ");
GridData dataDescription = new GridData();
dataDescription.grabExcessHorizontalSpace = true;
dataDescription.horizontalAlignment = GridData.FILL;
descriptionText = new Text(container, SWT.BORDER);
descriptionText.setLayoutData(dataDescription);
}
#Override
protected boolean isResizable() {
return true;
}
// save content of the Text fields because they get disposed
// as soon as the Dialog closes
private void saveInput() {
CCID = ccidText.getText();
description = descriptionText.getText();
}
#Override
protected void okPressed() {
saveInput();
super.okPressed();
}
public String getCCID() {
return CCID;
}
public String getDescription() {
return description;
}
}
Is there a way to validate the ccidtext?
If the user type more then 7 chars, he must get a notification and should not be able to continue the dialog. I read so lot at the internet but can`t find a solution for this problem.
Thank u so much for your help.
JonasInt
You can use Text.addModifyListener to add a ModifyListener which will be called each time the text is changed. You can also use Text.addVerifyListener to add VerifyListener which can actually prevent text being entered.
For TitleAreaDialog you can call setMessage or setErrorMessage to display a message in the title area.
You can disable the OK button on the dialog using:
getButton(IDialogConstants.OK_ID).setEnabled(false);
Note: getButton(xxx) can return null if you call it too early in the dialog construction. Buttons are created during the createContents method after the createDialogArea method has been called.
So you can access the buttons by overriding createContents like this:
#Override
protected Control createContents(final Composite parent)
{
Control control = super.createContents(parent);
// TODO access buttons here
return control;
}
I want to build a user interface similar to the sketch below:
When the user fills out the form on the right and clicks the 'Plot!' button, a new closeable tab opens on the left with a chart.
I am new to RCP and have been following this tutorial. I am able to bring up tabs with charts triggered from a menu item. How do I go about:
creating the tab (view?) with the form
open a new chart tab when the user clicks the button
Edit
Here is my current code. It satisfies the basic requirements outlined in this question, but I am not sure if that is the best approach. I would be delighted if someone here can guide me in the right direction.
A view with the form; the button's listener invokes a command.
public class FormView extends ViewPart {
public static final String ID =
FormView.class.getPackage().getName() + ".Form";
private FormToolkit toolkit;
private Form form;
public Text text;
#Override
public void createPartControl(Composite parent) {
toolkit = new FormToolkit(parent.getDisplay());
form = toolkit.createForm(parent);
form.setText("Pie Chucker");
GridLayout layout = new GridLayout();
form.getBody().setLayout(layout);
layout.numColumns = 2;
GridData gd = new GridData();
gd.horizontalSpan = 2;
Label label = new Label(form.getBody(), SWT.NULL);
label.setText("Chart Title:");
text = new Text(form.getBody(), SWT.BORDER);
text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Button button = new Button(form.getBody(), SWT.PUSH);
button.setText("Plot");
gd = new GridData();
gd.horizontalSpan = 2;
button.setLayoutData(gd);
button.addMouseListener(new MouseAdapter() {
#Override
public void mouseDown(MouseEvent e) {
IHandlerService handlerService = (IHandlerService) getSite()
.getService(IHandlerService.class);
try {
handlerService.executeCommand(ShowChartHandler.ID, null);
} catch (Exception ex) {
throw new RuntimeException(ShowChartHandler.ID +
" not found");
}
}
});
}
#Override
public void setFocus() {
}
}
The command invoked by the button from the form. This opens a new view with a chart.
public class ShowChartHandler extends AbstractHandler implements IHandler {
public static final String ID =
ShowChartHandler.class.getPackage().getName() + ".ShowChart";
private int count = 0;
#Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
try {
window.getActivePage().showView(ChartView.ID,
String.valueOf(++count), IWorkbenchPage.VIEW_ACTIVATE);
} catch (PartInitException e) {
e.printStackTrace();
}
return null;
}
}
The view with the chart. It looks up the form view and reads a value from a text field in the form (?!):
public class ChartView extends ViewPart {
public static final String ID =
ChartView.class.getPackage().getName() + ".Chart";
private static final Random random = new Random();
public ChartView() {
// TODO Auto-generated constructor stub
}
#Override
public void createPartControl(Composite parent) {
FormView form =
(FormView) Workbench.getInstance()
.getActiveWorkbenchWindow()
.getActivePage()
.findView(FormView.ID);
String title = form == null? null : form.text.getText();
if (title == null || title.trim().length() == 0) {
title = "Pie Chart";
}
setPartName(title);
JFreeChart chart = createChart(createDataset(), title);
new ChartComposite(parent, SWT.NONE, chart, true);
}
#Override
public void setFocus() {
// TODO Auto-generated method stub
}
/**
* Creates the Dataset for the Pie chart
*/
private PieDataset createDataset() {
Double[] nums = getRandomNumbers();
DefaultPieDataset dataset = new DefaultPieDataset();
dataset.setValue("One", nums[0]);
dataset.setValue("Two", nums[1]);
dataset.setValue("Three", nums[2]);
dataset.setValue("Four", nums[3]);
dataset.setValue("Five", nums[4]);
dataset.setValue("Six", nums[5]);
return dataset;
}
private Double[] getRandomNumbers() {
Double[] nums = new Double[6];
int sum = 0;
for (int i = 0; i < 5; i++) {
int r = random.nextInt(20);
nums[i] = new Double(r);
sum += r;
}
nums[5] = new Double(100 - sum);
return nums;
}
/**
* Creates the Chart based on a dataset
*/
private JFreeChart createChart(PieDataset dataset, String title) {
JFreeChart chart = ChartFactory.createPieChart(title, // chart title
dataset, // data
true, // include legend
true, false);
PiePlot plot = (PiePlot) chart.getPlot();
plot.setSectionOutlinesVisible(false);
plot.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));
plot.setNoDataMessage("No data available");
plot.setCircular(false);
plot.setLabelGap(0.02);
return chart;
}
}
The perspective that ties it all together:
public class Perspective implements IPerspectiveFactory {
public void createInitialLayout(IPageLayout layout) {
layout.setEditorAreaVisible(false);
layout.addStandaloneView(FormView.ID, false,
IPageLayout.RIGHT, 0.3f,
IPageLayout.ID_EDITOR_AREA);
IFolderLayout charts = layout.createFolder("Charts",
IPageLayout.LEFT, 0.7f, FormView.ID);
charts.addPlaceholder(ChartView.ID + ":*");
}
}
I would recommend a different aproach. Eclipse has viewparts (views) and editors. It is easy to open multiple editors. Views are not so much for open multiple ones.
So my suggestion is, that you implement the part you call "FormView" as a StandAloneView and implement the "ChartView" as an editor.
I would also recommend to use a different listener for the button, so also the code will be executed when using the keyboard to click the button.
My proposal:
public class FormView extends ViewPart {
...
button.addSelectionListener(new SelectionAdapter() {
#Override
public void widgetSelected(SelectionEvent e) {
// this below can also be called by a command but you need to take care about the data, which the user put into the fields in different way.
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchPage page = window.getActivePage();
ChartEditorInput input = new ChartEditorInput(text.getText(),...<other data you need to pass>);
try {
page.openEditor(input, ChartEditor.ID);
} catch (PartInitException e) {
e.printStackTrace();
}
}
});
ChartView needs to be changed to ChartEditor. See here http://www.vogella.de/articles/RichClientPlatform/article.html#editor_editorinput how that is done.
ChartEditorInput hereby is a class you need to implement aside the editor class, which holds the data.
In your perspective you call:
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
layout.setFixed(false);
layout.setEditorAreaVisible(true);
layout.addStandaloneView("your.domain.and.FormView", true,IPageLayout.RIGHT, 0.15f, editorArea);
Hope this helps!