Package com.extjs.gxt.ui.client.widget

Examples of com.extjs.gxt.ui.client.widget.Label


  layoutContainer_0.setLayout(new TableLayout(2));
  TableData col1 = new TableData();
  col1.setWidth("600px");
  TableData col2 = new TableData();
  col2.setWidth("600px");
  labelChantier = new Label();
  labelChantier.setText("Chantier:" + chantier.getNom());
  labelRefTransfertpp = new Label();
  labelRefTransfertpp.setVisible(false);
  layoutContainer_0.add(labelChantier, col1);
  layoutContainer_0.add(labelRefTransfertpp, col2);
  setDefaultBackgroundColor(layoutContainer_0);
  setDefaultBackgroundColor(inforFieldset);
  inforFieldset.add(layoutContainer_0);
  formDetails = new CustomFormPanel();
  formDetails.add(inforFieldset);
  fsTransfertPp = new FieldSet();
  fsTransfertPp.setHeading("TRANSFERTS PP");
  fsTransfertPp.setLayout(new RowLayout(Orientation.VERTICAL));
  LayoutContainer layoutContainer_10 = new LayoutContainer();
  layoutContainer_10.setLayout(new BorderLayout());
  LayoutContainer buttonPanel = new LayoutContainer();
  buttonPanel.setId("buttonPanel");
  buttonPanel.setLayout(new RowLayout(Orientation.HORIZONTAL));
  Label label = new Label();
  label.setWidth("135px");
  buttonPanel.add(label);
  HTML space3 = new HTML(SPACES_3);
  buttonPanel.add(space3);
  saveButton = new HTML("<img src='./images/sauvegarder.png'/> " + messages.saveForm(), false);
  saveButton.setStyleName("actionHTML");
  saveButton.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
  saveButton.setVisible(true);
  saveButton.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent arg0) {
    Listener<MessageBoxEvent> callback = new Listener<MessageBoxEvent>() {
        @Override
        public void handleEvent(MessageBoxEvent be) {
      Button btt = be.getButtonClicked();
      if (Dialog.OK.equals(btt.getItemId())) {
          if (isSave == false) {
        saveAction(chantier.getId(), transfertPpId);
        isSave = true;
          }
      }
        }
    };
    createConfirmBox(callback, messages.deleteConfirmTitle(), messages.confirmSupprimer());
      }
  });
  buttonPanel.add(saveButton);
  layoutContainer_10.add(buttonPanel, new BorderLayoutData(LayoutRegion.EAST, 320.0f));
  layoutContainer_10.setHeight("30");
  fsTransfertPp.add(layoutContainer_10);
  LayoutContainer layoutContainer_11 = new LayoutContainer();
  Label label1 = new Label();
  label1.setText("Details des transferts PP:");
  Label label2 = new Label();
  label2.setText("Total des transferts PP");
  fsTransfertPp.add(label2);
  fsTransfertPp.add(gridligTotal);
  fsTransfertPp.add(new Html("<br/><br/><br/>"));
  fsTransfertPp.add(label1);
  fsTransfertPp.add(layoutContainer_11);
