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

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


    setCollapsible(true);
    setAnimCollapse(true);
    setMaximizable(true);
    setFocusWidget(input);
   
    ContentPanel center = new ContentPanel();
    center.setFrame(false);
    center.setBodyBorder(false);
    center.setHeaderVisible(false);
    BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER,350)
      centerData.setMargins(new Margins(0));
     
    ContentPanel east = new ContentPanel();
    east.setLayout(new FitLayout());
    east.setHeading("Buddys");
    east.setFrame(false);
    east.setBodyBorder(false);
    BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 200)
      eastData.setSplit(true)
      //eastData.setCollapsible(true); 
      eastData.setMargins(new Margins(5));
   
    //the center widgets
    childPanel = new ContentPanel();
    childPanel.addStyleName("message_view");
    childPanel.setHeaderVisible(false);
    childPanel.setBorders(false);
    childPanel.setFrame(false);
    childPanel.setHeight("100%");
    childPanel.setScrollMode(Scroll.AUTO);
   
    center.add(childPanel);
    center.setBottomComponent(createBottomWidget());
   
    //the east widgets
    east.add(createRosterWidget());
   
    add(center, centerData);
    add(east, eastData);
   
    this.addListener(Events.Show, new Listener<WindowEvent>()
View Full Code Here


    buttonBar.add(closeButton);
  }
 
  private void createResultPanel()
  {
    resultPanel = new ContentPanel()
    resultPanel.setBodyBorder(false)
    resultPanel.setHeaderVisible(false);
    resultPanel.setButtonAlign(HorizontalAlignment.CENTER)
    resultPanel.setLayout(new FitLayout())
   
View Full Code Here

   
    setClosable(true);
    //setCloseAction(CloseAction.HIDE);
    setCloseAction(CloseAction.HIDE);
   
    childPanel = new ContentPanel();
    childPanel.addStyleName("message_view");
    childPanel.setHeaderVisible(false);
    childPanel.setBorders(false);
    childPanel.setFrame(false);
    childPanel.setHeight("100%");
View Full Code Here

      hideTooltip();
    }
  }

  protected void createButtons() {
    btns = new ContentPanel() {
      protected void createStyles(String baseStyle) {
        baseStyle = "x-plain";
        headerStyle = baseStyle + "-header";
        headerTextStyle = baseStyle + "-header-text";
        bwrapStyle = baseStyle + "-bwrap";
View Full Code Here

    timer.scheduleRepeating(DELAY);
  }
 
  private ContentPanel addComentarios(){
   
    final ContentPanel commentPanel = new ContentPanel();
    commentPanel.setHeading("Comentarios");
    commentPanel.setSize(COMMENT_WIDTH.toString(), COMMENT_HEIGTH.toString());

    if ((Context.getInstance().isAvaiable(PermissionsConst.COMENTARIOS))
      || (Context.getInstance().isAvaiable(PermissionsConst.COMENTARIOS_NO_ASIGNADOS))){
      Button btnAddComment = new Button("Comentario");
      commentPanel.add(btnAddComment);
     
      btnAddComment.setIcon(Resources.ICONS.addComment());
      btnAddComment.addSelectionListener(new SelectionListener<ButtonEvent>() {
        public void componentSelected(ButtonEvent be) {
          List seleccionados = grid.getSelectionModel().getSelectedItems();   
          if (seleccionados.size()==1){
            BaseModel baseModel = (BaseModel) seleccionados.iterator().next();
            Map actual = grid.search(ParamsConst.ID, baseModel.get(ParamsConst.ID));
           
            if ((Context.getInstance().getUsuario().get(ParamsConst.ID).equals(actual.get(ParamsConst.ID_USUARIO))) ||
                (!(Context.getInstance().getUsuario().get(ParamsConst.ID).equals(actual.get(ParamsConst.ID_USUARIO)))
                    && Context.getInstance().isAvaiable(PermissionsConst.COMENTARIOS_NO_ASIGNADOS))){
              //Context.getInstance().windowShow(new CommentWindows((Integer)actual.get(ParamsConst.ID), (String)actual.get(ParamsConst.NOMBRE_TAREA)));
              CommentWindows windows = new CommentWindows((Integer)actual.get(ParamsConst.ID), (String)actual.get(ParamsConst.NOMBRE_TAREA));
              windows.show();
            } else {
              DialogFactory.info("No tiene permisos para agregar comentarios en tareas no asignadas");
            }
          } else {
            if (seleccionados.size()==0){
              DialogInfo dialogInfo = new DialogInfo(
                  "Seleccione una tarea para agregar comentarios.");
            } else {
              DialogInfo dialogInfo = new DialogInfo(
                "Seleccione solo una tarea para agregar comentarios.");
            }
          }
        }
      });
    }
   
    /*Html html = new Html();
    commentPanel.add(html);
    html.setWidth(COMMENT_BOX_WIDTH);
    html.setHeight(COMMENT_BOX_HEIGTH);
    html.setBorders(Boolean.TRUE);
    Context.getInstance().setHtml(html);*/

    final HtmlEditor htmlEditor = new HtmlEditor();
    commentPanel.add(htmlEditor);
    htmlEditor.setWidth(COMMENT_BOX_WIDTH);
    htmlEditor.setHeight(COMMENT_BOX_HEIGTH);
    htmlEditor.setShowToolbar(Boolean.FALSE);
    htmlEditor.setReadOnly(Boolean.TRUE);
    Context.getInstance().setHtmlEditor(htmlEditor);
View Full Code Here

   
    initialize(name);

    addToolBar();
   
    ContentPanel cntntpnlNewContentpanel = new ContentPanel();
    cntntpnlNewContentpanel.setHeaderVisible(false);
   
    cntntpnlNewContentpanel.add(htmlEditor);
    add(cntntpnlNewContentpanel, new RowData(Style.DEFAULT, 300.0, new Margins()));
   
  }
View Full Code Here

        return;
      }
    }
    if (w instanceof ContentPanel) {
      if (pe != null) pe.stopEvent();
      ContentPanel panel = (ContentPanel) w;
      if (panel.getTopComponent() != null) {
        focusWidget(panel.getTopComponent());
        return;
      }
    }
    if (w instanceof LayoutContainer || w instanceof HtmlContainer) {
      if (pe != null) pe.stopEvent();
      Container<?> c = (Container<?>) w;
      if (c.getItemCount() > 0) {
        focusWidget(forward ? c.getItem(0) : c.getItem(c.getItemCount() - 1));
      }
    } else if (w instanceof ComplexPanel) {
      if (pe != null) pe.stopEvent();
      ComplexPanel panel = (ComplexPanel) w;
      if (panel.getWidgetCount() > 0) {
        focusWidget(panel.getWidget(0));
      }
    }
  }
