Example usage for com.google.gwt.user.client.ui TabPanel TabPanel

List of usage examples for com.google.gwt.user.client.ui TabPanel TabPanel

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui TabPanel TabPanel.

Prototype

public TabPanel() 

Source Link

Document

Creates an empty tab panel.

Usage

From source file:org.onecmdb.ui.gwt.modeller.client.view.screen.TemplateViewScreen.java

License:Open Source License

public TemplateViewScreen() {
    super();//ww w .j  a  v  a2  s . c om
    /*
    if (true) {
       styleTwo();
       return;
    }
    */
    vPanel = new VerticalPanel();
    /*
    HorizontalPanel editPanel = new HorizontalPanel();
    HTML edit = new HTML("[<a href='javascript:;'>edit</a>]");
    edit.addClickListener(new ClickListener() {
            
       public void onClick(Widget sender) {
    getBaseEntryScreen().showScreen(OneCMDBModelCreator.EDIT_TEMPLATE_SCREEN, objectType, new Long(0));
            
       }
               
    });
    editPanel.add(edit);
    editPanel.setCellHorizontalAlignment(edit, HorizontalPanel.ALIGN_RIGHT);
    editPanel.setWidth("100%");
    */
    infoPanel = new VerticalPanel();
    infoPanel.setStyleName("mdv-form");
    infoPanel.setWidth("100%");

    attributeScreen.setBaseEntryScreen(OneCMDBModelCreator.get());
    referenceScreen.setBaseEntryScreen(OneCMDBModelCreator.get());
    instancesScreen.setBaseEntryScreen(OneCMDBModelCreator.get());
    tab = new TabPanel();
    tab.add(infoPanel, "Info");
    tab.add(attributeScreen, "Attributes");
    tab.add(referenceScreen, "References");
    tab.add(instancesScreen, "Instances");
    instancesScreen.setNewSupport(true);
    tab.addTabListener(this);
    tab.selectTab(1);

    //vPanel.add(infoPanel);
    vPanel.add(tab);

    dockPanel.add(vPanel, DockPanel.CENTER);
    dockPanel.setCellHeight(vPanel, "100%");
    dockPanel.setSize("100%", "100%");
    //ScrollPanel p = new ScrollPanel(dockPanel);
    //p.setAlwaysShowScrollBars(true);
    initWidget(dockPanel);
}

From source file:org.pathvisio.wikipathways.client.WikiPathwaysSearch.java

License:Apache License

/**
 * Create the search panels./*  w w  w.  j  a va  2s.co m*/
 */
private Widget createSearchPanel() {
    //Deck panel for all searches
    tabPanel = new TabPanel();
    tabPanel.setStylePrimaryName(STYLE_TABPANEL);

    //Text search
    SearchPanel textPanel = new SearchPanel(this);
    type2panel.put(Query.TYPE_TEXT, textPanel);
    tabPanel.add(textPanel, "Text search");
    textPanel.setSize("auto", "auto");

    //Id search
    SearchPanel idPanel = new IdSearchPanel(this);
    type2panel.put(Query.TYPE_ID, idPanel);
    tabPanel.add(idPanel, "Identifier search");
    idPanel.setSize("auto", "auto");

    mainPanel.add(tabPanel, DockPanel.CENTER);
    tabPanel.selectTab(0);
    return tabPanel;
}

From source file:org.pentaho.ui.xul.gwt.tags.GwtTabbox.java

License:Open Source License

public GwtTabbox(Orient orient) {
    super(ELEMENT_NAME);
    tabPanel = new TabPanel();
    setManagedObject(tabPanel);
}

From source file:org.picketlink.as.console.client.ui.federation.AbstractFederationDetailEditor.java

License:Open Source License

private void createDetailsSection(VerticalPanel vpanel) {
    // adds the title for the details section
    vpanel.add(new ContentGroupLabel("Details"));

    // adds the tabs for the details section
    bottomTabs = new TabPanel();
    bottomTabs.setStyleName("default-tabpanel");
    bottomTabs.addStyleName("master_detail-detail");

    wizard = doCreateWizard();//w w  w  .  ja v a2 s  .  co m

    doCreateAttributesTab(bottomTabs);

    addDetailsSectionTabs(bottomTabs);

    vpanel.add(bottomTabs);
    bottomTabs.selectTab(0);
}