View Full Code Here


            }

            PropertiesEditor langPropertiesEditor = getPropertiesEditorByLang(locale);
            if (langPropertiesEditor == null) {
                if (addSharedLangLabel && node.isShared()) {
                    Label label = new Label(
                            "Important : This is a shared node, editing it will modify its value for all its usages");
                    label.setStyleAttribute("color", "rgb(200,80,80)");
                    label.setStyleAttribute("font-size", "14px");
                    add(label);
                }
                addSharedLangLabel = false;

View Full Code Here

                            });
                            return b;
                        }
                    }
                }
                return new Label(historyItem.<String>get("displayName"));
            }
        });
        config.add(column);

        column = new ColumnConfig("user", Messages.get("label.user", "User"), 70);
        config.add(column);

        column = new ColumnConfig("nodeWrapper", Messages.get("label.workflow.start.node", "Workflow Starting Node"),
                150);
        column.setRenderer(new GridCellRenderer<GWTJahiaWorkflowHistoryItem>() {

            /**
             * Returns the HTML to be used in a grid cell.
             *
             * @param model    the model
             * @param property the model property
             * @param config   the column config
             * @param rowIndex the row index
             * @param colIndex the cell index
             * @param store    the data store
             * @param grid     the grid
             * @return the cell HTML or Component instance
             */
            public Object render(GWTJahiaWorkflowHistoryItem model, String property, ColumnData config,
                                 int rowIndex, int colIndex,
                                 ListStore<GWTJahiaWorkflowHistoryItem> gwtJahiaWorkflowHistoryItemListStore,
                                 Grid<GWTJahiaWorkflowHistoryItem> gwtJahiaWorkflowHistoryItemGrid) {
                final GWTJahiaNode wrapper = (GWTJahiaNode) model.getProperties().get("nodeWrapper");

                if (wrapper != null) {
                    return new Label(wrapper.getDisplayName() + " (" + wrapper.getPath() + ")");
                }
                List<GWTJahiaWorkflowHistoryItem> models = gwtJahiaWorkflowHistoryItemListStore.getModels();
                for (final GWTJahiaWorkflowHistoryItem historyItem : models) {
                    final GWTJahiaNode nodewrapper = (GWTJahiaNode) historyItem.getProperties().get("nodeWrapper");
                    if (nodewrapper!=null && historyItem.getProcessId().equals(model.getProcessId()) &&
                        historyItem instanceof GWTJahiaWorkflowHistoryProcess) {
                        Button button = new Button(Messages.get("label.preview"));
                        button.addSelectionListener(new SelectionListener<ButtonEvent>() {
                            @Override
                            public void componentSelected(ButtonEvent ce) {
                                String path = nodewrapper.getPath();
                                String locale = JahiaGWTParameters.getLanguage();
                                JahiaContentManagementService.App.getInstance().getNodeURL("render", path, null, null,
                                        "default", locale, new BaseAsyncCallback<String>() {
                                            public void onSuccess(String url) {
                                                Window window = new Window();
                                                window.setMaximizable(true);
                                                window.setSize(800,600);
                                                window.setUrl(url);
                                                window.setPosition(engine.getPosition(true).x+50,engine.getPosition(true).y+50);
                                                window.show();
                                            }

                                        });
                            }
                        });
                        return button;
                    }
                }
                return new Label("");
            }
        });
        config.add(column);

        column = new ColumnConfig("startDate", Messages.get("org.jahia.engines.processDisplay.tab.startdate",
                "Start date"), 90);
        column.setDateTimeFormat(Formatter.DEFAULT_DATETIME_FORMAT);
        config.add(column);

        column = new ColumnConfig("endDate", Messages.get("org.jahia.engines.processDisplay.tab.enddate", "End date"),
                90);
        column.setDateTimeFormat(Formatter.DEFAULT_DATETIME_FORMAT);
        config.add(column);

        column = new ColumnConfig("duration", Messages.get("org.jahia.engines.processDisplay.column.duration",
                "Duration"), 60);
        column.setRenderer(new GridCellRenderer<GWTJahiaWorkflowHistoryItem>() {
            public Object render(GWTJahiaWorkflowHistoryItem historyItem, String property, ColumnData config,
                                 int rowIndex, int colIndex, ListStore<GWTJahiaWorkflowHistoryItem> store,
                                 Grid<GWTJahiaWorkflowHistoryItem> grid) {
                Long duration = historyItem.getDuration();
                String display = "-";
                if (duration != null) {
                    long time = duration.longValue();
                    if (time < 1000) {
                        display = time + " " + Messages.get("label.milliseconds", "ms");
                    } else if (time < 1000 * 60L) {
                        display = ((long) (time / 1000)) + " " + Messages.get("label.seconds", "sec");
                    } else if (time < 1000 * 60 * 60L) {
                        display = ((long) (time / (1000 * 60L))) + " " + Messages.get("label.minutes", "min") + " " +
                                  ((long) ((time % (1000 * 60L)) / 1000)) + " " + Messages.get("label.seconds", "sec");
                    } else {
                        display = ((long) (time / (1000 * 60 * 60L))) + " " + Messages.get("label_hours", "h") + " " +
                                  ((long) ((time % (1000 * 60 * 60L)) / (1000 * 60L))) + " " + Messages.get(
                                "label.minutes", "min");
                    }
                }
                return new Label(display);
            }
        });
        config.add(column);

        ColumnModel cm = new ColumnModel(config);
View Full Code Here

        column.setSortable(false);
        column.setRenderer(new GridCellRenderer<GWTJahiaContentHistoryEntry>() {

            public Object render(GWTJahiaContentHistoryEntry gwtJahiaContentHistoryEntry, String s, ColumnData columnData, int i, int i1, ListStore<GWTJahiaContentHistoryEntry> gwtJahiaContentHistoryEntryListStore, Grid<GWTJahiaContentHistoryEntry> gwtJahiaContentHistoryEntryGrid) {
                String message = buildMessage(gwtJahiaContentHistoryEntry);
                return new Label(message);
            }
        });
        config.add(column);

        final ColumnModel cm = new ColumnModel(config);
