public ServerDesc() {
    setWidth("100%");
    setHeight("100%");
    setCaption(ViewProperties.getCaption("panel.serverDesc"));
    addStyleName(Reindeer.PANEL_LIGHT);
    addStyleName("server-desc-panel");

    VerticalLayout layout = (VerticalLayout) getContent();
    layout.setWidth("100%");
    layout.setHeight("100%");
    layout.setMargin(false);
    layout.setSpacing(false);
    layout.addStyleName("server-desc-layout");
    tabDesc.addStyleName(Reindeer.TABSHEET_BORDERLESS);
    tabDesc.setWidth("100%");
    tabDesc.setHeight("100%");
    tabDesc.addTab(
        serverDescBasic, ViewProperties.getCaption("tab.serverDescBasic"), Icons.BASIC.resource());
    tabDesc.addTab(
        serverDescDetail,
        ViewProperties.getCaption("tab.serverDescDetail"),
        Icons.DETAIL.resource());
    // タブ用リスナー
    tabDesc.addListener(TabSheet.SelectedTabChangeEvent.class, this, "selectedTabChange");
    addComponent(tabDesc);
  }
Esempio n. 2
0
  public void initUI() {
    try {

      if (getPbApplication().getUser() == null) {
        initLogin(null);
        return;
      }
      defineAccess();
      HttpServletRequest servletRequest = getPbApplication().getHttpServletRequest();
      // if opened a p as process and t as task parameter
      if (servletRequest.getParameter("p") != null) {
        initProcess(servletRequest.getParameter("p"));
        return;
      } else if (servletRequest.getParameter("t") != null) {
        initTask(servletRequest.getParameter("t"));
        return;
      }

      mainLayout = (VerticalLayout) getContent();
      mainLayout.removeAllComponents();
      mainLayout.setMargin(true);
      mainLayout.setSizeFull();

      tabs = new TabSheet();

      // prepare tabs
      // String userName = getPbApplication().getUserName();
      prepareTabs();
      mainLayout.addComponent(getHeader());
      /*if (accessSet.contains("tasklist")) {
                  	consolePanel = new TaskListPanel();

                  	if(accessSet.size()==1){

                  		 consolePanel.initUI();
                  		 consolePanel.setInitialized(true);
                  		 consolePanel.setSizeFull();
                  		 mainLayout.addComponent(consolePanel);
                           mainLayout.setExpandRatio(consolePanel, 1);
                  		 return;
                  	}

                      tabs.addTab(consolePanel, getPbMessages("bpmTasklist"), null);
                  }
                  if (accessSet.contains("bpm")) {
                      bpmConfigurationPanel = new BPMConfigurationPanel();
                      tabs.addTab(bpmConfigurationPanel, getPbMessages("bpmAdmin"), null);
                  }
                  if (accessSet.contains("identity")) {
                      identityPanel = new IdentityPanel();
                      tabs.addTab(identityPanel, getPbMessages("bpmIdentity"), null);
                  }
                  if (accessSet.contains("bam")) {
                      bamConfigurationPanel = new BAMConfigurationPanel();
                      tabs.addTab(bamConfigurationPanel, getPbMessages("bamAdmin"), null);
                  }
                  if (accessSet.contains("monitoring")) {
                      bpmMonitoringPanel = new BPMMonitoringPanel();
                      tabs.addTab(bpmMonitoringPanel, getPbMessages("bpmMonitoring"), null);
                  }
                  if (accessSet.contains("development")) {
                  	developmentPanel = new DevelopmentPanel();
                  	tabs.addTab(developmentPanel, getPbMessages("bpmDevelopment"), null);
                  }

                  if (accessSet.contains("raport")) {
                  	raportListPanel = new RaportModule();
                      tabs.addTab(raportListPanel, "Raports", null);
                  }

      */
      if (tabs.getSelectedTab() != null && tabs.getSelectedTab() instanceof PbPanel) {
        PbPanel first = (PbPanel) tabs.getSelectedTab();
        first.initUI();
        first.setInitialized(true);
        first.setSizeFull();
      }

      tabs.setSizeFull();
      mainLayout.addComponent(tabs);
      // mainLayout.addComponent(tabs);
      mainLayout.setExpandRatio(tabs, 1);

      tabs.addListener((SelectedTabChangeListener) this);
      tabs.setImmediate(true);
    } catch (Exception ex) {
      ex.printStackTrace();
      throw new RuntimeException(ex);
    }
  }