From source file:org.picketlink.as.console.client.ui.federation.NewFederationDetails.java

License:Open Source License

@Override
public Widget asWidget() {
    this.tabPanel = new TabPanel();
    tabPanel.setStyleName("default-tabpanel");
    tabPanel.addStyleName("master_detail-detail");

    VerticalPanel layout = new VerticalPanel();

    final TextItem aliasItem = new TextItem("name", uiConstants.common_label_federationName());

    form.setFields(aliasItem);/*from ww  w  .  j  a v  a2  s  . com*/
    form.setEnabled(false);

    layout.add(new FormLayout().setTools(null).setForm(form).build());

    tabPanel.add(layout, "Attributes");

    this.samlConfigurationDetails = new SAMLConfigurationDetails(this.presenter);

    tabPanel.add(this.samlConfigurationDetails.asWidget(), "SAML Configuration");

    tabPanel.selectTab(0);

    return tabPanel;
}

From source file:org.quartz.GWTQuartzManager.client.QuartzManager.java

License:Open Source License

public void onModuleLoad() {
    //catch exception
    GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
        public void onUncaughtException(Throwable e) {
            log.log(Level.SEVERE, e.getMessage(), e);
        }/*from w w w  .  j av a2 s .  c  o m*/
    });
    Logger.getLogger("").addHandler(new ErrorDialog().getHandler());

    eventBus.addHandler(TriggerJobEvent.TYPE, new TriggerJobEvent.Handler() {
        @Override
        public void fireTrigger(GWTJobDetail jobDetail) {
            scheduler.triggerJob(jobDetail.getKey(), new GWTQuartzScheduler.nopAsynCallback<Void>());
        }
    });

    eventBus.addHandler(DeleteJobEvent.TYPE, new DeleteJobEvent.Handler() {

        @Override
        public void deleteJob(GWTJobDetail jobDetail) {
            scheduler.deleteJob(jobDetail.getKey(), new AsyncCallback<Boolean>() {

                @Override
                public void onFailure(Throwable caught) {
                    // TODO Auto-generated method stub

                }

                @Override
                public void onSuccess(Boolean result) {
                    updateJobs();
                }
            });
        }
    });

    eventBus.addHandler(EditTriggerEvent.TYPE, new EditTriggerEvent.Handler() {

        @Override
        public void startEdit(GWTTrigger trigger) {
            //TODO in the future, there may be some subclasses of GWTTrigger other than WGTCronTrigger.
            //do instanceof check
            EditCronTriggerWorkflow newTriggerWorkflow = new EditCronTriggerWorkflow(scheduler);
            newTriggerWorkflow.edit((GWTCronTrigger) trigger);
        }
    });

    eventBus.addHandler(ToggleTriggerStateEvent.TYPE, new ToggleTriggerStateEvent.Handler() {

        @Override
        public void resume(GWTTrigger trigger) {
            scheduler.resumeTrigger(trigger.getKey(), new GWTQuartzScheduler.nopAsynCallback<Void>());
        }

        @Override
        public void pause(GWTTrigger trigger) {
            scheduler.pauseTrigger(trigger.getKey(), new GWTQuartzScheduler.nopAsynCallback<Void>());
        }
    });

    eventBus.addHandler(EditJobEvent.TYPE, new EditJobEvent.Handler() {

        @Override
        public void editJob(GWTJobDetail jobDetail, boolean create) {
            new EditJobDetailWorkflow(scheduler, create).edit(jobDetail);
        }
    });

    RootPanel rootPanel = RootPanel.get();
    rootPanel.setSize("100%", "100%");

    DockPanel dockPanel = new DockPanel();
    rootPanel.add(dockPanel);
    dockPanel.setSize("", "100%");

    SimplePanel simplePanel = new SimplePanel();
    simplePanel.add(new SchedulerAdminButtonsWidget(scheduler));
    dockPanel.add(simplePanel, DockPanel.NORTH);

    SimplePanel simplePanel_1 = new SimplePanel();
    dockPanel.add(simplePanel_1, DockPanel.EAST);
    dockPanel.setCellWidth(simplePanel_1, "20%");
    simplePanel_1.setWidth("");

    executedJobsTable = new CellTable<GWTQuartzJobExecutionContext>();
    simplePanel_1.setWidget(executedJobsTable);
    executedJobsTable.setSize("100%", "100%");
    executedJobsTable.setTableLayoutFixed(false);

    TextColumn<GWTQuartzJobExecutionContext> ejJobName = new TextColumn<GWTQuartzJobExecutionContext>() {
        @Override
        public String getValue(GWTQuartzJobExecutionContext object) {
            return object.getJobKey().getName();
        }
    };
    executedJobsTable.addColumn(ejJobName, "job name");

    TextColumn<GWTQuartzJobExecutionContext> ejTriggerName = new TextColumn<GWTQuartzJobExecutionContext>() {
        @Override
        public String getValue(GWTQuartzJobExecutionContext object) {
            return object.getTriggerKey().getName();
        }
    };
    executedJobsTable.addColumn(ejTriggerName, "trigger name");

    Column<GWTQuartzJobExecutionContext, Number> ejRunTime = new Column<GWTQuartzJobExecutionContext, Number>(
            new NumberCell()) {
        @Override
        public Number getValue(GWTQuartzJobExecutionContext object) {
            return new Long(object.getJobRunTime());
        }
    };
    executedJobsTable.addColumn(ejRunTime, "run time");
    jobExecuationContextsProvider.addDataDisplay(executedJobsTable);

    final TabPanel tabPanel = new TabPanel();
    dockPanel.add(tabPanel, DockPanel.CENTER);
    dockPanel.setCellHeight(tabPanel, "100%");
    tabPanel.setSize("100%", "100%");
    VerticalPanel verticalPanel = new VerticalPanel();
    tabPanel.add(verticalPanel, "Jobs", false);
    verticalPanel.setSize("100%", "100%");
    tabPanel.selectTab(0);

    HorizontalPanel horizontalPanel_1 = new HorizontalPanel();
    verticalPanel.add(horizontalPanel_1);
    verticalPanel.setCellHeight(horizontalPanel_1, "22");
    verticalPanel.setCellWidth(horizontalPanel_1, "100%");

    Label lblNewLabel = new Label("Job Group");
    horizontalPanel_1.add(lblNewLabel);
    lblNewLabel.setWidth("67px");

    cbGroupName = new ListBox();
    horizontalPanel_1.add(cbGroupName);

    cbGroupName.addItem(ALL_GROUPS);
    cbGroupName.addChangeHandler(new ChangeHandler() {

        @Override
        public void onChange(ChangeEvent event) {
            updateJobs();
        }
    });

    final SimplePanel jobPanel = new SimplePanel();
    verticalPanel.add(jobPanel);
    verticalPanel.setCellHeight(jobPanel, "100%");
    verticalPanel.setCellWidth(jobPanel, "100%");
    jobPanel.setSize("100%", "");
    jobPanel.setStyleName("boxed");
    final JobsTable jobsTable = new JobsTable(jobsProvider, eventBus);
    jobPanel.add(jobsTable);
    jobsTable.setSize("100%", "397px");

    VerticalPanel verticalPanel_1 = new VerticalPanel();
    tabPanel.add(verticalPanel_1, "triggers", false);
    verticalPanel_1.setSize("100%", "100%");

    HorizontalPanel horizontalPanel_2 = new HorizontalPanel();
    verticalPanel_1.add(horizontalPanel_2);
    verticalPanel_1.setCellWidth(horizontalPanel_2, "100%");
    verticalPanel_1.setCellHeight(horizontalPanel_2, "22");

    Label lblGroup = new Label("Trigger Group");
    horizontalPanel_2.add(lblGroup);

    cbTriggerGroup = new ListBox();
    cbTriggerGroup.addItem(ALL_GROUPS);
    cbTriggerGroup.addChangeHandler(new ChangeHandler() {

        @Override
        public void onChange(ChangeEvent event) {
            updateTriggers();
        }
    });

    horizontalPanel_2.add(cbTriggerGroup);

    Button btnPauseAll = new Button("Pause All");
    btnPauseAll.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            scheduler.pauseAll(new AsyncCallback<Void>() {

                @Override
                public void onFailure(Throwable caught) {
                    // TODO Auto-generated method stub

                }

                @Override
                public void onSuccess(Void result) {
                    // TODO Auto-generated method stub

                }
            });
        }
    });
    horizontalPanel_2.add(btnPauseAll);
    horizontalPanel_2.setCellHorizontalAlignment(btnPauseAll, HasHorizontalAlignment.ALIGN_RIGHT);

    Button btnResumeAll = new Button("Resume All");
    btnResumeAll.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            scheduler.resumeAll(new AsyncCallback<Void>() {

                @Override
                public void onFailure(Throwable caught) {
                    // TODO Auto-generated method stub

                }

                @Override
                public void onSuccess(Void result) {
                    // TODO Auto-generated method stub

                }
            });
        }
    });
    horizontalPanel_2.add(btnResumeAll);

    Button btnPauseGroup = new Button("Pause Group");
    btnPauseGroup.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            String selectedGroup = cbTriggerGroup.getItemText(cbTriggerGroup.getSelectedIndex());
            scheduler.pauseTriggers(selectedGroup, new AsyncCallback<Void>() {

                @Override
                public void onFailure(Throwable caught) {
                    // TODO Auto-generated method stub

                }

                @Override
                public void onSuccess(Void result) {
                    // TODO Auto-generated method stub

                }
            });
        }
    });
    horizontalPanel_2.add(btnPauseGroup);

    Button btnResumeGroup = new Button("Resume Group");
    btnResumeGroup.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            String selectedGroup = cbTriggerGroup.getItemText(cbTriggerGroup.getSelectedIndex());
            scheduler.resumeTriggers(selectedGroup, new AsyncCallback<Void>() {

                @Override
                public void onFailure(Throwable caught) {
                    // TODO Auto-generated method stub

                }

                @Override
                public void onSuccess(Void result) {
                    // TODO Auto-generated method stub

                }
            });
        }
    });
    horizontalPanel_2.add(btnResumeGroup);

    SimplePanel triggerPanel = new SimplePanel();
    verticalPanel_1.add(triggerPanel);
    triggerPanel.setSize("100%", "390px");
    TriggersTable triggersTable = new TriggersTable(eventBus, triggersProvider);
    triggerPanel.add(triggersTable);
    triggersTable.setSize("100%", "100%");

    scheduler.getJobGroupNames(new AsyncCallback<ArrayList<String>>() {

        @Override
        public void onSuccess(ArrayList<String> result) {
            for (String name : result) {
                cbGroupName.addItem(name);
            }
            updateJobs();
        }

        @Override
        public void onFailure(Throwable caught) {
            // TODO Auto-generated method stub

        }
    });

    //polling jobs, triggers and job executions status
    new com.google.gwt.user.client.Timer() {
        @Override
        public void run() {

            updateJobs();

            updateTriggers();

            updateJobExecutionContexts();
            this.schedule(2000);
        }
    }.schedule(2000);

    scheduler.getTriggerGroupNames(new AsyncCallback<List<String>>() {

        @Override
        public void onFailure(Throwable caught) {
            // TODO Auto-generated method stub

        }

        @Override
        public void onSuccess(List<String> result) {
            for (String group : result) {
                cbTriggerGroup.addItem(group);
            }
            updateTriggers();
        }
    });

    //update trigger group combo box

}