View Full Code Here

import com.google.gwt.user.client.ui.Widget;

public class ContentPanelNavigationHandler implements NavigationHandler {

  public List<Widget> getOrderedWidgets(Widget widget) {
    ContentPanel panel = null;
    if (widget instanceof HorizontalPanel) {
      panel = (ContentPanel)widget.getParent().getParent();
    } else if (widget.getParent() instanceof ContentPanel){
      panel = (ContentPanel) widget.getParent();
    } else {
      panel = (ContentPanel) widget;
    }

    List<Widget> widgets = new ArrayList<Widget>();

    Header header = panel.getHeader();
    for (int i = 0, len = header.getTools().size(); i < len; i++) {
      widgets.add(header.getTool(i));
    }

    if (panel.getTopComponent() != null) {
      widgets.add(panel.getTopComponent());
    }

    for (int i = 0, len = panel.getItemCount(); i < len; i++) {
      widgets.add(panel.getItem(i));
    }

    if (panel.getBottomComponent() != null) {
      widgets.add(panel.getBottomComponent());
    }

    if (panel.getButtonBar() != null && panel.getButtonBar().getItemCount() > 0 ) {
      widgets.add(panel.getButtonBar());
    }
   
    if (panel instanceof CollapsePanel) {
      widgets.add(((CollapsePanel)panel).getCollapseButton());
    }
View Full Code Here

   * @param region the region to expand
   */
  public void expand(LayoutRegion region) {
    Component c = getRegionWidget(region);
    if (c != null && c instanceof CollapsePanel) {
      ContentPanel cp = (ContentPanel) c.getData("panel");
      onExpand(cp);
    }
  }
View Full Code Here

  @Override
  protected void onRemove(Component component) {
    super.onRemove(component);
    if (component instanceof ContentPanel) {
      ContentPanel panel = (ContentPanel) component;
      if (panel.getData("collapseBtn") != null) {
        Component tool = (Component) panel.getData("collapseBtn");
        tool.removeAllListeners();
        panel.getHeader().removeTool(tool);
      }
      panel.removeListener(Events.BeforeCollapse, collapseListener);
      panel.removeListener(Events.BeforeExpand, collapseListener);
    }
    component.setData("init", null);
    component.setData("collapseBtn", null);
    component.setData("collapse", null);
View Full Code Here

TOP

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

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.