Search in sources :

Example 11 with FlexCellFormatter

use of com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter in project perun by CESNET.

the class CreateOwnerTabItem method draw.

public Widget draw() {
    VerticalPanel vp = new VerticalPanel();
    vp.setSize("100%", "100%");
    // textboxes which set the class data when updated
    final ExtendedTextBox ownerNameTextBox = new ExtendedTextBox();
    final ExtendedTextBox ownerContactTextBox = new ExtendedTextBox();
    final ListBox ownerType = new ListBox();
    ownerType.addItem(ObjectTranslation.INSTANCE.ownerTypeAdministrative(), "administrative");
    ownerType.addItem(ObjectTranslation.INSTANCE.ownerTypeTechnical(), "technical");
    final ExtendedTextBox.TextBoxValidator nameValidator = new ExtendedTextBox.TextBoxValidator() {

        @Override
        public boolean validateTextBox() {
            if (ownerNameTextBox.getTextBox().getText().trim().isEmpty()) {
                ownerNameTextBox.setError("Name can't be empty.");
                return false;
            }
            ownerNameTextBox.setOk();
            return true;
        }
    };
    final ExtendedTextBox.TextBoxValidator contactValidator = new ExtendedTextBox.TextBoxValidator() {

        @Override
        public boolean validateTextBox() {
            if (ownerContactTextBox.getTextBox().getText().trim().isEmpty()) {
                ownerContactTextBox.setError("Contact can't be empty.");
                return false;
            }
            ownerContactTextBox.setOk();
            return true;
        }
    };
    ownerNameTextBox.setValidator(nameValidator);
    ownerContactTextBox.setValidator(contactValidator);
    // layout
    FlexTable layout = new FlexTable();
    layout.setStyleName("inputFormFlexTable");
    FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();
    // Add some standard form options
    layout.setHTML(0, 0, "Name:");
    layout.setWidget(0, 1, ownerNameTextBox);
    layout.setHTML(1, 0, "Contact:");
    layout.setWidget(1, 1, ownerContactTextBox);
    layout.setHTML(2, 0, "Type:");
    layout.setWidget(2, 1, ownerType);
    for (int i = 0; i < layout.getRowCount(); i++) {
        cellFormatter.addStyleName(i, 0, "itemName");
    }
    // buttons
    TabMenu menu = new TabMenu();
    final TabItem tab = this;
    final CustomButton createButton = TabMenu.getPredefinedButton(ButtonType.CREATE, ButtonTranslation.INSTANCE.createOwner());
    createButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            if (nameValidator.validateTextBox() && contactValidator.validateTextBox()) {
                CreateOwner request = new CreateOwner(JsonCallbackEvents.closeTabDisableButtonEvents(createButton, tab));
                request.createOwner(ownerNameTextBox.getTextBox().getText().trim(), ownerContactTextBox.getTextBox().getText().trim(), ownerType.getValue(ownerType.getSelectedIndex()));
            }
        }
    });
    menu.addWidget(createButton);
    menu.addWidget(TabMenu.getPredefinedButton(ButtonType.CANCEL, "", new ClickHandler() {

        @Override
        public void onClick(ClickEvent clickEvent) {
            session.getTabManager().closeTab(tab, false);
        }
    }));
    vp.add(layout);
    vp.add(menu);
    vp.setCellHorizontalAlignment(menu, HasHorizontalAlignment.ALIGN_RIGHT);
    this.contentWidget.setWidget(vp);
    return getWidget();
}
Also used : FlexCellFormatter(com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) CreateOwner(cz.metacentrum.perun.webgui.json.ownersManager.CreateOwner) ExtendedTextBox(cz.metacentrum.perun.webgui.widgets.ExtendedTextBox) TabMenu(cz.metacentrum.perun.webgui.widgets.TabMenu) TabItem(cz.metacentrum.perun.webgui.tabs.TabItem) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) CustomButton(cz.metacentrum.perun.webgui.widgets.CustomButton)

Example 12 with FlexCellFormatter

use of com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter in project perun by CESNET.

the class CreateFacilityResourceTabItem method draw.