From source file:org.sakaiproject.sgs2.client.Sgs2.java

License:Educational Community License

public Sgs2() {

    // This is a reference for the declared servlet in Sgs2.gwt.xml
    ((ServiceDefTarget) groovyShellService).setServiceEntryPoint(GWT.getModuleBaseURL() + "shell");

    // Fix Sakai parent iFrame height
    configureSakaiParentIframe(AppConstants.SAKAI_PARENT_IFRAME_HEIGHT);

    i18nC = GWT.create(I18nConstants.class);
    i18nM = GWT.create(I18nMessages.class);

    mainVerticalPanel = new VerticalPanel();
    inputVerticalPanel = new VerticalPanel();
    menuAndStatusPanel = new HorizontalPanel();
    statusPanel = new VerticalPanel();

    status = new HTML("");

    scriptLabel = new Label(i18nC.scriptLabel());
    scriptName = new Label("");

    autoSaveConfigCheckBox = new CheckBox(i18nC.autoSaveConfigLabel());

    textArea = new TextArea();

    runButton = new Button(i18nC.runButton());
    parseButton = new Button(i18nC.parseButton());
    clearButton = new Button(i18nC.clearButton());

    resultTabPanel = new TabPanel();

    outputFlowPanel = new FlowPanel();
    resultFlowPanel = new FlowPanel();
    stackTraceFlowPanel = new FlowPanel();
    historyFlowPanel = new FlowPanel();
    consoleFlowPanel = new FlowPanel();

    menu = new MenuBar();
    fileMenu = new MenuBar(true);
    editMenu = new MenuBar(true);
    scriptsMenu = new Sgs2MenuBar(true);

    statusFlexTable = new FlexTable();
    buttonFlexTable = new FlexTable();
}

