All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.as.console.client.shared.subsys.jca.AdapterConnectionProperties Maven / Gradle / Ivy

Go to download

Bundles the core AS7 console as a GWT module. Includes minor customizations to support extensions.

There is a newer version: 0.7.0.Final
Show newest version
package org.jboss.as.console.client.shared.subsys.jca;

import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import org.jboss.as.console.client.shared.properties.PropertyEditor;
import org.jboss.as.console.client.shared.properties.PropertyManagement;
import org.jboss.as.console.client.shared.properties.PropertyRecord;

import java.util.List;

/**
 * @author Heiko Braun
 * @date 7/19/11
 */
public class AdapterConnectionProperties  {

    private ResourceAdapterPresenter presenter;
    private PropertyEditor propertyEditor;
    private PropertyManagement delegate;

    public AdapterConnectionProperties(ResourceAdapterPresenter presenter, PropertyManagement delegate) {
        this.presenter = presenter;
        this.delegate = delegate;
    }

    Widget asWidget() {
        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("fill-layout-width");

        propertyEditor = new PropertyEditor(delegate, true);
        layout.add(propertyEditor.asWidget());
        propertyEditor.setAllowEditProps(false);
        return layout;
    }

    public void setEnabled(boolean b) {
        propertyEditor.setEnabled(b);
    }

    public void updateFrom(List properties) {
        propertyEditor.setProperties("", properties);
    }

    public void clearProperties() {
        propertyEditor.clearValues();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy