Package org.gwt.mosaic.ui.client.layout

Examples of org.gwt.mosaic.ui.client.layout.BoxLayoutData


      toolBar.add(
          new Button("Refresh", clickHandler
          )
      );

      toolBox.add(toolBar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

      // filter
      MosaicPanel filterPanel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
      filterPanel.setStyleName("mosaic-ToolBar");
      final com.google.gwt.user.client.ui.ListBox dropBox = new com.google.gwt.user.client.ui.ListBox(false);
      dropBox.setStyleName("bpm-operation-ui");
      dropBox.addItem("All");
      dropBox.addItem("Active");
      dropBox.addItem("Retired");

      dropBox.addChangeHandler(new ChangeHandler() {

        public void onChange(ChangeEvent changeEvent)
        {         
          switch (dropBox.getSelectedIndex())
          {
            case 0:
              currentFilter = FILTER_NONE;
              break;
            case 1:
              currentFilter = FILTER_ACTIVE;
              break;
            case 2:
              currentFilter = FILTER_SUSPENDED;
              break;
            default:
              throw new IllegalArgumentException("No such index");
          }

          renderFiltered();
        }
      });
      filterPanel.add(dropBox);

      toolBox.add(filterPanel, new BoxLayoutData(BoxLayoutData.FillStyle.VERTICAL));

      definitionList.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
      definitionList.add(listBox, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
      pagingPanel = new PagingPanel(
          new PagingCallback()
          {
            public void rev()
            {
              renderFiltered();
            }

            public void ffw()
            {
              renderFiltered();
            }
          }
      );
      definitionList.add(pagingPanel,new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

      // layout
      //MosaicPanel layout = new MosaicPanel(new BorderLayout());
      //layout.add(definitionList, new BorderLayoutData(BorderLayout.Region.CENTER));
View Full Code Here


      toolBar.add(
          new Button("Refresh", clickHandler
          )
      );

      toolBox.add(toolBar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

      definitionList.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
   
      definitionList.add(listBox, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
      pagingPanel = new PagingPanel(
          new PagingCallback()
          {
            public void rev()
            {
              renderFiltered();
            }

            public void ffw()
            {
              renderFiltered();
            }
          }
      );
      definitionList.add(pagingPanel,new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

     
      panel.add(definitionList);

      // deployments model listener
View Full Code Here

  public void provideWidget(ProvisioningCallback callback)
  {
    panel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));

    this.appContext = Registry.get(ApplicationContext.class);
    panel.add(new HeaderLabel("User Preferences"), new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

    MosaicPanel layout = new MosaicPanel(new GridLayout(2,1));
    layout.add(
        new HTML("<b>Default Tool</b><br>" +
            "Select the tool that should be loaded upon login.")
    );

    final List<ToolSet> toolsets =
        org.jboss.errai.workspaces.client.Workspace.getInstance().getToolsets();
    final ListBox multiBox = new ListBox();
    multiBox.setVisibleItemCount(5);
    layout.add(multiBox);

    // init
    final Preferences prefs = GWT.create(Preferences.class);
    String prefEditor = prefs.get(Preferences.DEFAULT_TOOL);
    for(ToolSet ts : toolsets)
    {
      multiBox.addItem(ts.getToolSetName());
      if(ts.getToolSetName().equals(prefEditor))
        multiBox.setItemSelected(multiBox.getItemCount()-1, true);
    }

    multiBox.addClickHandler(
        new ClickHandler()
        {
          public void onClick(ClickEvent clickEvent)
          {
            String title = multiBox.getItemText(multiBox.getSelectedIndex());
            for(ToolSet ts: toolsets)
            {
              if(ts.getToolSetName().equals(title))
              {
                prefs.set(Preferences.DEFAULT_TOOL, ts.getToolSetName());
              }
            }
          }
        }
    );

    panel.add(layout, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

    callback.onSuccess(panel);
  }
View Full Code Here

        HTML html = new HTML("Version: " + Version.VERSION);
        html.setStyleName("bpm-login-info");

        MosaicPanel btnPanel = new MosaicPanel(new BoxLayout());
        btnPanel.add(html, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
        btnPanel.add(submit);

        layoutPanel.add(messagePanel, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
        layoutPanel.add(form, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
        layoutPanel.add(btnPanel, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

    }
View Full Code Here

        usernameInput = new TextBox();
        passwordInput = new PasswordTextBox();


        BoxLayoutData bld1 = new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL);
        bld1.setPreferredWidth("70px");

        box1.add( new Label("Username:"), bld1);
        box1.add(usernameInput);

        box2.add(new Label("Password:"), bld1);
View Full Code Here

  {
    layoutPanel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));

    // console info
    HeaderLabel console = new HeaderLabel("Console Info");
    layoutPanel.add(console, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

    MosaicPanel layout1 = new MosaicPanel(new GridLayout(2,1));
    layout1.add(new HTML("Version:"));
    layout1.add(new HTML(Version.VERSION));

    layoutPanel.add(layout1, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

    // server info
    HeaderLabel server = new HeaderLabel("Server Info");
    layoutPanel.add(server, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

    MosaicPanel layout2 = new MosaicPanel(new GridLayout(2,2));
    layout2.add(new HTML("Host:"));
    layout2.add(new HTML(Registry.get(ApplicationContext.class).getConfig().getConsoleServerUrl()));

    pluginPanel = new MosaicPanel();
    layout2.add(new Label("Plugins:"));
    layout2.add(pluginPanel);

    layoutPanel.add(layout2, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

    // ---

    controller.addView(ServerStatusView.ID, this);
View Full Code Here

        String reportTitle = dropBox.getItemText(dropBox.getSelectedIndex());
        selectForm(reportTitle);               
      }
    });

    templatePanel.add(dropBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
    templatePanel.add(description, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
    // ----

    inputPanel = new MosaicPanel();
   
    // ---
   
    header.add(templatePanel, new BoxLayoutData("250 px", "100 px"));
    header.add(inputPanel, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

    // --

    reportFrame = new ReportFrame();

    this.add(header, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
    this.add(reportFrame, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

  }
View Full Code Here

  {
    if(!initialized)
    {
      this.propGrid = new PropertyGrid(new String[]{"Deployment ID:"});

      this.add(propGrid, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
      final Button button = new Button("View Deployment", new ClickListener(){

        public void onClick(Widget widget)
        {
          controller.handleEvent(
View Full Code Here

        });

        deck.add(participantPanel);

        this.getHeader().add(dropBox, Caption.CaptionRegion.RIGHT);
        this.add(deck, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

        deck.showWidget(dropBox.getSelectedIndex());
      }
      else
      {
View Full Code Here

    layout.setStyleName("bpm-window-layout");
    layout.setPadding(5);
    // info
    HeaderLabel header = new HeaderLabel(title, true);

    layout.add(header, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
 
    windowPanel.addWindowCloseListener(new WindowCloseListener() {
      public void onWindowClosed() {
        if(getCallback()!=null)
          getCallback().onWindowClosed();

        windowPanel = null;
        frame = null;
      }

      public String onWindowClosing() {
        return null;
      }
    });

    // iframe
    frame = new Frame()
    {
      /*public void onBrowserEvent(com.google.gwt.user.client.Event event)
      {
        ConsoleLog.debug("Browser Event: "+ DOM.eventGetTypeString(event));

        final Element iframe = getFrame().getElement();
        String size = getContents(IFrameElement.as(iframe));
        if(size!=null && size.indexOf(",")!=-1)
        {
          ConsoleLog.debug("Frame content size: "+ size);
          String[] wh = size.split(",");
          getWindowPanel().setContentSize(
              new Dimension(
                  Integer.valueOf(wh[0]),
                  Integer.valueOf(wh[1])+100
              )
          );

        }
        else
        {
          ConsoleLog.debug("Unable to retrieve frame content size: "+size);

          final int width = Window.getClientWidth()-200;
          final int height = Window.getClientHeight()-100;

          getWindowPanel().setContentSize(
              new Dimension(width,height)
          );

        }

        windowPanel.layout();
        windowPanel.center();
        windowPanel.setVisible(true);
      }  */
    };

    //frame.sinkEvents(com.google.gwt.user.client.Event.ONLOAD);

    DOM.setStyleAttribute(frame.getElement(), "border", "none");

    // https://jira.jboss.org/jira/browse/JBPM-2244
    frame.getElement().setId(
        String.valueOf( new Date().getTime())
    );

    frame.setUrl(this.url);

    layout.add(frame, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
    windowPanel.setWidget(layout);

    WindowUtil.addMaximizeButton(windowPanel, Caption.CaptionRegion.RIGHT);
    WindowUtil.addMinimizeButton(windowPanel, Caption.CaptionRegion.RIGHT);

View Full Code Here

TOP

Related Classes of org.gwt.mosaic.ui.client.layout.BoxLayoutData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.