com.google.gwt.user.client.ui.SimplePanel Java Examples

The following examples show how to use com.google.gwt.user.client.ui.SimplePanel. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SaveDatasetPanel.java    From EasyML with Apache License 2.0 6 votes vote down vote up
@Override
protected void init(){
	grid = new DescribeGrid(labarr, "data");
	verticalPanel.add(grid);
	grid.addStyleName("bda-descgrid-savedata");
	savebtn.setStyleName("bda-descgrid-savedata-submitbtn");
	SimplePanel simPanel = new SimplePanel();
	simPanel.add( savebtn );
	simPanel.setStyleName("bda-descgrid-savedata-simpanel");
	verticalPanel.add(simPanel);
	savebtn.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			dbController.submitSaveDataset2DB(panel,SaveDatasetPanel.this, dataset,grid);
		}
	});
}
 
Example #2
Source File: TractionDialogBox.java    From gwt-traction with Apache License 2.0 6 votes vote down vote up
public TractionDialogBox(boolean autoHide, boolean modal, boolean showCloseIcon) {
super(autoHide, modal, new TractionCaption());

container = new SimplePanel();
container.addStyleName("dialogContainer");

close = new Anchor();
close.setStyleName("x");
close.addClickHandler(new ClickHandler() {
           @Override
           public void onClick(ClickEvent event) {
               onCloseClick(event);
           }
});
setCloseIconVisible(showCloseIcon);

controls = new FlowPanel();
controls.setStyleName("dialogControls");
controls.add(close);

// add the controls to the end of the caption
TractionCaption caption = (TractionCaption) getCaption();
caption.add(controls);
   }
 
Example #3
Source File: MockBall.java    From appinventor-extensions with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new MockBall component.
 *
 * @param editor  editor of source file the component belongs to
 */
public MockBall(SimpleEditor editor) {
  super(editor, TYPE, images.ball());

  // Initialize mock ball UI
  ballWidget = new SimplePanel();
  ballWidget.setStylePrimaryName("ode-SimpleMockComponent");

  // Create an appropriately sized ball
  canvas = new GWTCanvas(diameter, diameter);
  canvas.setPixelSize(diameter, diameter);
  canvas.setBackgroundColor(GWTCanvas.TRANSPARENT);
  fillCircle();
  ballWidget.setWidget(canvas);

  initComponent(ballWidget);
}
 
Example #4
Source File: TemplateUploadWizard.java    From appinventor-extensions with Apache License 2.0 6 votes vote down vote up
public TemplateWidget(TemplateInfo info, String hostUrl) {
  setTemplate(info, hostUrl);

  panel = new VerticalPanel();
  panel.add(title);
  title.getElement().getStyle().setFontWeight(Style.FontWeight.BOLD);
  panel.add(subtitle);
  descriptionHtml.setHTML(info.description);
  panel.add(descriptionHtml);
  panel.add(image);
  SimplePanel wrapper = new SimplePanel();
  wrapper.getElement().getStyle().setOverflowY(Style.Overflow.SCROLL);
  wrapper.add(panel);
  initWidget(wrapper);
  setStylePrimaryName("ode-ContextMenu");
  setHeight("355px");
}
 
Example #5
Source File: WidgetComboBox.java    From consulo with Apache License 2.0 6 votes vote down vote up
@Override
public void onBlur(BlurEvent event) {
  if (!isFocus()) return;

  if (keyboardManagerRegistration != null) {
    keyboardManagerRegistration.removeHandler();
    keyboardManagerRegistration = null;
  }

  Object sender = event.getSource();
  getFocuses().remove(sender);

  SimplePanel value = getSelectedValue();
  if (sender == value && !false) value.removeStyleName("selected-row");

  if (!isFocus()) fireEvent(event);
}
 
Example #6
Source File: WidgetComboBox.java    From consulo with Apache License 2.0 6 votes vote down vote up
@Override
public void onFocus(FocusEvent event) {
  Object sender = event.getSource();
  getFocuses().add(sender);

  if (keyboardManagerRegistration == null) keyboardManagerRegistration = Event.addNativePreviewHandler(getKeyboardManager());

  SimplePanel value = getSelectedValue();
  if (sender == value) {
    value.addStyleName("selected-row");
    if (isChoiceButtonVisible()) getChoiceButton().setFocus(true);
  }
  else if (sender == null || sender == getListPanel()) { //on drop down list show
    Widget widget = getSelectedWidget();
    if (widget != null) getListPanel().ensureVisible(widget);
  }

  if (focuses.size() == 1) fireEvent(event);
}
 