From source file:org.sonar.plugins.core.ui.pageselector.client.PageSelector.java

License:Open Source License

private void displayResource(final Resource resource) {
    List<PageDef> pages = selectPages(resource);

    PageDef selectedPage = selectPage(pages);

    Title title = new Title(resource);
    final TabPanel tabs = new TabPanel();
    tabs.setWidth("100%");

    int selectedTabIndex = -1;
    for (int tabIndex = 0; tabIndex < pages.size(); tabIndex++) {
        PageDef page = pages.get(tabIndex);
        tabs.add(new PagePanel(page), page.getName());
        if (page == selectedPage) {
            selectedTabIndex = tabIndex;
        }/*from ww  w. j a va2 s .c  o m*/
    }

    container.clear(); // remove the loading icon
    container.add(title);
    container.add(tabs);

    tabs.addSelectionHandler(new SelectionHandler<Integer>() {
        public void onSelection(SelectionEvent<Integer> tabId) {
            ((PagePanel) tabs.getWidget(tabId.getSelectedItem())).display();
        }
    });

    if (selectedTabIndex > -1) {
        tabs.selectTab(selectedTabIndex);
    }
}

From source file:org.switchyard.console.client.ui.service.ServiceEditor.java

License:Apache License

/**
 * @return this editor as a Widget.//from w ww  .ja  v a  2  s  . c o m
 */