public Widget draw() {
    titleWidget.setText("Create resource");
    VerticalPanel vp = new VerticalPanel();
    vp.setSize("100%", "100%");
    // form inputs
    final ExtendedTextBox nameTextBox = new ExtendedTextBox();
    final TextBox descriptionTextBox = new TextBox();
    final ListBoxWithObjects<VirtualOrganization> vosDropDown = new ListBoxWithObjects<VirtualOrganization>();
    // send button
    final CustomButton createButton = TabMenu.getPredefinedButton(ButtonType.CREATE, ButtonTranslation.INSTANCE.createResource());
    // local events fills the listbox of Vos and Slds
    JsonCallbackEvents event = new JsonCallbackEvents() {

        @Override
        public void onFinished(JavaScriptObject jso) {
            // fill VOs listbox
            vosDropDown.clear();
            ArrayList<VirtualOrganization> vos = JsonUtils.jsoAsList(jso);
            vos = new TableSorter<VirtualOrganization>().sortByName(vos);
            for (VirtualOrganization vo : vos) {
                vosDropDown.addItem(vo);
            }
            if (!vos.isEmpty())
                createButton.setEnabled(true);
        }

        @Override
        public void onLoadingStart() {
            vosDropDown.clear();
            vosDropDown.addItem("Loading...");
            createButton.setEnabled(false);
        }

        @Override
        public void onError(PerunError error) {
            vosDropDown.clear();
            vosDropDown.addItem("Error while loading");
            createButton.setEnabled(false);
        }
    };
    // load available VOs
    final GetVos vos = new GetVos(event);
    vos.setForceAll(true);
    vos.retrieveData();
    // layout
    FlexTable layout = new FlexTable();
    layout.setStyleName("inputFormFlexTable");
    FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();
    // Add some standard form options
    layout.setHTML(0, 0, "On facility:");
    layout.setHTML(0, 1, facility.getName());
    layout.setHTML(1, 0, "For VO:");
    layout.setWidget(1, 1, vosDropDown);
    layout.setHTML(2, 0, "Name:");
    layout.setWidget(2, 1, nameTextBox);
    layout.setHTML(3, 0, "Description:");
    layout.setWidget(3, 1, descriptionTextBox);
    for (int i = 0; i < layout.getRowCount(); i++) {
        cellFormatter.addStyleName(i, 0, "itemName");
    }
    layout.setWidth("350px");
    TabMenu menu = new TabMenu();
    final ExtendedTextBox.TextBoxValidator validator = new ExtendedTextBox.TextBoxValidator() {

        @Override
        public boolean validateTextBox() {
            if (nameTextBox.getTextBox().getText().trim().isEmpty()) {
                nameTextBox.setError("Name can't be empty.");
                return false;
            }
            nameTextBox.setOk();
            return true;
        }
    };
    nameTextBox.setValidator(validator);
    createButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            // loads new tab when creating successful, also disable button
            JsonCallbackEvents localEvents = new JsonCallbackEvents() {

                public void onLoadingStart() {
                    (JsonCallbackEvents.disableButtonEvents(createButton)).onLoadingStart();
                }

                public void onFinished(JavaScriptObject jso) {
                    (JsonCallbackEvents.disableButtonEvents(createButton)).onFinished(jso);
                    Resource res = (Resource) jso;
                    session.getTabManager().addTabToCurrentTab(new CreateFacilityResourceManageServicesTabItem(facility, res), true);
                }

                public void onError(PerunError error) {
                    (JsonCallbackEvents.disableButtonEvents(createButton)).onError(error);
                }
            };
            if (validator.validateTextBox()) {
                // request
                CreateResource request = new CreateResource(localEvents);
                request.createResource(nameTextBox.getTextBox().getText().trim(), descriptionTextBox.getText().trim(), facility.getId(), vosDropDown.getSelectedObject().getId());
            }
        }
    });
    menu.addWidget(createButton);
    final TabItem tab = this;
    menu.addWidget(TabMenu.getPredefinedButton(ButtonType.CANCEL, "", new ClickHandler() {

        @Override
        public void onClick(ClickEvent clickEvent) {
            session.getTabManager().closeTab(tab, false);
        }
    }));
    vp.add(layout);
    vp.add(menu);
    vp.setCellHorizontalAlignment(menu, HasHorizontalAlignment.ALIGN_RIGHT);
    this.contentWidget.setWidget(vp);
    return getWidget();
}
Also used : JsonCallbackEvents(cz.metacentrum.perun.webgui.json.JsonCallbackEvents) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) VirtualOrganization(cz.metacentrum.perun.webgui.model.VirtualOrganization) ExtendedTextBox(cz.metacentrum.perun.webgui.widgets.ExtendedTextBox) ListBoxWithObjects(cz.metacentrum.perun.webgui.widgets.ListBoxWithObjects) CustomButton(cz.metacentrum.perun.webgui.widgets.CustomButton) CreateResource(cz.metacentrum.perun.webgui.json.resourcesManager.CreateResource) FlexCellFormatter(com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter) ImageResource(com.google.gwt.resources.client.ImageResource) Resource(cz.metacentrum.perun.webgui.model.Resource) CreateResource(cz.metacentrum.perun.webgui.json.resourcesManager.CreateResource) GetVos(cz.metacentrum.perun.webgui.json.vosManager.GetVos) ExtendedTextBox(cz.metacentrum.perun.webgui.widgets.ExtendedTextBox) TabMenu(cz.metacentrum.perun.webgui.widgets.TabMenu) TabItem(cz.metacentrum.perun.webgui.tabs.TabItem) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) JavaScriptObject(com.google.gwt.core.client.JavaScriptObject) PerunError(cz.metacentrum.perun.webgui.model.PerunError)