Example #7
Source File: GwtMockitoWidgetBaseClassesTest.java    From gwtmockito with Apache License 2.0 6 votes vote down vote up
@Test
public void testPanels() throws Exception {
  invokeAllAccessibleMethods(new AbsolutePanel() {});
  invokeAllAccessibleMethods(new CellPanel() {});
  invokeAllAccessibleMethods(new ComplexPanel() {});
  invokeAllAccessibleMethods(new DeckLayoutPanel() {});
  invokeAllAccessibleMethods(new DeckPanel() {});
  invokeAllAccessibleMethods(new DecoratorPanel() {});
  invokeAllAccessibleMethods(new DockLayoutPanel(Unit.PX) {});
  invokeAllAccessibleMethods(new DockPanel() {});
  invokeAllAccessibleMethods(new FlowPanel() {});
  invokeAllAccessibleMethods(new FocusPanel() {});
  invokeAllAccessibleMethods(new HorizontalPanel() {});
  invokeAllAccessibleMethods(new HTMLPanel("") {});
  invokeAllAccessibleMethods(new LayoutPanel() {});
  invokeAllAccessibleMethods(new PopupPanel() {});
  invokeAllAccessibleMethods(new RenderablePanel("") {});
  invokeAllAccessibleMethods(new ResizeLayoutPanel() {});
  invokeAllAccessibleMethods(new SimpleLayoutPanel() {});
  invokeAllAccessibleMethods(new SimplePanel() {});
  invokeAllAccessibleMethods(new SplitLayoutPanel() {});
  invokeAllAccessibleMethods(new StackPanel() {});
  invokeAllAccessibleMethods(new VerticalPanel() {});
}
 
Example #8
Source File: GwtImageBoxImplConnector.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void onStateChanged(StateChangeEvent stateChangeEvent) {
  super.onStateChanged(stateChangeEvent);

  SimplePanel widget = getWidget();
  MultiImageState state = getState().myImageState;
  widget.setHeight(state.myHeight + "px");
  widget.setWidth(state.myWidth + "px");

  widget.setWidget(ImageConverter.create(state));
}
 
Example #9
Source File: WidgetComboBox.java    From consulo with Apache License 2.0 5 votes vote down vote up
/**
 * Highlights the visual item in the drop down list if it's selected in the model.
 *
 * @param event is an event that contains data about selected item.
 */
protected void select(ListModelEvent event) {
  if (isListPanelOpened()) {
    getListPanel().setHighlightRow(event.getItemIndex());
  }

  final Widget widget = getListItemFactory().createWidget(model.getSelected());
  final SimplePanel selectedValue = getSelectedValue();
  selectedValue.setWidget(widget);
}
 
Example #10
Source File: GwtDockLayoutImplConnector.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  GwtDockLayoutImpl dockLayout = getWidget();
  dockLayout.clear();

  boolean noCenterElement = true;
  List<ComponentConnector> childComponents = getChildComponents();
  for (int i = 0; i < childComponents.size(); i++) {
    ComponentConnector connector = childComponents.get(i);
    DockLayoutState.Constraint constraint = getState().myConstraints.get(i);

    Widget widget = GwtUIUtil.fillAndReturn(connector.getWidget());
    switch (constraint) {
      case TOP:
        dockLayout.add(widget, GwtDockLayoutImpl.NORTH);
        break;
      case BOTTOM:
        dockLayout.add(widget, GwtDockLayoutImpl.SOUTH);
        break;
      case LEFT:
        dockLayout.add(widget, GwtDockLayoutImpl.WEST);
        break;
      case RIGHT:
        dockLayout.add(widget, GwtDockLayoutImpl.EAST);
        break;
      case CENTER:
        setCenterWidget(dockLayout, widget);
        noCenterElement = false;
        break;
    }
  }

  if (noCenterElement) {
    setCenterWidget(dockLayout, new SimplePanel());
  }
}
 
