Example #1
0
  private void createViewDSInfoPanel() {
    BorderLayoutData data = new BorderLayoutData(Style.LayoutRegion.EAST, 475, 100, 750);
    data.setMargins(new Margins(1, 1, 1, 5));
    data.setCollapsible(true);

    viewDsInfoPanel = new ContentPanel();
    viewDsInfoPanel.setLayout(new CenterLayout());
    viewDsInfoPanel.setLayoutOnChange(true);
    //        filterPanel.setAnimCollapse(true);
    viewDsInfoPanel.setId("eastPanel");
    viewDsInfoPanel.setBodyBorder(false);
    viewDsInfoPanel.setIcon(HarvesterUI.ICONS.view_info_icon());
    viewDsInfoPanel.setHeading(HarvesterUI.CONSTANTS.viewDataSetInformation());
    LabelToolItem noDsSelectedLabel = new LabelToolItem(HarvesterUI.CONSTANTS.noDataSetSelected());
    noDsSelectedLabel.setStyleName("noDataSetSelected");
    viewDsInfoPanel.add(noDsSelectedLabel);

    mainBorderLayout.addListener(
        Events.Expand,
        new Listener<BorderLayoutEvent>() {
          @Override
          public void handleEvent(BorderLayoutEvent be) {
            if (be.getRegion().equals(Style.LayoutRegion.EAST)) setOnExpandDataSet();
          }
        });

    mainGridPanel.add(viewDsInfoPanel, data);
  }
  public TeachersUI() {
    setScrollMode(Scroll.AUTO);
    setId("centerPanelBackground");
    addStyleName("uiContainer");
    setHeaderVisible(false);

    image = Resources.ICONS.image();
    add(image.createImage());

    String text = "<br><center><font color='orange' size='5px'>Teachers</font></center>";
    text += "<h2>Teachers directions here </h2> ";
    label = new Label();
    label.setText(text);
    add(label);

    videoPanel = new ContentPanel();
    videoPanel.setId("jwplayer");
    videoPanel.setHeaderVisible(false);
    videoPanel.setBodyBorder(false);
    add(videoPanel);

    Timer timer =
        new Timer() {

          @Override
          public void run() {
            loadVideoPlayer();
          }
        };

    timer.schedule(50);
  }
 /**
  * @param id
  * @param headingText
  * @return ContentPanel
  */
 public static ContentPanel createPanel(String id, String headingText) {
   ContentPanel cp = new ContentPanel();
   cp.setId(id);
   cp.setHeading(headingText);
   return cp;
 }