View Full Code Here

    private void init(final boolean displayVersionSelector) {

        final Label[] label = {null};

        if ("live".equals(workspace)) {
            label[0] = new Label(Messages.get("label_live_version ", "Live version "));
        } else {
            label[0] = new Label(Messages.get("label_staging_version ", "Staging version "));
        }
        // combo box that allows to select the version
        if (displayVersionSelector) {
            Date startDate = new Date();
            previousValue = new Date[]{startDate};
View Full Code Here

            panel.setHeaderVisible(false);
            panel.setBorders(false);
            panel.setBodyBorder(false);
            setModal(true);

            panel.add(new Label(Messages.get("label.googleDocs.export.description",
                    "Here you can find possible output formats" + " by selecting a corresponding link") + ":"));

            final ContentPanel buttonPanel = new ContentPanel();
            buttonPanel.setHeight(220);
            buttonPanel.setLayout(new RowLayout(Orientation.VERTICAL));
            buttonPanel.setHeaderVisible(false);
            buttonPanel.setBorders(false);
            buttonPanel.setBodyBorder(false);
           
            panel.add(buttonPanel, new FlowData(10, 0, 0, 100));
           
            final String basePath = JahiaGWTParameters.getContextPath() + "/cms/gconvert/"
                    + JahiaGWTParameters.getWorkspace() + node.getPath() + "?exportFormat=";
           
            panel.mask(Messages.get("label.loading","Loading..."), "x-mask-loading");
            JahiaContentManagementService.App.getInstance().getGoogleDocsExportFormats(node.getUUID(), new BaseAsyncCallback<List<String>>() {

                public void onSuccess(List<String> result) {
                    panel.unmask();
                    for (final String format : result) {
                        Button btn = new Button(Messages.get("label.googleDocs.export.format." + format, format), ContentModelIconProvider.getInstance().getIcon("jnt_file_"+format, false,false));
                        btn.addSelectionListener(new SelectionListener<ButtonEvent>() {
                            @Override
                            public void componentSelected(ButtonEvent ce) {
                                com.google.gwt.user.client.Window.open(basePath + format, "_blank", "");
                            }
                        });
                        buttonPanel.add(btn, new RowData(-1, -1, new Margins(2)));
                    }
                    layout();
                }
               
                @Override
                public void onFailure(Throwable caught) {
                    panel.unmask();
                    super.onFailure(caught);
                }
            });
           
            panel.add(new Label(Messages.get("mount.disclaimer",
            "Disclaimer") + ": " + Messages.get("label.googleDocs.export.disclaimer", "")));

            panel.setButtonAlign(HorizontalAlignment.CENTER);
            panel.addButton(new Button(Messages.get("label.cancel", "Cancel"), new SelectionListener<ButtonEvent>() {
                public void componentSelected(ButtonEvent event) {
View Full Code Here

            panel.setHeaderVisible(false);
            panel.setBorders(false);
            panel.setBodyBorder(false);
            setModal(true);

            panel.add(new Label(Messages.get("label.googleDocs.edit.description",
                    "Please use the following button to open the document in Google Docs and start editing."
                            + "\nAfter editing is finished and the document is saved, please, "
                            + "click 'Stop editing' button to get the changes back into your local copy.")));

            panel.setButtonAlign(HorizontalAlignment.CENTER);
View Full Code Here

            if (propertiesEditor == null) {
                if (engine.isExistingNode() && engine.getNode().isShared()) {
                    // this label is shared among languages.
                    if (addSharedLangLabel) {
                        Label label = new Label(Messages.get("warning.sharedNode", "Important : This is a shared node, editing it will modify its value for all its usages"));
                        label.setStyleAttribute("color", "rgb(200,80,80)");
                        label.setStyleAttribute("font-size", "14px");
                        tab.add(label);
                    }
                }

                Map<String, GWTJahiaNodeProperty> properties = engine.getProperties();
View Full Code Here

                hBoxLayout.setHBoxLayoutAlign(HBoxLayout.HBoxLayoutAlign.MIDDLE);
                final LayoutContainer panel = new LayoutContainer(hBoxLayout);

                panel.add(this.nameText, new HBoxLayoutData(0,5,0,5));

                autoUpdateLabel = new Label("");
                panel.add(autoUpdateLabel, new HBoxLayoutData(0,5,0,5));
                if (titleField != null) {
                    autoUpdateName = new CheckBox();
                    autoUpdateName.setWidth(10);
                    panel.add(autoUpdateName, new HBoxLayoutData(0,5,5,5));
View Full Code Here

        TextField<String> system2 = new TextField<String>();
        system2.setReadOnly(true);
        system2.setValue("u' = u + x + y + 4, u = 1.0");
       
       
        panel.add(new Label("Equation"));
        panel.add(equation);
        panel.add(new Label("System of equations"));
        panel.add(system1);
        panel.add(system2);
       
        mainPanel.add(panel);
        add(mainPanel);
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.widget.Label

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.