Example #11
Source File: Showcase.java    From requestor with Apache License 2.0 5 votes vote down vote up
@Override
public void onModuleLoad() {
    populateMenu();

    // Create view container
    final SimplePanel container = new SimplePanel();
    container.setStyleName("container requestor-showcase-container");
    RootPanel.get().add(container);

    // Main Factory (Dependency Injector)
    ShowcaseClientFactory clientFactory = CLIENT_FACTORY;
    EventBus eventBus = clientFactory.getEventBus();
    PlaceController placeController = clientFactory.getPlaceController();

    // Activity-Place binding
    ActivityMapper activityMapper = new ShowcaseActivityMapper();
    ActivityManager activityManager = new ActivityManager(activityMapper, eventBus);
    activityManager.setDisplay(container);

    // Place-History binding
    PlaceHistoryMapper historyMapper = new ShowcasePlaceHistoryMapper();
    PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
    historyHandler.register(placeController, eventBus, defaultPlace);

    // Add Loading widget
    RootPanel.get().add(new Loading(eventBus));

    // Goes to place represented on URL or default place
    historyHandler.handleCurrentHistory();
}
 
Example #12
Source File: LumongoUI.java    From lumongo with Apache License 2.0 5 votes vote down vote up
@Override
public Main createBaseView() {

	Main main = new Main();
	main.setId("main-wrapper");
	main.setMarginTop(40);
	main.setMarginBottom(40);

	simplePanel = new SimplePanel();
	main.add(simplePanel);

	Highcharts.setExportUrl("");

	return main;
}
 
Example #13
Source File: InputSlider.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
protected InputSlider(InputSlider<T> source) {
	super(new SimplePanel(), source);
	this.contentPanel = (SimplePanel) this.getWidget();
	this.endConstruct();
	this.labelRenderer = source.labelRenderer;
	this.items.addAll(source.items);
}
 
Example #14
Source File: DebugPanelWidget.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public DebugPanelWidget(DebugPanelListener listener, final boolean showReset, Component... components) {
  this.listener = listener;
  this.components = components;

  initWidget(panel = new SimplePanel());
  panel.setStyleName(Utils.style() + "-panel");
  showLink = new CommandLink("Show Debug Panel", new Command() {
    //@Override
    public void execute() {
      show(showReset);
    }
  });
  showLink.setStyleName(Utils.style() + "-link");
  panel.add(showLink);
}
 
Example #15
Source File: WordCloudDetailApp.java    From swcv with MIT License 5 votes vote down vote up
private SimplePanel createPanel(String svg, int width, int height)
{
    SimplePanel panel = new SimplePanel();
    panel.setPixelSize(width, height);
    panel.addStyleName("center");
    HTML html = new HTML(svg);
    html.setWidth("100%");
    html.setHeight("100%");
    panel.add(html);
    return panel;
}
 
Example #16
Source File: WordCloudDetailApp.java    From swcv with MIT License 5 votes vote down vote up
private void initializeContentPanel(WordCloud cloud)
{
    SimplePanel panel = createPanel(cloud.getSvg(), cloud.getWidth() + 20, cloud.getHeight() + 20);
    RootPanel rPanel = RootPanel.get("cloud-div");
    rPanel.clear();
    rPanel.add(panel);
    rPanel.setPixelSize(cloud.getWidth() + 20, cloud.getHeight() + 20);
    rPanel.addStyleName("center");
}
 
Example #17
Source File: Djvu_html5.java    From djvu-html5 with GNU General Public License v2.0 5 votes vote down vote up
private Widget prepareCanvas() {
	canvas = Canvas.createIfSupported();
	if (canvas == null) {
		// TODO
		throw new RuntimeException("Canvas not supported!");
	}
	canvas.setTabIndex(0);

	final SimplePanel panel = new SimplePanel(canvas);
	panel.setStyleName("content");

	Window.addResizeHandler(e -> resizeCanvas());
	Scheduler.get().scheduleFinally(() -> resizeCanvas());
	return panel;
}
 
