Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.TabPanel$UnmodifiableTabBar


                                              } ) );
        }

        //REVISIT: Nested TabLayoutPanel does not work, its content is truncated.
        //TabLayoutPanel tPanel = new TabLayoutPanel(2, Unit.EM);
        TabPanel tPanel = new TabPanel();

        DirtyableFlexTable codeTable = new DirtyableFlexTable();
        int codeTableRow = 0;
        int codeTableCol = 0;

        codeTable.setWidget( codeTableRow,
                             codeTableCol++,
                             new HTML( "<div class='form-field'>Init:</div>" ) );

        final TextBox initField = new TextBox();
        initField.setTitle( "init code" );
        initField.setText( getFromAccumulatePattern().getInitCode() );
        initField.setEnabled( !this.readOnly );
        codeTable.setWidget( codeTableRow++,
                             codeTableCol--,
                             initField );

        codeTable.setWidget( codeTableRow,
                             codeTableCol++,
                             new HTML( "<div class='form-field'>Action:</div>" ) );
        final TextBox actionField = new TextBox();
        actionField.setTitle( "action code" );
        actionField.setText( getFromAccumulatePattern().getActionCode() );
        actionField.setEnabled( !this.readOnly );
        codeTable.setWidget( codeTableRow++,
                             codeTableCol--,
                             actionField );

        codeTable.setWidget( codeTableRow,
                             codeTableCol++,
                             new HTML( "<div class='form-field'>Reverse:</div>" ) );
        final TextBox reverseField = new TextBox();
        reverseField.setTitle( "reverse code." );
        reverseField.setText( getFromAccumulatePattern().getReverseCode() );
        reverseField.setEnabled( !this.readOnly );
        codeTable.setWidget( codeTableRow++,
                             codeTableCol--,
                             reverseField );

        codeTable.setWidget( codeTableRow,
                             codeTableCol++,
                             new HTML( "<div class='form-field'>Result:</div>" ) );
        final TextBox resultField = new TextBox();
        resultField.setTitle( "result code" );
        resultField.setText( getFromAccumulatePattern().getResultCode() );
        resultField.setEnabled( !this.readOnly );
        codeTable.setWidget( codeTableRow++,
                             codeTableCol--,
                             resultField );

        //panel.setWidget(r++, 0, codeTable);
        ScrollPanel codePanel = new ScrollPanel();
        codePanel.add( codeTable );

        tPanel.add( codePanel,
                    "Custom Code" );

        DirtyableFlexTable functionTable = new DirtyableFlexTable();

        functionTable.setWidget( 0,
                                 0,
                                 new HTML( "<div class='form-field'>Function:</div>" ) );
        final TextBox functionField = new TextBox();
        functionField.setTitle( "function code" );
        functionField.setText( getFromAccumulatePattern().getFunction() );
        functionField.setEnabled( !this.readOnly );
        functionTable.setWidget( 0,
                                 1,
                                 functionField );

        //        panel.setWidget(r++, 0, functionTable);

        ScrollPanel functionPanel = new ScrollPanel();
        functionPanel.add( functionTable );

        tPanel.add( functionPanel,
                    "Function" );
        ChangeHandler changehandler = new ChangeHandler() {

            public void onChange(ChangeEvent event) {
                Widget sender = (Widget) event.getSource();
                TextBox senderTB = (TextBox) event.getSource();
                String code = senderTB.getText();
                setModified( true );
                if ( sender == initField ) {
                    getFromAccumulatePattern().setFunction( null );
                    functionField.setText( "" );
                    getFromAccumulatePattern().setInitCode( code );
                } else if ( sender == actionField ) {
                    getFromAccumulatePattern().setFunction( null );
                    functionField.setText( "" );
                    getFromAccumulatePattern().setActionCode( code );
                } else if ( sender == reverseField ) {
                    getFromAccumulatePattern().setFunction( null );
                    functionField.setText( "" );
                    getFromAccumulatePattern().setReverseCode( code );
                } else if ( sender == resultField ) {
                    getFromAccumulatePattern().setFunction( null );
                    functionField.setText( "" );
                    getFromAccumulatePattern().setResultCode( code );
                } else if ( sender == functionField ) {
                    getFromAccumulatePattern().clearCodeFields();
                    initField.setText( "" );
                    actionField.setText( "" );
                    reverseField.setText( "" );
                    resultField.setText( "" );
                    getFromAccumulatePattern().setFunction( code );
                }
            }
        };

        initField.addChangeHandler( changehandler );
        actionField.addChangeHandler( changehandler );
        reverseField.addChangeHandler( changehandler );
        resultField.addChangeHandler( changehandler );
        functionField.addChangeHandler( changehandler );

        boolean useFunction = getFromAccumulatePattern().useFunctionOrCode().equals( FromAccumulateCompositeFactPattern.USE_FUNCTION );

        tPanel.selectTab( useFunction ? 1 : 0 );

        panel.setWidget( r++,
                         0,
                         tPanel );
