Example usage for com.google.gwt.user.client.ui VerticalSplitPanel setTopWidget

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

Introduction

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

Prototype

public void setTopWidget(Widget w) 

Source Link

Document

Sets the widget in the top of the panel.

Usage

From source file:com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel.java

License:Apache License

/**
 * Initialize this example.//from  w ww  .j  a  v a2s.  c  o m
 */
@ShowcaseSource
@Override
public Widget onInitialize() {
    // Create a Vertical Split Panel
    VerticalSplitPanel vSplit = new VerticalSplitPanel();
    vSplit.ensureDebugId("cwVerticalSplitPanel");
    vSplit.setSize("500px", "350px");
    vSplit.setSplitPosition("30%");

    // Add some content
    String randomText = constants.cwVerticalSplitPanelText() + " ";
    for (int i = 0; i < 2; i++) {
        randomText += randomText;
    }
    vSplit.setTopWidget(new HTML(randomText));
    vSplit.setBottomWidget(new HTML(randomText));

    // Wrap the split panel in a decorator panel
    DecoratorPanel decPanel = new DecoratorPanel();
    decPanel.setWidget(vSplit);

    // Return the content
    return decPanel;
}

From source file:com.hazelcast.monitor.client.HazelcastMonitor.java

License:Open Source License

/**
 * This is the entry point method.//from   www .  ja v a  2 s .  c  o  m
 */
public void onModuleLoad() {
    mainPanel = new HorizontalSplitPanel();
    mainPanel.setSplitPosition(LEFT_PANEL_SIZE);
    VerticalPanel leftPanel = new VerticalPanel();
    Image image = new Image("images/logo_3.png");
    leftPanel.add(image);
    clusterAddPanel = createClusterAddPanel();
    leftPanel.add(clusterAddPanel);
    dsPanel = new DecoratedStackPanel();
    dsPanel.setWidth(LEFT_PANEL_SIZE);
    leftPanel.add(dsPanel);
    mainPanel.setLeftWidget(leftPanel);
    VerticalPanel rightPanel = new VerticalPanel();
    mainPanel.setRightWidget(rightPanel);
    VerticalSplitPanel topPanel = new VerticalSplitPanel();
    topPanel.setSize("100%", "100%");
    topPanel.setSplitPosition("100%");
    topPanel.setTopWidget(mainPanel);
    topPanel.setBottomWidget(logBox);
    logBox.setWidth("100%");
    logBox.setHeight("100%");
    RootPanel.get().add(topPanel);
    //        RootPanel.get().add(mainPanel);
    History.addValueChangeHandler(this);
    loadActiveClusterViews();
    ServicesFactory servicesFactory = new ServicesFactory();
    onValueChangeHandler = new OnValueChangeHandler(servicesFactory, this);
}

From source file:com.qualogy.qafe.gwt.client.ui.renderer.SplitPanelRenderer.java

License:Apache License

public UIObject render(ComponentGVO component, String uuid, String parent, String context) {
    Panel uiObject = null;/*from  www  . j a v a2s  .  co  m*/
    if (component != null) {
        if (component instanceof SplitPanelGVO) {
            SplitPanelGVO gvo = (SplitPanelGVO) component;
            if (gvo.getHorizontalOrientation() != null) {
                if (gvo.getHorizontalOrientation().booleanValue()) {
                    uiObject = new HorizontalSplitPanel();
                } else {
                    uiObject = new VerticalSplitPanel();
                }

            } else {
                uiObject = new HorizontalSplitPanel();
            }

            RendererHelper.fillIn(component, uiObject, uuid, parent, context);
            //            RendererHelper.addId(component, uiObject,uuid,parent);
            //            RendererHelper.addUUID(component, uiObject, uuid);
            //            RendererHelper.addDisabledInfo(component, uiObject);   
            //            
            //            //addStyle(vo, ui);
            //            RendererHelper.addEvents(component, uiObject,uuid);
            //            RendererHelper.addVisibleInfo(component,uiObject);
            //         
            //            
            Widget left = (Widget) renderChildComponent(gvo.getFirst(), uuid, parent, context);
            RendererHelper.fillIn(gvo.getFirst(), left, uuid, parent, context);
            Widget right = (Widget) renderChildComponent(gvo.getSecond(), uuid, parent, context);
            RendererHelper.fillIn(gvo.getSecond(), right, uuid, parent, context);

            if (uiObject instanceof VerticalSplitPanel) {
                VerticalSplitPanel vsp = (VerticalSplitPanel) uiObject;
                vsp.setSplitPosition(gvo.getPosition());
                if (left != null) {
                    vsp.setTopWidget(left);
                }
                if (right != null) {
                    vsp.setBottomWidget(right);
                }
                //vsp.setSize("auto", "50px");

            }

            if (uiObject instanceof HorizontalSplitPanel) {
                HorizontalSplitPanel vsp = (HorizontalSplitPanel) uiObject;
                vsp.setSplitPosition(gvo.getPosition());
                if (left != null) {
                    vsp.setLeftWidget(left);
                }
                if (right != null) {
                    vsp.setRightWidget(right);
                }
                //vsp.setSize("100%", "auto");
            }
            DecoratorPanel simplePanel = new DecoratorPanel();
            simplePanel.add(uiObject);
            uiObject = simplePanel;
        }
    }

    return uiObject;
}