Example #18
Source File: SearchResult.java    From document-management-system with GNU General Public License v2.0 5 votes vote down vote up
public SearchResult() {
	sp = new SimplePanel();
	searchCompactResult = new SearchCompactResult();
	searchFullResult = new SearchFullResult();
	sp.add(searchFullResult);

	status = new Status();
	status.setStyleName("okm-StatusPopup");

	initWidget(sp);
}
 
Example #19
Source File: MockMapFeatureBase.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
MockMapFeatureBase(SimpleEditor editor, String type, ImageResource icon) {
  super(editor, type, icon);
  panel = new SimplePanel();
  panel.setStylePrimaryName("ode-SimpleMockComponent");
  initComponent(panel);
  this.unsinkEvents(Event.MOUSEEVENTS);
}
 
Example #20
Source File: MockWebViewer.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new MockWebViewer component.
 *
 * @param editor  editor of source file the component belongs to
 */
public MockWebViewer(SimpleEditor editor) {
  super(editor, TYPE, images.webviewer());

  // Initialize mock WebViewer UI
  SimplePanel webViewerWidget = new SimplePanel();
  webViewerWidget.setStylePrimaryName("ode-SimpleMockContainer");
  // TODO(halabelson): Center vertically as well as horizontally
  webViewerWidget.addStyleDependentName("centerContents");
  webViewerWidget.setWidget(largeImage);
  initComponent(webViewerWidget);
}
 
Example #21
Source File: WeekGrid.java    From calendar-component with Apache License 2.0 5 votes vote down vote up
public WeekGrid(VCalendar parent, boolean format24h) {
    setCalendar(parent);
    content = new HorizontalPanel();
    timebar = new Timebar(format24h);
    content.add(timebar);

    wrapper = new SimplePanel();
    wrapper.setStylePrimaryName("v-calendar-week-wrapper");
    wrapper.add(content);

    setWidget(wrapper);
}
 
Example #22
Source File: MockFeatureCollection.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
public MockFeatureCollection(SimpleEditor editor) {
  super(editor, TYPE, images.featurecollection(), new MockFeatureCollectionLayout());

  SimplePanel panel = new SimplePanel();
  panel.setWidth("16px");
  panel.setHeight("16px");
  panel.setStylePrimaryName("ode-SimpleMockComponent");
  Image icon = new Image(images.featurecollection());
  panel.add(icon);

  initComponent(panel);
  initCollection();
  initialized = true;
}
 
Example #23
Source File: MockSlider.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new MockSlider component.
 *
 * @param editor editor of source file the component belongs to
 */
public MockSlider(SimpleEditor editor) {
  super(editor, TYPE, images.slider());

  // Initialize mock slider UI
  sliderWidget = new SimplePanel();
  sliderWidget.setStylePrimaryName("ode-SimpleMockComponent");

  sliderWidget.setWidget(getIconImage());

  initComponent(sliderWidget);
}
 
Example #24
Source File: MockListView.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
private void createLabelPanel() {
  panelForItem =new SimplePanel();
  panelForItem.setStylePrimaryName("listViewItemStyle");
  panelForItem.setSize(ComponentConstants.LISTVIEW_PREFERRED_WIDTH + "px",
      ComponentConstants.LISTVIEW_PREFERRED_HEIGHT + "px");
  panelForItem.add(labelInItem);
  listViewWidget.add(panelForItem);
}
 
Example #25
Source File: MockWrapper.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
MockWrapper(SimpleEditor editor, String type, ImageResource icon) {
  super(editor, type, icon);

  // Initialize wrapper UI
  wrapper = new SimplePanel();
  wrapper.setStylePrimaryName("ode-SimpleMockComponent");
}
 
Example #26
Source File: MockVideoPlayer.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new MockVideoPlayer component.
 *
 * @param editor  editor of source file the component belongs to
 */
public MockVideoPlayer(SimpleEditor editor) {
  super(editor, TYPE, images.videoplayer());

  // Initialize mock video UI
  videoPlayerWidget = new SimplePanel();
  videoPlayerWidget.setStylePrimaryName("ode-SimpleMockComponent");
  videoPlayerWidget.setWidget(getIconImage());
  initComponent(videoPlayerWidget);
}
 
