@Override
  public void show() {
    super.show();
    //		GeneralPanel.setSize(400+Constants.PX, 40+Constants.PX);
    EditorZone.setVisible(false);
    GeneralPanel.setSize(
        PanelActivity.getOffsetWidth() + Constants.PX,
        PanelActivity.getOffsetHeight() + Constants.PX);

    if (ActualState.isLanguageActive()) {
      GeneralPanel.setHeight(Constants.TAMANO_PANEL_EDICION_INT + 40 + Constants.PX);
      EditorZone.setVisible(true);
      closeEditPanel();
    }
  }
  /**
   * Sets the icon for this item using the given CSS classes.
   *
   * <p>
   *
   * @param iconClasses the CSS classes
   */
  public void setIcon(String iconClasses) {

    m_iconPanel.setVisible(true);
    Panel iconWidget = new SimplePanel();
    m_iconPanel.setWidget(iconWidget);
    iconWidget.addStyleName(iconClasses + " " + m_fixedIconClasses);
  }
示例#3
0
文件: Toolbar.java 项目: ltly/firefly
 public void setIconRight(Widget w) {
   iconHolderRight.setWidget(w);
   iconHolderRight.setVisible(w != null);
   if (w != null) {
     w.setSize("20px", "20px");
     GwtUtil.setStyles(w, "verticalAlign", "middle", "margin", "0");
   }
 }
  /**
   * Sets the icon of this item.
   *
   * <p>
   *
   * @param image the image to use as icon
   */
  public void setIcon(Image image) {

    m_iconPanel.setVisible(true);
    if (image == null) {
      return;
    }
    m_iconPanel.setWidget(image);
  }