From source file:com.qualogy.qafe.mgwt.client.ui.renderer.SplitPanelRenderer.java

License:Apache License

public UIObject render(ComponentGVO component, String owner, String uuid, String parent, String context,
        AbstractActivity activity) {/*from ww  w  .j  a va2s. c  o m*/
    Panel uiObject = null;
    if (component != null) {
        if (component instanceof SplitPanelGVO) {
            SplitPanelGVO gvo = (SplitPanelGVO) component;
            if (gvo.getHorizontalOrientation() != null) {
                if (gvo.getHorizontalOrientation().booleanValue()) {
                    uiObject = new HorizontalSplitPanel();
                } else {
                    uiObject = new VerticalSplitPanel();
                }

            } else {
                uiObject = new HorizontalSplitPanel();
            }

            RendererHelper.fillIn(component, uiObject, uuid, parent, context);
            //            RendererHelper.addId(component, uiObject,uuid,parent);
            //            RendererHelper.addUUID(component, uiObject, uuid);
            //            RendererHelper.addDisabledInfo(component, uiObject);   
            //            
            //            //addStyle(vo, ui);
            //            RendererHelper.addEvents(component, uiObject,uuid);
            //            RendererHelper.addVisibleInfo(component,uiObject);
            //         
            //            
            Widget left = (Widget) renderChildComponent(gvo.getFirst(), owner, uuid, parent, context, activity);
            RendererHelper.fillIn(gvo.getFirst(), left, uuid, parent, context);
            Widget right = (Widget) renderChildComponent(gvo.getSecond(), owner, uuid, parent, context,
                    activity);
            RendererHelper.fillIn(gvo.getSecond(), right, uuid, parent, context);

            if (uiObject instanceof VerticalSplitPanel) {
                VerticalSplitPanel vsp = (VerticalSplitPanel) uiObject;
                vsp.setSplitPosition(gvo.getPosition());
                if (left != null) {
                    vsp.setTopWidget(left);
                }
                if (right != null) {
                    vsp.setBottomWidget(right);
                }
                //vsp.setSize("auto", "50px");

            }

            if (uiObject instanceof HorizontalSplitPanel) {
                HorizontalSplitPanel vsp = (HorizontalSplitPanel) uiObject;
                vsp.setSplitPosition(gvo.getPosition());
                if (left != null) {
                    vsp.setLeftWidget(left);
                }
                if (right != null) {
                    vsp.setRightWidget(right);
                }
                //vsp.setSize("100%", "auto");
            }
            DecoratorPanel simplePanel = new DecoratorPanel();
            simplePanel.add(uiObject);
            uiObject = simplePanel;
        }
    }

    return uiObject;
}

From source file:net.s17fabu.vip.gwt.showcase.client.content.panels.CwVerticalSplitPanel.java

License:Apache License

/**
 * Initialize this example./*from  w w w  . j  a v a 2s . com*/
 */
@Override
public Widget onInitialize() {
    // Create a Vertical Split Panel
    VerticalSplitPanel vSplit = new VerticalSplitPanel();
    vSplit.ensureDebugId("cwVerticalSplitPanel");
    vSplit.setSize("500px", "350px");
    vSplit.setSplitPosition("30%");

    // Add some content
    String randomText = constants.cwVerticalSplitPanelText() + " ";
    for (int i = 0; i < 2; i++) {
        randomText += randomText;
    }
    vSplit.setTopWidget(new HTML(randomText));
    vSplit.setBottomWidget(new HTML(randomText));

    // Wrap the split panel in a decorator panel
    DecoratorPanel decPanel = new DecoratorPanel();
    decPanel.setWidget(vSplit);

    // Return the content
    return decPanel;
}