view com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandsPage.java @ 90:8f2dd0dbdb87

Externalize strings
author Omair Majid <omajid@redhat.com>
date Tue, 21 Jan 2014 19:51:04 -0500
parents b788a26c0d4d
children 1c835942f3c2
line wrap: on
line source

package com.redhat.thermostat.tools.eclipse.plugin.editor;

import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.FormPage;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.TableWrapLayout;

import com.redhat.thermostat.tools.eclipse.plugin.Messages;
import com.redhat.thermostat.tools.eclipse.plugin.model.Plugin;

public class CommandsPage extends FormPage {

    static final String ID = "com.redhat.thermostat.tools.eclipse.plugin.editor.CommandsPage"; //$NON-NLS-1$
    static final String TITLE = Messages.CommandsPage_title;

    private Plugin model;

    public CommandsPage(FormEditor editor, Plugin model) {
        super(editor, ID, TITLE);

        this.model = model;
    }

    @Override
    protected void createFormContent(IManagedForm managedForm) {
        ScrolledForm form = managedForm.getForm();

        form.setText(Messages.CommandsPage_title);
        form.getBody().setLayout(new TableWrapLayout());

        CommandsMasterDetailsBlock masterAndDetails = new CommandsMasterDetailsBlock(this);
        masterAndDetails.setModel(model);
        masterAndDetails.createContent(managedForm);
    }

}