View Full Code Here


    }

    private void refreshWidgets() {
        WorkingSetConfigData wsData = (WorkingSetConfigData) workingSet.getContent();

        TabPanel tPanel = new TabPanel();
        //tPanel.setWidth(800);
        ScrollPanel pnl = new ScrollPanel();
        //        pnl.setAutoWidth(true);
        //pnl.setClosable(false);
        pnl.setTitle( "WS Definition" ); //TODO {bauna} i18n
        //        pnl.setAutoHeight(true);
        pnl.add( buildDoubleList( wsData ) );
        tPanel.add( pnl,
                    "WS Definition" );

        pnl = new ScrollPanel();
        //        pnl.setAutoWidth(true);
        //pnl.setClosable(false);
        //pnl.setTitle("WS Constraints"); //TODO {bauna} i18n
        //        pnl.setAutoHeight(true);
        this.factsConstraintsgEditorPanel = new FactsConstraintsEditorPanel( this );
        pnl.add( this.factsConstraintsgEditorPanel );
        tPanel.add( pnl,
                    "WS Constraints" );

        pnl = new ScrollPanel();
        //        pnl.setAutoWidth(true);
        //pnl.setClosable(false);
        pnl.setTitle( "WS Custom Forms" ); //TODO {bauna} i18n
        //        pnl.setAutoHeight(true);
        this.customFormsEditorPanel = new CustomFormsEditorPanel( this );
        pnl.add( this.customFormsEditorPanel );
        tPanel.add( pnl,
                    "WS Custom Forms" );
        tPanel.addBeforeSelectionHandler( new BeforeSelectionHandler<java.lang.Integer>() {

            public void onBeforeSelection(BeforeSelectionEvent<java.lang.Integer> arg0) {
                factsConstraintsgEditorPanel.fillSelectedFacts();
                customFormsEditorPanel.fillSelectedFacts();
            }

        } );

        tPanel.selectTab( 0 );
        initWidget( tPanel );
    }
View Full Code Here

        panel.add(pager);


        // ---------------------

        TabPanel bottomLayout = new TabPanel();
        bottomLayout.addStyleName("default-tabpanel");

        // details

        details = new ServerConfigDetails(presenter);
        bottomLayout.add(details.asWidget(), "Attributes");
        details.bind(serverConfigTable);

        // jvm editor
        jvmEditor = new JvmEditor(presenter);
        jvmEditor.setAddressCallback(new FormHelpPanel.AddressCallback() {
            @Override
            public ModelNode getAddress() {

                ModelNode address = new ModelNode();
                address.add("host", presenter.getSelectedHost());
                address.add("server-config", "*");
                address.add("jvm", "*");
                return address;
            }
        });
        bottomLayout.add(jvmEditor.asWidget(), Console.CONSTANTS.common_label_virtualMachine());

        propertyEditor = new PropertyEditor(presenter);
        propertyEditor.setHelpText("A system property to set on this server.");
        bottomLayout.add(propertyEditor.asWidget(), Console.CONSTANTS.common_label_systemProperties());
        propertyEditor.setAllowEditProps(false);

        portsView = new PortsView();
        //bottomLayout.add(portsView.asWidget(), "Ports");

        // ------------

        panel.add(new ContentGroupLabel("Server Configuration"));
        panel.add(bottomLayout);

        bottomLayout.selectTab(0);


        // --------------------