Example 13 with FlexCellFormatter

use of com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter in project perun by CESNET.

the class CreateFormItemTabItem method draw.

public Widget draw() {
    // vertical panel
    VerticalPanel vp = new VerticalPanel();
    vp.setSize("425px", "100%");
    // flex table
    final FlexTable layout = new FlexTable();
    layout.setStyleName("inputFormFlexTable");
    FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();
    // select widget short name
    final ExtendedTextBox shortNameTextBox = new ExtendedTextBox();
    shortNameTextBox.setWidth("200px");
    final ExtendedTextBox.TextBoxValidator validator = new ExtendedTextBox.TextBoxValidator() {

        @Override
        public boolean validateTextBox() {
            if (shortNameTextBox.getTextBox().getText().trim().isEmpty()) {
                shortNameTextBox.setError("Short name can't be empty.");
                return false;
            } else {
                shortNameTextBox.setOk();
                return true;
            }
        }
    };
    shortNameTextBox.setValidator(validator);
    // select widget type
    final ListBox typeListBox = new ListBox();
    for (String type : inputTypes.keySet()) {
        typeListBox.addItem(inputTypes.get(type), type);
    }
    // insert after
    final ListBox insertAfterListBox = new ListBox();
    insertAfterListBox.addItem(" - insert to the beginning - ", 0 + "");
    for (int i = 0; i < sourceList.size(); i++) {
        ApplicationFormItem item = sourceList.get(i);
        // with default en locale
        RegistrarFormItemGenerator gen = new RegistrarFormItemGenerator(item, "");
        String label = gen.getFormItem().getShortname();
        // crop length
        if (label.length() > CROP_LABEL_LENGTH) {
            label = label.substring(0, CROP_LABEL_LENGTH);
        }
        // add to box
        insertAfterListBox.addItem(label, (i + 1) + "");
    }
    layout.setHTML(0, 0, "Short name:");
    layout.setWidget(0, 1, shortNameTextBox);
    layout.setHTML(1, 0, "Input widget:");
    layout.setWidget(1, 1, typeListBox);
    layout.setHTML(2, 0, "Insert after:");
    layout.setWidget(2, 1, insertAfterListBox);
    for (int i = 0; i < layout.getRowCount(); i++) {
        cellFormatter.addStyleName(i, 0, "itemName");
    }
    layout.setHTML(3, 0, "");
    cellFormatter.setColSpan(3, 0, 2);
    cellFormatter.setStyleName(3, 0, "inputFormInlineComment");
    typeListBox.addChangeHandler(new ChangeHandler() {

        @Override
        public void onChange(ChangeEvent event) {
            String type = typeListBox.getValue(typeListBox.getSelectedIndex());
            if (type.equals("TEXTFIELD")) {
                layout.setHTML(3, 0, "Editable text field useful to gather short text input, e.g. name, phone.");
            } else if (type.equals("TEXTAREA")) {
                layout.setHTML(3, 0, "Editable text area useful to gather longer text input with linebreaks, e.g. comments, SSH key");
            } else if (type.equals("SELECTIONBOX")) {
                layout.setHTML(3, 0, "Simple selection box with defined custom values that user can choose.");
            } else if (type.equals("COMBOBOX")) {
                layout.setHTML(3, 0, "Selection box with defined custom values and one special option: \"--custom value--\", which allows users to input own text (as simple text field).");
            } else if (type.equals("CHECKBOX")) {
                layout.setHTML(3, 0, "List of defined custom options with checkboxes. Selected values are gathered as comma separated string.");
            } else if (type.equals("USERNAME")) {
                layout.setHTML(3, 0, "Special text field to gather user`s login. It checks login availability on user input.");
            } else if (type.equals("PASSWORD")) {
                layout.setHTML(3, 0, "Two password fields to gather user`s new password. Input is never displayed. User must type same password in both fields.");
            } else if (type.equals("VALIDATED_EMAIL")) {
                layout.setHTML(3, 0, "Special text field to gather and verify user`s email address. Input is checked on email address format. If user enters new value, then validation email is sent. Application then can't be approved unless provided email address is validated.");
            } else if (type.equals("SUBMIT_BUTTON")) {
                layout.setHTML(3, 0, "Button used to submit the form with custom label. All other form items are checked on valid input before submission. If it fails, form is not sent.");
            } else if (type.equals("AUTO_SUBMIT_BUTTON")) {
                layout.setHTML(3, 0, "Button used to auto-submit the form with custom label. All other form items are checked on valid input before submission. If validation fail (at least once) user must submit form manually. If it's OK, then form is automatically submitted.");
            } else if (type.equals("HTML_COMMENT")) {
                layout.setHTML(3, 0, "Item is used to display custom HTML content anywhere on form. Useful for explanation descriptions, dividing parts of form etc.");
            } else if (type.equals("HEADING")) {
                layout.setHTML(3, 0, "Item is used to display customizable heading of form. Can have any HTML content.");
            } else if (type.equals("TIMEZONE")) {
                layout.setHTML(3, 0, "Selection box with pre-defined values of UTC timezones.");
            } else if (type.equals("FROM_FEDERATION_HIDDEN")) {
                layout.setHTML(3, 0, "Non-editable and hidden form item. Form is submitted even on invalid input ! Useful to automatically gather information provided by AUTH mechanism (IdP federation, certificate).");
            } else if (type.equals("FROM_FEDERATION_SHOW")) {
                layout.setHTML(3, 0, "Non-editable and visible form item. Form is submitted even on invalid input ! Useful to automatically gather information provided by AUTH mechanism (IdP federation, certificate).");
            } else {
                layout.setHTML(3, 0, "");
            }
        }
    });
    layout.setHTML(3, 0, "Editable text field useful to gather short text input, e.g. name, phone.");
    TabMenu menu = new TabMenu();
    // create button
    menu.addWidget(TabMenu.getPredefinedButton(ButtonType.CREATE, ButtonTranslation.INSTANCE.createFormItem(), new ClickHandler() {

        public void onClick(ClickEvent event) {
            if (validator.validateTextBox()) {
                int positionToAdd = Integer.parseInt(insertAfterListBox.getValue(insertAfterListBox.getSelectedIndex()));
                String type = typeListBox.getValue(typeListBox.getSelectedIndex());
                String shortName = shortNameTextBox.getTextBox().getText().trim();
                createItem(shortName, type, positionToAdd);
            }
        }
    }));
    final TabItem tab = this;
    menu.addWidget(TabMenu.getPredefinedButton(ButtonType.CANCEL, "", new ClickHandler() {

        @Override
        public void onClick(ClickEvent clickEvent) {
            session.getTabManager().closeTab(tab, false);
        }
    }));
    vp.add(layout);
    vp.add(menu);
    vp.setCellHorizontalAlignment(menu, HasHorizontalAlignment.ALIGN_RIGHT);
    this.contentWidget.setWidget(vp);
    return getWidget();
}
Also used : FlexCellFormatter(com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) ExtendedTextBox(cz.metacentrum.perun.webgui.widgets.ExtendedTextBox) JSONString(com.google.gwt.json.client.JSONString) TabMenu(cz.metacentrum.perun.webgui.widgets.TabMenu) ApplicationFormItem(cz.metacentrum.perun.webgui.model.ApplicationFormItem) TabItem(cz.metacentrum.perun.webgui.tabs.TabItem) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ChangeEvent(com.google.gwt.event.dom.client.ChangeEvent) RegistrarFormItemGenerator(cz.metacentrum.perun.webgui.client.applicationresources.RegistrarFormItemGenerator) ChangeHandler(com.google.gwt.event.dom.client.ChangeHandler)