Example #27
Source File: TopToolbar.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
@Override
public void execute() {
  final DialogBox db = new DialogBox(false, true);
  db.setText("About The Companion");
  db.setStyleName("ode-DialogBox");
  db.setHeight("200px");
  db.setWidth("400px");
  db.setGlassEnabled(true);
  db.setAnimationEnabled(true);
  db.center();

  String downloadinfo = "";
  if (!YaVersion.COMPANION_UPDATE_URL1.equals("")) {
    String url = "http://" + Window.Location.getHost() + YaVersion.COMPANION_UPDATE_URL1;
    downloadinfo = "<br/>\n<a href=" + url + ">Download URL: " + url + "</a><br/>\n";
    downloadinfo += BlocklyPanel.getQRCode(url);
  }

  VerticalPanel DialogBoxContents = new VerticalPanel();
  HTML message = new HTML(
      "Companion Version " + BlocklyPanel.getCompVersion() + downloadinfo
  );

  SimplePanel holder = new SimplePanel();
  Button ok = new Button("Close");
  ok.addClickListener(new ClickListener() {
    public void onClick(Widget sender) {
      db.hide();
    }
  });
  holder.add(ok);
  DialogBoxContents.add(message);
  DialogBoxContents.add(holder);
  db.setWidget(DialogBoxContents);
  db.show();
}
 
Example #28
Source File: WeekGrid.java    From calendar-component with Apache License 2.0 5 votes vote down vote up
private void setVerticalScroll(boolean isVerticalScrollEnabled) {
    if (isVerticalScrollEnabled && !(isVerticalScrollable())) {
        verticalScrollEnabled = true;
        horizontalScrollEnabled = false;
        wrapper.remove(content);

        final ScrollPanel scrollPanel = new ScrollPanel();
        scrollPanel.setStylePrimaryName("v-calendar-week-wrapper");
        scrollPanel.setWidget(content);

        scrollPanel.addScrollHandler(event -> {
            if (calendar.getScrollListener() != null) {
                int vScrollPos = scrollPanel.getVerticalScrollPosition();
                calendar.getScrollListener().scroll(vScrollPos);

                if (vScrollPos > 1) {
                    content.addStyleName("scrolled");
                } else {
                    content.removeStyleName("scrolled");
                }
            }
        });

        setWidget(scrollPanel);
        wrapper = scrollPanel;

    } else if (!isVerticalScrollEnabled && (isVerticalScrollable())) {
        verticalScrollEnabled = false;
        horizontalScrollEnabled = false;
        wrapper.remove(content);

        SimplePanel simplePanel = new SimplePanel();
        simplePanel.setStylePrimaryName("v-calendar-week-wrapper");
        simplePanel.setWidget(content);

        setWidget(simplePanel);
        wrapper = simplePanel;
    }
}
 
Example #29
Source File: GwtTabbedLayoutImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
public void setTabs(int index, Map<TabbedLayoutState.TabState, Widget> map) {
  clear();

  for (Map.Entry<TabbedLayoutState.TabState, Widget> entry : map.entrySet()) {
    TabbedLayoutState.TabState state = entry.getKey();
    GwtHorizontalLayoutImpl tabWidget = GwtComboBoxImplConnector.buildItem(state);
    if (state.myCloseButton != null) {
      SimplePanel closeButton = new SimplePanel();

      tabWidget.add(closeButton);
      tabWidget.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT);

      Widget closeIcon = ImageConverter.create(state.myCloseButton);
      closeButton.setWidget(closeIcon);
      Widget closeHoveredIcon = ImageConverter.create(state.myCloseHoverButton);

      closeButton.addDomHandler(event -> {
        closeButton.setWidget(closeHoveredIcon);
      }, MouseOverEvent.getType());

      closeButton.addDomHandler(event -> {
        closeButton.setWidget(closeIcon);
      }, MouseOutEvent.getType());

      closeButton.addDomHandler(event -> {
        if (myCloseHandler != null) {
          int idx = getWidgetIndex(entry.getValue());
          if (idx != -1) {
            myCloseHandler.accept(idx);
          }
        }
      }, ClickEvent.getType());
    }
    else {
      tabWidget.addStyleName("gwt-TabBarItem-no-close-button");
    }
    add(entry.getValue(), tabWidget);
  }

  selectTab(index);
}
 