View Full Code Here

        details =new ServerGroupDetails(presenter);

        // ---------------------------------------------------


        TabPanel bottomLayout = new TabPanel();
        bottomLayout.addStyleName("default-tabpanel");

        bottomLayout.add(details.asWidget(), "Attributes");
        jvmEditor = new JvmEditor(presenter);
        jvmEditor.setAddressCallback(new FormHelpPanel.AddressCallback() {
            @Override
            public ModelNode getAddress() {
                ModelNode address = new ModelNode();
                address.add("server-group", getSelectionModel().getSelectedObject().getGroupName());
                address.add("jvm", "*");
                return address;
            }
        });
        bottomLayout .add(jvmEditor.asWidget(), Console.CONSTANTS.common_label_virtualMachine());

        propertyEditor = new PropertyEditor(presenter);
        propertyEditor.setHelpText("A system property to set on all servers in this server-group.");
        bottomLayout.add(propertyEditor.asWidget(), Console.CONSTANTS.common_label_systemProperties());
        propertyEditor.setAllowEditProps(false);

        bottomLayout.selectTab(0);

        panel.add(new ContentGroupLabel("Server Group"));
        panel.add(bottomLayout);

        details.bind(serverGroupTable);
View Full Code Here

        formWidget.getElement().setAttribute("style", "margin-top:15px;");

        formPanel.add(formWidget);

        // ----------------------------------------------------------
        TabPanel bottomLayout = new TabPanel();
        bottomLayout.addStyleName("default-tabpanel");

        bottomLayout.add(formPanel, "Availability");

        bottomLayout.selectTab(0);

        vpanel.add(new ContentGroupLabel("Status"));

        vpanel.add(bottomLayout);
View Full Code Here

    public TabbedFormLayoutPanel(Class<?> beanType, FormMetaData formMetaData, EnumSet<FrameworkButton> hideButtons,
            FormItemObserver... observers) {
        this.beanType = beanType;
        this.formMetaData = formMetaData;
        this.observers = observers;
        this.tabPanel = new TabPanel();
        this.tabPanel.setStyleName("default-tabpanel");
        this.forms = makeForms();
        this.hideButtons = hideButtons;
    }
View Full Code Here

            }
        });

        // -----------------

        TabPanel bottomPanel = new TabPanel();
        bottomPanel.setStyleName("default-tabpanel");

        bottomPanel.add(details.asWidget(), "Attributes");

         // -----------------

        final FormToolStrip.FormCallback<DataSource> formCallback = new FormToolStrip.FormCallback<DataSource>() {
            @Override
            public void onSave(Map<String, Object> changeset) {
                DataSource ds = getCurrentSelection();
                presenter.onSaveDSDetails(ds.getName(), changeset);
            }

            @Override
            public void onDelete(DataSource entity) {
                // n/a
            }
        };

        connectionEditor = new DataSourceConnectionEditor(formCallback);
        connectionEditor.getForm().bind(dataSourceTable.getCellTable());
        bottomPanel.add(connectionEditor.asWidget(), "Connection");

        securityEditor = new DataSourceSecurityEditor(formCallback);
        securityEditor.getForm().bind(dataSourceTable.getCellTable());
        bottomPanel.add(securityEditor.asWidget(), "Security");

        // -----------------

        connectionProps = new ConnectionProperties(presenter);
        bottomPanel.add(connectionProps.asWidget(), "Properties");

        // -----------------

        poolConfig = new PoolConfigurationView(new PoolManagement() {
            @Override
            public void onSavePoolConfig(String parentName, Map<String, Object> changeset) {
                presenter.onSavePoolConfig(parentName, changeset, false);
            }

            @Override
            public void onResetPoolConfig(String parentName, PoolConfig entity) {
                presenter.onDeletePoolConfig(parentName, entity, false);
            }

            @Override
            public void onDoFlush(String editedName) {
                presenter.onDoFlush(false, editedName);
            }
        });

        bottomPanel.add(poolConfig.asWidget(), "Pool");


        // ----

        validationEditor = new DataSourceValidationEditor(formCallback);
        validationEditor.getForm().bind(dataSourceTable.getCellTable());
        bottomPanel.add(validationEditor.asWidget(), "Validation");

        bottomPanel.selectTab(0);

        // -----------------

        vpanel.add(new ContentGroupLabel("Datasource"));
        vpanel.add(bottomPanel);
