Package org.jboss.ballroom.client.widgets.forms

Examples of org.jboss.ballroom.client.widgets.forms.TextBoxItem


        attributesForm = new Form<WorkmanagerPool>(WorkmanagerPool.class);
        attributesForm.setNumColumns(2);
        attributesForm.setEnabled(false);

        TextBoxItem nameItemAttr = new TextBoxItem("name", "Name");
        CheckBoxItem allowCore = new CheckBoxItem ("allowCoreTimeout", "Allow Core Timeout?");
        NumberBoxItem keepAliveTimeout = new NumberBoxItem("keepaliveTime", "Keep Alive Timeout") {
            {
                isRequired = false;
            }
        };
        TextBoxItem threadFactory = new TextBoxItem("threadFactory", "Thread Factory") {
            {
                isRequired = false;
            }
        };

        ComboBoxItem unit = new ComboBoxItem("keepaliveTimeUnit", "Keepalive Timeout Unit");
        unit.setValueMap(new String[] {"DAYS", "HOURS", "MINUTES", "SECONDS", "MILLISECONDS", "NANOSECONDS"});
        unit.selectItem(4);

        attributesForm.setFields(
                nameItemAttr,
                keepAliveTimeout, unit,
                allowCore, threadFactory
        );

        // ---


        sizingForm = new Form<WorkmanagerPool>(WorkmanagerPool.class);
        sizingForm.setNumColumns(2);
        sizingForm.setEnabled(false);

        TextBoxItem nameItemSizing = new TextBoxItem("name", "Name");
        NumberBoxItem maxThreads = new NumberBoxItem("maxThreads", "Max Threads");
        NumberBoxItem maxThreadsPerCPU = new NumberBoxItem("coreThreads", "Core threads");
        NumberBoxItem queueLength = new NumberBoxItem("queueLength", "Queue Length");

        sizingForm.setFields(nameItemSizing,maxThreads, maxThreadsPerCPU, queueLength);