public Widget asWidget() {
    VerticalPanel panel = new VerticalPanel();
    panel.add(new ContentGroupLabel(Singleton.MESSAGES.label_serviceDetails()));
    panel.add(new ContentDescription(Singleton.MESSAGES.description_serviceDetails()));
    panel.add(createImplementationDetailsPanel());

    TabPanel tabs = new TabPanel();
    tabs.setStyleName("default-tabpanel"); //$NON-NLS-1$
    tabs.getElement().setAttribute("style", "margin-top:15px;"); //$NON-NLS-1$ //$NON-NLS-2$
    tabs.add(createGatewayDetailsPanel(), Singleton.MESSAGES.label_gateways());
    tabs.add(createThrottlingDetailsPanel(), Singleton.MESSAGES.label_throttling());
    tabs.addBeforeSelectionHandler(new BeforeSelectionHandler<Integer>() {
        @Override
        public void onBeforeSelection(BeforeSelectionEvent<Integer> event) {
            _toolstrip.doCancel();
        }
    });

    panel.add(tabs);
    tabs.selectTab(0);

    return panel;
}

From source file:org.tritarget.client.CipherEncoder.java

License:Educational Community License

/**
 * This is the entry point method.//www. jav a 2s  .  co  m
 */
// onModuleLoad() {{{
public void onModuleLoad() {
    int tab_index = 1;

    // Setup debug panel {{{2
    this.debug_panel = new VerticalPanel();

    // Setup the main panel. {{{2
    debug("Initializing main panel.");
    VerticalPanel main_panel = new VerticalPanel();
    HorizontalPanel top_panel = new HorizontalPanel();
    VerticalPanel chooser_panel = new VerticalPanel();
    VerticalPanel keys_panel = new VerticalPanel();
    HorizontalPanel buttons_panel = new HorizontalPanel();
    HorizontalPanel text_panel = new HorizontalPanel();
    DisclosurePanel disclose_panel = new DisclosurePanel("Debug Console");
    disclose_panel.add(this.debug_panel);

    // Setup the key entries {{{2
    debug("Initializing key entry panel.");
    this.key1 = new TextBox();
    this.key1.addChangeListener(this);
    this.key1.setTabIndex(tab_index++);
    this.key2 = new TextBox();
    this.key2.addChangeListener(this);
    this.key2.setTabIndex(tab_index++);
    keys_panel.add(new Label("First Key:"));
    keys_panel.add(key1);
    keys_panel.add(new Label("Second Key:"));
    keys_panel.add(key2);
    top_panel.add(keys_panel);

    // Setup the cipher chooser. {{{2
    debug("Initializing cipher chooser panel.");
    chooser_panel.add(new Label("Choose Cipher:"));
    this.cipher_choice = new RadioButton[4];
    this.cipher_choice[0] = new RadioButton("cipher_choice_group", "Double Box Playfair");
    this.cipher_choice[1] = new RadioButton("cipher_choice_group", "Double Transposition");
    this.cipher_choice[2] = new RadioButton("cipher_choice_group", "Both");
    this.cipher_choice[3] = new RadioButton("cipher_choice_group", "Rot13");
    for (int i = 0; i < this.cipher_choice.length; i++) {
        this.cipher_choice[i].setTabIndex(-1);
        this.cipher_choice[i].addClickListener(this);
        chooser_panel.add(this.cipher_choice[i]);
    }
    this.cipher_choice[2].setChecked(true);
    top_panel.add(chooser_panel);

    // Setup the Text input and output box {{{2
    debug("Initializing text area panels.");
    this.text = new TextArea();
    this.text.setCharacterWidth(40);
    this.text.setVisibleLines(5);
    this.text.addChangeListener(this);
    this.text.setTabIndex(tab_index++);
    this.output = new TextArea();
    this.output.setCharacterWidth(40);
    this.output.setVisibleLines(5);
    this.output.setTabIndex(-1);
    this.output.setReadOnly(true);
    this.output.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
            TextArea ta = (TextArea) sender;
            ta.setSelectionRange(0, ta.getText().length());
        }
    });
    VerticalPanel left_text_panel = new VerticalPanel();
    left_text_panel.add(new Label("Enter text to encode/decode:"));
    left_text_panel.add(this.text);
    text_panel.add(left_text_panel);
    VerticalPanel right_text_panel = new VerticalPanel();
    right_text_panel.add(new Label("Result:"));
    right_text_panel.add(this.output);
    Button copy_btn = new Button("Use as new text");
    copy_btn.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
            CipherEncoder.this.text.setText(CipherEncoder.this.output.getText());
            CipherEncoder.this.output.setText("");
        }
    });
    right_text_panel.add(copy_btn);
    right_text_panel.setCellHorizontalAlignment(copy_btn, HorizontalPanel.ALIGN_RIGHT);
    text_panel.add(right_text_panel);

    // Setup the buttons panel {{{2
    debug("Initializing button panel.");
    this.encode_btn = new Button("Encode");
    this.encode_btn.setEnabled(false);
    this.encode_btn.setTabIndex(tab_index++);
    this.encode_btn.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
            CipherEncoder.this.encode();
        }
    });
    this.decode_btn = new Button("Decode");
    this.decode_btn.setEnabled(false);
    this.decode_btn.setTabIndex(tab_index++);
    this.decode_btn.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
            CipherEncoder.this.decode();
        }
    });
    buttons_panel.add(this.encode_btn);
    buttons_panel.add(new Label("<-->"));
    buttons_panel.add(this.decode_btn);

    // Setup tabs {{{2
    debug("Initializing main tab panel");
    this.main_tab_panel = new TabPanel();
    this.main_tab_panel.add(main_panel, "Main");
    this.main_tab_panel.add(AboutBox.getHtml(), "About");
    this.main_tab_panel.selectTab(0);

    // Setting style classes. {{{2
    debug("Stylizing panels");
    main_panel.addStyleName("main-panel");
    top_panel.addStyleName("top-panel");
    keys_panel.addStyleName("keys-panel");
    chooser_panel.addStyleName("chooser-panel");
    buttons_panel.addStyleName("buttons-panel");
    text_panel.addStyleName("text-panel");
    disclose_panel.addStyleName("disclose-panel");
    this.main_tab_panel.addStyleName("main-tab-panel");
    this.text.addStyleDependentName("input");
    this.output.addStyleDependentName("output");

    // Add panels to main container {{{2
    debug("Rendering.");
    main_panel.add(InstructionBox.getHtml());
    main_panel.add(top_panel);
    main_panel.add(buttons_panel);
    main_panel.add(text_panel);
    main_panel.add(disclose_panel);

    // Add main panel to the root {{{2
    RootPanel.get().add(this.main_tab_panel);
    RootPanel.get("loading").setVisible(false);
    this.key1.setFocus(true);
    debug("Application ready.");
}