示例#5
0
  /** Rebuild already added widget based on already added admins */
  private void rebuildAlreadyAddedWidget() {

    alreadyAdded.setStyleName("alreadyAdded");
    alreadyAdded.setVisible(!alreadyAddedList.isEmpty());
    alreadyAdded.setWidget(new HTML("<strong>Already added: </strong>"));
    for (int i = 0; i < alreadyAddedList.size(); i++) {
      alreadyAdded
          .getWidget()
          .getElement()
          .setInnerHTML(
              alreadyAdded.getWidget().getElement().getInnerHTML()
                  + ((i != 0) ? ", " : "")
                  + alreadyAddedList.get(i).getFullName());
    }
  }
  /**
   * Constructor.
   *
   * <p>
   *
   * @param infoBean bean holding the item information
   */
  protected void init(CmsListInfoBean infoBean) {

    m_iconPanel.setVisible(false);
    m_title.setText(infoBean.getTitle());
    m_subtitle.setText(infoBean.getSubTitle());

    // set the resource type icon if present
    if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(infoBean.getResourceType())) {
      setIcon(CmsIconUtil.getResourceIconClasses(infoBean.getResourceType(), false));
    }
    if (infoBean.getStateIcon() != null) {
      setStateIcon(infoBean.getStateIcon());
    }
    if (infoBean.getLockIcon() != null) {
      setLockIcon(infoBean.getLockIcon(), infoBean.getLockIconTitle());
    }
    initAdditionalInfo(infoBean);
  }
  @Override
  public void edit(final SnapshotModel model) {
    driver.edit(model);

    if (model.isShowMemorySnapshotWarning() && !model.isShowPartialSnapshotWarning()) {
      Style dialogStyle = getParent().getParent().getParent().getElement().getStyle();
      dialogStyle.setWidth(450, Style.Unit.PX);
      dialogStyle.setHeight(200, Style.Unit.PX);
    }

    partialSnapshotWarningPanel.setVisible(model.isShowPartialSnapshotWarning());
    memoryWarningPanel.setVisible(model.isShowMemorySnapshotWarning());
    horizontalSeparator.setVisible(
        model.isShowPartialSnapshotWarning() && model.isShowMemorySnapshotWarning());

    vmDisksLabel.setText(
        messages.vmDisksLabel(
            model.getVmDisks().size(),
            StringUtils.join(Linq.getDiskAliases(model.getVmDisks()), ", "))); // $NON-NLS-1$
    snapshotDisksLabel.setText(
        messages.snapshotDisksLabel(
            model.getDisks().size(),
            StringUtils.join(Linq.getDiskAliases(model.getDisks()), ", "))); // $NON-NLS-1$
  }
  public SeleccionCatalogoPopupPanel(
      CatalogoClient catalogo,
      Label catalogLabel,
      Label openCatalogLabel,
      EditorActivityPopupPanel yo) {

    super(true);
    Catalogo = catalogo;
    LPrivate = catalogLabel;
    LPublic = openCatalogLabel;
    Father = yo;
    GeneralPanel = new AbsolutePanel();
    setAnimationEnabled(true);
    HorizontalPanel PanelActivityH = new HorizontalPanel();
    PanelActivity = new VerticalPanel();
    EditorZone = new SimplePanel();
    EditorZone.setHeight(Constants.TAMANO_PANEL_EDICION);
    EditorZone.setVisible(false);
    PanelActivity.add(EditorZone);
    PanelActivity.add(PanelActivityH);
    PanelActivityH.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    PanelActivityH.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    PanelActivityH.setSpacing(4);

    GeneralPanel.add(PanelActivity, 0, 0);
    setWidget(GeneralPanel);
    GeneralPanel.setSize(
        Window.getClientWidth() + Constants.PX, Window.getClientHeight() + Constants.PX);
    // PanelActivityH.setSize("100%", "100%");
    // PanelActivity.setSize("100%", "100%");
    PanelActivity.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    PanelActivity.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);

    SelectTeacherCatalogButton = new Button(SeleccionCatalogoPopupPanel.BOTTON_TEACHER_CATALOG);
    SelectTeacherCatalogButton.setSize("100%", "100%");
    SelectTeacherCatalogButton.addMouseDownHandler(
        new MouseDownHandler() {
          public void onMouseDown(MouseDownEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenterPush");
          }
        });
    SelectTeacherCatalogButton.addMouseOutHandler(
        new MouseOutHandler() {
          public void onMouseOut(MouseOutEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenter");
          }
        });
    SelectTeacherCatalogButton.addMouseOverHandler(
        new MouseOverHandler() {
          public void onMouseOver(MouseOverEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenterOver");
          }
        });
    SelectTeacherCatalogButton.setStyleName("gwt-ButtonCenter");
    SelectTeacherCatalogButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            LPrivate.setText("Teacher Catalog :" + Catalogo.getCatalogName());
            LoadingPanel.getInstance().center();
            LoadingPanel.getInstance().setLabelTexto(ConstantsInformation.LOADING);
            bookReaderServiceHolder.loadCatalogById(
                Catalogo.getId(),
                new AsyncCallback<CatalogoClient>() {

                  @Override
                  public void onSuccess(CatalogoClient result) {
                    LoadingPanel.getInstance().hide();
                    Father.setSelectedCatalog(result);
                    Father.setPanel_Selecion_Default_Visibility(true);
                    hide();
                  }

                  @Override
                  public void onFailure(Throwable caught) {
                    LoadingPanel.getInstance().hide();
                    Window.alert(ConstantsError.ERROR_LOADING_CATALOG);
                    hide();
                  }
                });
          }
        });
    PanelActivityH.add(SelectTeacherCatalogButton);

    SelectOpenCatalogButton = new Button(SeleccionCatalogoPopupPanel.BOTTON_OPEN_CATALOG);
    SelectOpenCatalogButton.setSize("100%", "100%");
    SelectOpenCatalogButton.addMouseDownHandler(
        new MouseDownHandler() {
          public void onMouseDown(MouseDownEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenterPush");
          }
        });
    SelectOpenCatalogButton.addMouseOutHandler(
        new MouseOutHandler() {
          public void onMouseOut(MouseOutEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenter");
          }
        });
    SelectOpenCatalogButton.addMouseOverHandler(
        new MouseOverHandler() {
          public void onMouseOver(MouseOverEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenterOver");
          }
        });
    SelectOpenCatalogButton.setStyleName("gwt-ButtonCenter");
    SelectOpenCatalogButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            LPublic.setText("Open Catalog :" + Catalogo.getCatalogName());
            Father.setSelectedCatalogPublic(Catalogo);
            hide();
          }
        });
    PanelActivityH.add(SelectOpenCatalogButton);
    PanelEdicion = new AbsolutePanel();
  }
  /**
   * Hides the icon of the list item widget.
   *
   * <p>
   */
  public void clearIcon() {

    m_iconPanel.setVisible(false);
  }
示例#10
0
 @Override
 public void setWidget(IsWidget activityWidget) {
   Widget widget = Widget.asWidgetOrNull(activityWidget);
   panel.setVisible(widget != null);
   panel.setWidget(widget);
 }
示例#11
0
 @Override
 public void setControllerVisible(boolean show) {
   controller.setVisible(show);
 }