View Full Code Here


        final Form<RoleAssignment> form = new Form<RoleAssignment>(RoleAssignment.class);
        String title = type == GROUP ? Console.CONSTANTS.common_label_group() : Console.CONSTANTS.common_label_user();
        final PrincipalFormItem principalItem = new PrincipalFormItem(type, "principal", title);
        principalItem.setRequired(true);
        principalItem.update(principals);
        final TextBoxItem realmItem = new TextBoxItem("realm", "Realm", false);
        final ComboBoxItem includeExcludeItem = new ComboBoxItem("includeExclude",
                Console.CONSTANTS.administration_include_exclude());
        includeExcludeItem.setValueMap(
                new String[]{Console.CONSTANTS.common_label_include(), Console.CONSTANTS.common_label_exclude()});
        includeExcludeItem.setValue(Console.CONSTANTS.common_label_include());
        // TODO The rolesItem is not part of the focus chain because it's not
        // TODO recognized by org.jboss.ballroom.client.widgets.window.Focus
        final RolesFormItem rolesItem = new RolesFormItem("roles", Console.CONSTANTS.common_label_roles());
        rolesItem.setRequired(true);
        form.setFields(principalItem, realmItem, includeExcludeItem, rolesItem);

        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("window-content");
        layout.add(form.asWidget());
        rolesItem.update(roles);

        DialogueOptions options = new DialogueOptions(
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        FormValidation validation = form.validate();
                        if (!validation.hasErrors()) {
                            RoleAssignment roleAssignment = new RoleAssignment(principalItem.getValue());
                            roleAssignment.setRealm(realmItem.getValue());
                            if (Console.CONSTANTS.common_label_include().equals(includeExcludeItem.getValue())) {
                                roleAssignment.addRoles(rolesItem.getValue());
                            } else if (Console.CONSTANTS.common_label_exclude().equals(includeExcludeItem.getValue())) {
                                roleAssignment.addExcludes(rolesItem.getValue());
                            }
View Full Code Here

        form = new Form<JGroupsProtocol>(JGroupsProtocol.class);
        form.setNumColumns(2);

        TextItem typeField = new TextItem("type", "Type");
        TextBoxItem socket = new TextBoxItem("socketBinding", "Socket Binding");

        form.setFields(typeField, socket);
        form.setEnabled(false);

View Full Code Here

        VerticalPanel panel = new VerticalPanel();
        panel.setStyleName("window-content");

        final Form<PropertyRecord> form = new Form<PropertyRecord>(PropertyRecord.class);

        TextBoxItem nameItem = new TextBoxItem("key", "Name") {
            @Override
            public void setFiltered(boolean filtered) {
                // cannot be filtered (workaround)
            }
        };
View Full Code Here

            toolStrip.addToolButtonRight(verifyBtn);  */

        detailPanel.add(toolStrip.asWidget());

        final TextItem nameItem = new TextItem("name", "Name");
        TextBoxItem jndiItem = new JndiNameItem("jndiName", "JNDI");
        StatusItem enabledFlagItem = new StatusItem("enabled", "Is enabled?");
        TextAreaItem dsClassItem = new TextAreaItem("datasourceClass", "Datasource Class",false);
        TextItem driverItem = new TextItem("driverName", "Driver");

        CheckBoxItem shareStatements = new CheckBoxItem("sharePreparedStatements", "Share Prepared Statements");
View Full Code Here


        form = new ModclusterForm(presenter);

        CheckBoxItem advertise = new CheckBoxItem("advertise", "Advertise");
        TextBoxItem advertiseSocket = new TextBoxItem("advertiseSocket", "Advertise Socket");
        TextBoxItem advertiseKey= new TextBoxItem("advertiseKey", "Advertise Key", false);

        TextBoxItem balancer = new TextBoxItem("balancer", "Balancer", false);
        TextBoxItem loadBalancingGroup = new TextBoxItem("loadBalancingGroup", "Load Balancing Group", false);

        form.setFields(loadBalancingGroup, balancer, advertiseSocket, advertiseKey, advertise);

        // ---

        contextForm = new ModclusterForm(presenter);

        TextAreaItem excludedContexts = new TextAreaItem("excludedContexts", "Excluded Contexts");
        excludedContexts.setRequired(false);
        CheckBoxItem autoEnableContexts = new CheckBoxItem("autoEnableContexts", "Auto Enable Contexts");

        contextForm.setFields(autoEnableContexts, excludedContexts);


        // ---

        proxyForm = new ModclusterForm(presenter);

        TextAreaItem proxyList = new TextAreaItem("proxyList", "Proxy List");
        proxyList.setRequired(false);
        TextBoxItem proxyUrl = new TextBoxItem("proxyUrl", "Proxy Url");

        proxyForm.setFields(proxyUrl, proxyList);


        //---
View Full Code Here

        form = new Form<MailSession>(MailSession.class);
        form.setNumColumns(2);

        TextItem jndi = new TextItem("jndiName", "JNDI Name");
        CheckBoxItem debug = new CheckBoxItem("debug", "Debug Enabled?");
        TextBoxItem from = new TextBoxItem("from", "Default From");

        form.setFields(jndi, debug, from);
        form.setEnabled(false);

View Full Code Here

        form = new Form<JGroupsTransport>(JGroupsTransport.class);
        form.setNumColumns(2);

        TextItem type = new TextItem("type", "Type");
        TextBoxItem socket= new TextBoxItem("socketBinding", "Socket Binding");
        TextBoxItem diagSocket = new TextBoxItem("diagSocketBinding", "Diagnostics Socket");
        CheckBoxItem shared= new CheckBoxItem("shared", "Is Shared?");
        TextBoxItem oobExecutor = new TextBoxItem("oobExecutor", "OOB Executor");
        TextBoxItem timerExecutor = new TextBoxItem("timerExecutor", "timer Executor");
        TextBoxItem defaultExecutor = new TextBoxItem("defaultExecutor", "Default Executor");
        TextBoxItem threadFactory= new TextBoxItem("threadFactory", "Thread Factory");
        TextBoxItem machine = new TextBoxItem("machine", "Machine", false);
        TextBoxItem site= new TextBoxItem("site", "Site", false);
        TextBoxItem rack= new TextBoxItem("rack", "Rack", false);

        /*
    @Binding(skip = true)
    List<PropertyRecord> getProperties();
    void setProperties(List<PropertyRecord> properties);
View Full Code Here

    public Widget asWidget() {
        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("window-content");

        final PojoForm<Role> form = new PojoForm<Role>();
        final TextBoxItem nameItem = new TextBoxItem("name", Console.CONSTANTS.common_label_name());
        final EnumFormItem<StandardRole> baseRoleItem = new EnumFormItem<StandardRole>("baseRole",
                Console.CONSTANTS.administration_base_role());
        baseRoleItem.setValues(UIHelper.enumFormItemsForStandardRole());
        final EnumFormItem<Role.Type> typeItem = new EnumFormItem<Role.Type>("type",
                Console.CONSTANTS.common_label_type());
        typeItem.setDefaultToFirst(true);
        typeItem.setValues(UIHelper.enumFormItemsForScopedRoleTyp());
        final MultiselectListBoxItem scopeItem = new MultiselectListBoxItem("scope",
                Console.CONSTANTS.administration_scope(), 3);
        final CheckBoxItem includeAllItem = new CheckBoxItem("includeAll",
                Console.CONSTANTS.administration_include_all());
        form.setFields(nameItem, baseRoleItem, typeItem, scopeItem, includeAllItem);
        layout.add(form.asWidget());

        typeItem.addChangeHandler(new ChangeHandler() {
            @Override
            public void onChange(final ChangeEvent event) {
                Role.Type type = typeItem.getValue();
                updateScope(type, scopeItem, form);
            }
        });
        updateScope(typeItem.getValue(), scopeItem, form);

        DialogueOptions options = new DialogueOptions(
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        FormValidation validation = form.validate();
                        if (!validation.hasErrors()) {
                            Role scopedRole = new Role(nameItem.getValue(), nameItem.getValue(),
                                    baseRoleItem.getValue(), typeItem.getValue(), scopeItem.getValue());
                            scopedRole.setIncludeAll(includeAllItem.getValue());
                            presenter.addScopedRole(scopedRole);
                        }
                    }
View Full Code Here

        // ----

        form = new Form<MailServerDefinition>(MailServerDefinition.class);

        TextBoxItem socket = new TextBoxItem("socketBinding", "Socket Binding");
        TextBoxItem user = new TextBoxItem("username", "Username");
        PasswordBoxItem pass = new PasswordBoxItem("password", "Password");
        CheckBoxItem ssl = new CheckBoxItem("ssl", "Use SSL?");

        form.setFields(socket, ssl, user, pass);
        form.setEnabled(false);
View Full Code Here

TOP

Related Classes of org.jboss.ballroom.client.widgets.forms.TextBoxItem

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.