Example #30
Source File: MonitorView.java    From EasyML with Apache License 2.0 4 votes vote down vote up
@Override
public Widget createMainLayout() {
	SplitLayoutPanel splitLayout = new SplitLayoutPanel();


	StackLayoutPanel stack = new StackLayoutPanel(Unit.EM);
	stack.setStyleName("sp");
	ScrollPanel leftcrp = new ScrollPanel();
	leftcrp.setSize("100%", "100%");
	VerticalPanel vPanel = new VerticalPanel();
	vPanel.setWidth("100%");

	programTree = ProgramTreeLoader.load(AppController.email);
	datasetTree = DatasetTreeLoader.load(AppController.email);
	jobTree = JobTreeLoader.load(AppController.email);
	resultTree = new SearchTree();
	initTabPanel();
	DisclosurePanel distackleft = new DisclosureStackPanel("Search")
	.asWidget();
	searchGrid = new SearchGrid(programTree,datasetTree,jobTree,resultTree);
	distackleft.setContent(searchGrid);
	SimplePanel tabSimPanel = new SimplePanel();
	tabSimPanel.add(tabPanel);

	vPanel.add(tabSimPanel);
	vPanel.add(distackleft);
	leftcrp.add(vPanel);
	stack.add(leftcrp, "", 0);

	StackLayoutPanel stackright = new StackLayoutPanel(Unit.EM);
	stackright.setStyleName("sp");
	DisclosurePanel distackright1 = new DisclosureStackPanel(Constants.studioUIMsg.jobPanelTitle())
	.asWidget();
	DisclosurePanel distackright2 = new DisclosureStackPanel(Constants.studioUIMsg.modulePanelTitle())
	.asWidget();
	ScrollPanel scvp = new ScrollPanel();
	VerticalPanel verticalPanel = new VerticalPanel();
	verticalPanel.setWidth("100%");

	HorizontalPanel btnPanel = new HorizontalPanel();
	historyBtn.removeStyleName("gwt-Button");
	historyBtn.addStyleName("history-button-style");
	submitBtn.setEnabled( false );
	submitBtn.removeStyleName("gwt-Button");
	submitBtn.addStyleName("button-style");
	clearBtn.removeStyleName("gwt-Button");
	clearBtn.addStyleName("button-style");
	cloneBtn.removeStyleName("gwt-Button");
	cloneBtn.addStyleName("button-style");
	refreshBtn.removeStyleName("gwt-Button");
	refreshBtn.addStyleName("button-style");
	stopBtn.removeStyleName("gwt-Button");
	stopBtn.addStyleName("button-style");

	btnPanel.add(historyBtn);
	btnPanel.add(new HTML("&nbsp;&nbsp;"));
	btnPanel.add(submitBtn);
	btnPanel.add(new HTML("&nbsp;&nbsp;"));
	btnPanel.add(clearBtn);
	btnPanel.add(new HTML("&nbsp;&nbsp;"));
	btnPanel.add(cloneBtn);
	btnPanel.add(new HTML("&nbsp;&nbsp;"));
	btnPanel.add(stopBtn);
	btnPanel.add(new HTML("&nbsp;&nbsp;"));
	btnPanel.add(refreshBtn);


	btnPanel2.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	btnPanel2.add(btnPanel);
	btnPanel2.addStyleName("btnPanel");

	splitLayout.addWest(stack, 200);

	jobDescGrid = new MonitorJobDescGrid();

	distackright1.setContent(jobDescGrid);
	distackright2.setContent(propPanel);
	verticalPanel.add(distackright1);
	verticalPanel.add(distackright2);
	scvp.add(verticalPanel);
	stackright.add(scvp, "", 0);
	splitLayout.addEast(stackright, 287);

	// Use different controllers in different classes
	setController(new MonitorController(Constants.CONTROLLER_WIDTH,
			Constants.CONTROLLER_HEIGHT));
	rebuiltLayoutPanel(getController());
	splitLayout.add(layoutPanel);

	return splitLayout;
}