Package com.gwtext.client.widgets

Examples of com.gwtext.client.widgets.Panel


        return false;
    }

    public void close(String key) {
        tp.remove( key + id );
        Panel p = openedTabs.remove( key );
        if ( p != null ) p.destroy();
    }
View Full Code Here


                    w.destroy();
                }
            }
        } );

        Panel p = new Panel();
        p.add( drop );
        w.add( p );
        w.setBorder( false );

        Button ok = new Button( constants.OK() );
        ok.addClickListener( new ClickListener() {
            public void onClick(Widget wg) {
                r.set( dataIdx,
                       drop.getValue( drop.getSelectedIndex() ) );
                w.destroy();
            }
        } );
        p.add( ok );

        w.setPosition( e.getPageX(),
                       e.getPageY() );
        w.show();
View Full Code Here

        w.setPlain( true );
        w.setBodyBorder( false );
        w.setTitle( dta );
       
        String typeDescription = dt.getType(colConf, getSCE());
        Panel p = new Panel();

        if (typeDescription != null
        && typeDescription.equals(SuggestionCompletionEngine.TYPE_DATE)) {
      final DatePickerTextBox datePicker = new DatePickerTextBox(val);
      String m = Format.format(((Constants) GWT.create(Constants.class))
          .ValueFor0(), dta);
      datePicker.setTitle(m);
      datePicker.addValueChanged(new ValueChanged() {
        public void valueChanged(String newValue) {
          r.set(dta, newValue);
        }
      });

      p.add(datePicker);
      p.add(new InfoPopup(constants.CategoryParentRules(), Format.format(
          constants.FillInColumnWithValue(), typeDescription)));

      w.add(p);
      w.setBorder(false);

      Button ok = new Button(constants.OK());
      ok.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent arg0) {
          r.set(dta, datePicker.getDateString());
          w.destroy();
        }
      });

      p.add(ok);
     
    } else {
      final TextBox box = new TextBox();
      box.setText(val);
      box.addKeyboardListener(new KeyboardListenerAdapter() {
        public void onKeyUp(Widget sender, char keyCode, int modifiers) {
          if (keyCode == KeyboardListener.KEY_ENTER) {
            r.set(dta, box.getText());
            w.destroy();
          }
        }
      });

      if (dt.isNumeric(colConf, getSCE())) {
        box.addKeyboardListener(ActionValueEditor
                .getNumericFilter(box));
      }

      p.add(box);
      if (typeDescription != null) {
        p.add(new InfoPopup(constants.CategoryParentRules(), Format
            .format(constants.FillInColumnWithValue(),
                typeDescription)));
      }
      w.add(p);
      w.setBorder(false);

      Button ok = new Button(constants.OK());
      ok.addClickListener(new ClickListener() {
        public void onClick(Widget wg) {
          r.set(dta, box.getText());
          w.destroy();
        }
      });
      p.add(ok);
    }

        w.setPosition( e.getPageX(),
                       e.getPageY() );
        w.show();