Example 14 with FlexCellFormatter

use of com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter in project perun by CESNET.

the class CreateVoResourceTagTabItem method draw.

public Widget draw() {
    VerticalPanel vp = new VerticalPanel();
    // textboxes which set the class data when updated
    final ExtendedTextBox nameTextBox = new ExtendedTextBox();
    nameTextBox.getTextBox().setMaxLength(128);
    final ExtendedTextBox.TextBoxValidator nameValidator = new ExtendedTextBox.TextBoxValidator() {

        @Override
        public boolean validateTextBox() {
            if (!nameTextBox.getTextBox().getText().trim().isEmpty()) {
                nameTextBox.setOk();
                return true;
            } else {
                nameTextBox.setError("Name can't be empty.");
                return false;
            }
        }
    };
    nameTextBox.setValidator(nameValidator);
    // prepares layout
    FlexTable layout = new FlexTable();
    layout.setStyleName("inputFormFlexTable");
    FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();
    // close tab events
    final TabItem tab = this;
    TabMenu menu = new TabMenu();
    // send button
    final CustomButton createButton = TabMenu.getPredefinedButton(ButtonType.CREATE, buttonTranslation.createResourceTag());
    createButton.addClickHandler(new ClickHandler() {

        public void onClick(ClickEvent event) {
            if (!nameValidator.validateTextBox())
                return;
            CreateResourceTag request = new CreateResourceTag(JsonCallbackEvents.closeTabDisableButtonEvents(createButton, tab));
            request.createResourceTag(nameTextBox.getTextBox().getText().trim(), voId);
        }
    });
    // cancel button
    final CustomButton cancelButton = TabMenu.getPredefinedButton(ButtonType.CANCEL, "");
    cancelButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent clickEvent) {
            session.getTabManager().closeTab(tab, false);
        }
    });
    // Add some standard form options
    layout.setHTML(0, 0, "Tag name:");
    layout.setWidget(0, 1, nameTextBox);
    for (int i = 0; i < layout.getRowCount(); i++) {
        cellFormatter.addStyleName(i, 0, "itemName");
    }
    menu.addWidget(createButton);
    menu.addWidget(cancelButton);
    vp.add(layout);
    vp.add(menu);
    vp.setCellHorizontalAlignment(menu, HasHorizontalAlignment.ALIGN_RIGHT);
    this.contentWidget.setWidget(vp);
    return getWidget();
}
Also used : FlexCellFormatter(com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) CreateResourceTag(cz.metacentrum.perun.webgui.json.resourcesManager.CreateResourceTag) ExtendedTextBox(cz.metacentrum.perun.webgui.widgets.ExtendedTextBox) TabMenu(cz.metacentrum.perun.webgui.widgets.TabMenu) TabItem(cz.metacentrum.perun.webgui.tabs.TabItem) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) CustomButton(cz.metacentrum.perun.webgui.widgets.CustomButton)