View Full Code Here

                XADataSource selectedObject = ((SingleSelectionModel<XADataSource>) dataSourceTable.getSelectionModel()).getSelectedObject();
                presenter.loadPoolConfig(true, selectedObject.getName());
            }
        });

        TabPanel bottomPanel = new TabPanel();
        bottomPanel.setStyleName("default-tabpanel");


        bottomPanel.add(details.asWidget(), "Attributes");



        final FormToolStrip.FormCallback<XADataSource> xaCallback = new FormToolStrip.FormCallback<XADataSource>() {
            @Override
            public void onSave(Map<String, Object> changeset) {
                DataSource ds = getCurrentSelection();
                presenter.onSaveXADetails(ds.getName(), changeset);
            }

            @Override
            public void onDelete(XADataSource entity) {
                // n/a
            }
        };

        final FormToolStrip.FormCallback<DataSource> dsCallback = new FormToolStrip.FormCallback<DataSource>() {
            @Override
            public void onSave(Map<String, Object> changeset) {
                DataSource ds = getCurrentSelection();
                presenter.onSaveXADetails(ds.getName(), changeset);
            }

            @Override
            public void onDelete(DataSource entity) {
                // n/a
            }
        };

        connectionEditor = new XADataSourceConnection(xaCallback);
        connectionEditor.getForm().bind(dataSourceTable);
        bottomPanel.add(connectionEditor.asWidget(), "Connection");

        securityEditor = new DataSourceSecurityEditor(dsCallback);
        securityEditor.getForm().bind(dataSourceTable);
        bottomPanel.add(securityEditor.asWidget(), "Security");

        bottomPanel.add(propertyEditor.asWidget(), "Properties");
        propertyEditor.setAllowEditProps(false);

        poolConfig = new PoolConfigurationView(new PoolManagement() {
            @Override
            public void onSavePoolConfig(String parentName, Map<String, Object> changeset) {
                presenter.onSavePoolConfig(parentName, changeset, true);
            }

            @Override
            public void onResetPoolConfig(String parentName, PoolConfig entity) {
                presenter.onDeletePoolConfig(parentName, entity, true);
            }

            @Override
            public void onDoFlush(String editedName) {
                presenter.onDoFlush(true, editedName);
            }
        });

        bottomPanel.add(poolConfig.asWidget(), "Pool");

        validationEditor = new DataSourceValidationEditor(dsCallback);
        validationEditor.getForm().bind(dataSourceTable);
        bottomPanel.add(validationEditor.asWidget(), "Validation");

        bottomPanel.selectTab(0);
        vpanel.add(new ContentGroupLabel("XA Datasource"));
        vpanel.add(bottomPanel);
        return layout;
    }
View Full Code Here

        panel.add(factoryTable);

        // ----

        panel.add(new ContentGroupLabel("Subresources"));
        TabPanel bottomLayout = new TabPanel();
        bottomLayout.addStyleName("default-tabpanel");
        bottomLayout.getElement().setAttribute("style", "padding-top:20px;");

        queueList = new QueueList(presenter);
        bottomLayout.add(queueList.asWidget(),"Queues");

        topicList = new TopicList(presenter);
        bottomLayout.add(topicList.asWidget(),"Topics");

        bottomLayout.selectTab(0);

        panel.add(bottomLayout);

        return layout;
    }
View Full Code Here

        attributesTable.setSelectionModel(ssm);


        wizard = getWizard();

        TabPanel bottomTabs = new TabPanel();
        bottomTabs.setStyleName("default-tabpanel");
        bottomTabs.add(wizard.asWidget(), "Attributes");
        bottomTabs.add(propertyEditor.asWidget(), "Module Options");

        vpanel.add(new ContentGroupLabel("Details"));

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

        // -------

        ScrollPanel scroll = new ScrollPanel(vpanel);
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.TabPanel$UnmodifiableTabBar

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.