View Full Code Here

    private void refreshWidgets() {
        WorkingSetConfigData wsData = (WorkingSetConfigData) workingSet.content;

        TabPanel tPanel = new TabPanel();
        tPanel.setWidth(800);
        Panel pnl = new Panel();
//        pnl.setAutoWidth(true);
        pnl.setClosable(false);
        pnl.setTitle("WS Definition"); //TODO {bauna} i18n
//        pnl.setAutoHeight(true);
        pnl.add(buildDoubleList(wsData));
        tPanel.add(pnl);

        pnl = new Panel();
//        pnl.setAutoWidth(true);
        pnl.setClosable(false);
        pnl.setTitle("WS Constraints"); //TODO {bauna} i18n
//        pnl.setAutoHeight(true);
        this.factsConstraintsgEditorPanel = new FactsConstraintsEditorPanel(this);
        pnl.add(this.factsConstraintsgEditorPanel);
        tPanel.add(pnl);

        pnl = new Panel();
//        pnl.setAutoWidth(true);
        pnl.setClosable(false);
        pnl.setTitle("WS Custom Forms"); //TODO {bauna} i18n
//        pnl.setAutoHeight(true);
        this.customFormsEditorPanel = new CustomFormsEditorPanel(this);
        pnl.add(this.customFormsEditorPanel);
        tPanel.add(pnl);

        tPanel.addListener(new PanelListenerAdapter() {
            @Override
            public boolean doBeforeShow(Component component) {
View Full Code Here

    RuleFlowContentModel rfcm = (RuleFlowContentModel) asset.content;

    if (rfcm != null && rfcm.getXml() != null && rfcm.getNodes() != null) {
      try {

        parameterPanel = new Panel();
        parameterPanel.setCollapsible(true);
        parameterPanel.setTitle(constants.Parameters());

        FormStyleLayout parametersForm = new FormStyleLayout();
        parametersForm.setHeight("120px"); // NON-NLS
View Full Code Here

        viewsPanel.clear();
        ruleViews.clear();

        for ( final MultiViewRow row : rows ) {
            Panel panel = new Panel( row.name );
            panel.setIconCls( EditorLauncher.getAssetFormatBGStyle( row.format ) ); //NON-NLS
            panel.setCollapsible( true );
            panel.setTitleCollapse( true );
            panel.setCollapsed( true );
            panel.setWidth( "100%" );

            panel.addListener( new PanelListenerAdapter() {
                public void onExpand(final Panel panel) {

                    // Only load if it doesn't exist yet.
                    if ( ruleViews.get( row.uuid ) == null ) {

                        RepositoryServiceFactory.getService().loadRuleAsset( row.uuid,
                                                                             new GenericCallback<RuleAsset>() {
                                                                                 public void onSuccess(final RuleAsset asset) {
                                                                                     SuggestionCompletionCache.getInstance().doAction( asset.metaData.packageName,
                                                                                                                                       new Command() {
                                                                                                                                           public void execute() {

                                                                                                                                               final RuleViewer ruleViewer = new RuleViewer( asset,
                                                                                                                                                                                             editItemEvent );
                                                                                                                                               ruleViewer.setDocoVisible( showDescription.isChecked() );
                                                                                                                                               ruleViewer.setMetaVisible( showMetadata.isChecked() );

                                                                                                                                               ruleViewer.setWidth( "100%" );

                                                                                                                                               panel.add( ruleViewer );
                                                                                                                                               ruleViewer.setCloseCommand( new Command() {

                                                                                                                                                   public void execute() {
                                                                                                                                                       ruleViews.remove( ruleViewer );
                                                                                                                                                       rows.remove( row );
                                                                                                                                                       doViews();
                                                                                                                                                   }
                                                                                                                                               } );

                                                                                                                                               ruleViews.put( row.uuid,
                                                                                                                                                              ruleViewer );

                                                                                                                                               panel.doLayout();
                                                                                                                                           }
                                                                                                                                       } );
                                                                                 }
                                                                             } );
                    } else {
                        panel.add( ruleViews.get( row.uuid ) );
                        panel.doLayout();
                    }
                }

            } );
View Full Code Here

        text.setVisibleLines( 5 );
        text.setStyleName( "rule-viewer-Documentation" ); //NON-NLS
        text.setTitle(constants.RuleDocHint());


        Panel p = new Panel();
        p.setCollapsible( true );
        p.setTitle( constants.Description() + ":" );
        p.setBodyBorder(false);


        if (data.description == null || data.description.equals("") || data.description.equals("<documentation>")) {
            p.setCollapsed(true);
        }
        p.add(text);

        final VerticalPanel vp = new VerticalPanel();
        vp.add(p);

        DeferredCommand.addCommand(new Command() {
View Full Code Here

        PushClient.instance().unsubscribe(pushNotify);
    }

    public DiscussionWidget(final RuleAsset asset) {
        this.asset = asset;
        final Panel discussionPanel = new Panel();
        discussionPanel.setCollapsible( true );
        discussionPanel.setTitle(constants.Discussion() + ":" );
        discussionPanel.setBodyBorder(false);

        commentList.setWidth("100%");
        VerticalPanel discussionLayout = new VerticalPanel();
        discussionLayout.setWidth("100%");

        discussionPanel.add(discussionLayout);

        discussionLayout.add(commentList);
        newCommentLayout.setWidth("100%");

        refreshDiscussion();
View Full Code Here

    setLayout( new BorderLayout() );

    BorderLayoutData centerLayoutData = new BorderLayoutData( RegionPosition.CENTER );
    centerLayoutData.setMargins( new Margins( 5, 0, 5, 5 ) );

    Panel centerPanelWrappper = new Panel();
    centerPanelWrappper.setLayout( new FitLayout() );
    centerPanelWrappper.setBorder( false );
    centerPanelWrappper.setBodyBorder( false );

    // this.listDetailsPanel.setMessagesPanelActive();

    // setup the west regions layout properties
    BorderLayoutData leftPanelLayoutData = new BorderLayoutData( RegionPosition.WEST );
    leftPanelLayoutData.setMargins( new Margins( 5, 5, 0, 5 ) );
    leftPanelLayoutData.setCMargins( new Margins( 5, 5, 5, 5 ) );
    leftPanelLayoutData.setMinSize( 155 );
    leftPanelLayoutData.setSplit( true );

    PanelRegistry.LEFT_PANEL.get().add( PanelRegistry.MAIL_FOLDER_PANEL.get() );
    PanelRegistry.LEFT_PANEL.get().add( PanelRegistry.CONTACT_FOLDER_PANEL.get() );

    add( PanelRegistry.LEFT_PANEL.get(), leftPanelLayoutData );

    centerPanelWrappper.add( PanelRegistry.LIST_DETAILS_PANEL.get() );
    add( centerPanelWrappper, centerLayoutData );

    setTopToolbar( ToolbarManager.get().getWorkbenchToolbar() );
  }
View Full Code Here

  /**
   * Set the proper window size and position.
   */
  private void calculateSize() {

    Panel panel = PanelRegistry.LIST_DETAILS_PANEL.get();
    int posx = panel.getAbsoluteLeft();
    int posy = panel.getAbsoluteTop();
    int width = panel.getWidth();
    int height = panel.getHeight();
    setPosition( posx, posy );
    setWidth( width );
    setHeight( height );
  }
View Full Code Here

TOP

Related Classes of com.gwtext.client.widgets.Panel

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.