Example 15 with FlexCellFormatter

use of com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter in project perun by CESNET.

the class CreateVoTabItem method draw.

public Widget draw() {
    VerticalPanel vp = new VerticalPanel();
    // textboxes which set the class data when updated
    final ExtendedTextBox nameTextBox = new ExtendedTextBox();
    final ExtendedTextBox shortNameTextBox = new ExtendedTextBox();
    nameTextBox.getTextBox().setMaxLength(128);
    shortNameTextBox.getTextBox().setMaxLength(32);
    final ExtendedTextBox.TextBoxValidator nameValidator = new ExtendedTextBox.TextBoxValidator() {

        @Override
        public boolean validateTextBox() {
            if (!nameTextBox.getTextBox().getText().trim().isEmpty()) {
                nameTextBox.setOk();
                return true;
            } else {
                nameTextBox.setError("Name can't be empty.");
                return false;
            }
        }
    };
    final ExtendedTextBox.TextBoxValidator shortNameValidator = new ExtendedTextBox.TextBoxValidator() {

        @Override
        public boolean validateTextBox() {
            if (shortNameTextBox.getTextBox().getText().trim().isEmpty()) {
                shortNameTextBox.setError("Short name can't be empty.");
            } else if (!shortNameTextBox.getTextBox().getText().trim().matches(Utils.VO_SHORT_NAME_MATCHER)) {
                shortNameTextBox.setError("Short name can contain only letters, numbers, dash and underscore.");
            } else {
                shortNameTextBox.setOk();
                return true;
            }
            return false;
        }
    };
    nameTextBox.setValidator(nameValidator);
    shortNameTextBox.setValidator(shortNameValidator);
    // prepares layout
    FlexTable layout = new FlexTable();
    layout.setStyleName("inputFormFlexTable");
    FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();
    // close tab events
    final TabItem tab = this;
    TabMenu menu = new TabMenu();
    // send button
    final CustomButton createButton = TabMenu.getPredefinedButton(ButtonType.CREATE, buttonTranslation.createVo());
    createButton.addClickHandler(new ClickHandler() {

        public void onClick(ClickEvent event) {
            if (!nameValidator.validateTextBox())
                return;
            if (!shortNameValidator.validateTextBox())
                return;
            CreateVo request = new CreateVo(JsonCallbackEvents.closeTabDisableButtonEvents(createButton, tab, new JsonCallbackEvents() {

                @Override
                public void onFinished(JavaScriptObject jso) {
                    // new VO must be editable by user in GUI, because it is already in PERUN
                    VirtualOrganization vo = jso.cast();
                    session.addEditableVo(vo.getId());
                }
            }));
            request.createVo(nameTextBox.getTextBox().getText().trim(), shortNameTextBox.getTextBox().getText().trim());
        }
    });
    // cancel button
    final CustomButton cancelButton = TabMenu.getPredefinedButton(ButtonType.CANCEL, "");
    cancelButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent clickEvent) {
            session.getTabManager().closeTab(tab, false);
        }
    });
    // Add some standard form options
    layout.setHTML(0, 0, "Full name:");
    layout.setWidget(0, 1, nameTextBox);
    layout.setHTML(1, 0, "Short name:");
    layout.setWidget(1, 1, shortNameTextBox);
    for (int i = 0; i < layout.getRowCount(); i++) {
        cellFormatter.addStyleName(i, 0, "itemName");
    }
    menu.addWidget(createButton);
    menu.addWidget(cancelButton);
    vp.add(layout);
    vp.add(menu);
    vp.setCellHorizontalAlignment(menu, HasHorizontalAlignment.ALIGN_RIGHT);
    this.contentWidget.setWidget(vp);
    return getWidget();
}
Also used : JsonCallbackEvents(cz.metacentrum.perun.webgui.json.JsonCallbackEvents) FlexCellFormatter(com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) VirtualOrganization(cz.metacentrum.perun.webgui.model.VirtualOrganization) ExtendedTextBox(cz.metacentrum.perun.webgui.widgets.ExtendedTextBox) CreateVo(cz.metacentrum.perun.webgui.json.vosManager.CreateVo) TabMenu(cz.metacentrum.perun.webgui.widgets.TabMenu) TabItem(cz.metacentrum.perun.webgui.tabs.TabItem) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) JavaScriptObject(com.google.gwt.core.client.JavaScriptObject) CustomButton(cz.metacentrum.perun.webgui.widgets.CustomButton)

Aggregations

FlexCellFormatter (com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter)48 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)25 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)25 TabItem (cz.metacentrum.perun.webgui.tabs.TabItem)19 CustomButton (cz.metacentrum.perun.webgui.widgets.CustomButton)19 TabMenu (cz.metacentrum.perun.webgui.widgets.TabMenu)17 ExtendedTextBox (cz.metacentrum.perun.webgui.widgets.ExtendedTextBox)14 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)10 JsonCallbackEvents (cz.metacentrum.perun.webgui.json.JsonCallbackEvents)10 RegistrarFormItemGenerator (cz.metacentrum.perun.webgui.client.applicationresources.RegistrarFormItemGenerator)6 PerunError (cz.metacentrum.perun.webgui.model.PerunError)5 JSONString (com.google.gwt.json.client.JSONString)3 VirtualOrganization (cz.metacentrum.perun.webgui.model.VirtualOrganization)3 ListBoxWithObjects (cz.metacentrum.perun.webgui.widgets.ListBoxWithObjects)3 ArrayList (java.util.ArrayList)3 ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)2 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)2 ImageResource (com.google.gwt.resources.client.ImageResource)2 Anchor (com.google.gwt.user.client.ui.Anchor)2 Image (com.google.gwt.user.client.ui.Image)2