Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.FocusPanel


        content.add(table);

        scroller = new ScrollPanel();

        if (hotkeysEnabled) {
            focuser = new FocusPanel();
            focuser.setWidth("99%");
            focuser.add(content);

            scroller.add(focuser);
        } else {
View Full Code Here


    context.dragController.dragEnd();
  }

  private void initCapturingWidget() {
    capturingWidget = new FocusPanel();
    capturingWidget.setPixelSize(0, 0);
    capturingWidget.addMouseMoveHandler(this);
    capturingWidget.addMouseUpHandler(this);
    capturingWidget.getElement().getStyle().setProperty("visibility", "hidden");
    capturingWidget.getElement().getStyle().setProperty("margin", "0px");
View Full Code Here

    String imgUrl = p.getThumbnailUrl();
    panel.add(new Image(imgUrl == null ? noPhotoUrl : imgUrl));
    panel.add(new Label(p.getDisplayName()));

    FocusPanel fPanel = new FocusPanel(panel);
    if (clickHandler != null) {
      fPanel.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          clickHandler.handle(p.getId());
        }
      });
    }
View Full Code Here

  public Column(int id, boolean sortable, Widget label, String width, Renderer renderer) {
    _id = id;
    _sortable = sortable;
    _renderer = renderer;
    FocusPanel panel = new FocusPanel(label);
    panel.setWidth(width);
    initWidget(panel);
    setStylePrimaryName(STYLE);
    if(sortable) addStyleDependentName(STYLE_SORTABLE);
  }
View Full Code Here

    ModelView<T> view = (ModelView<T>)viewFactory.createView();
    view.setModel(object, group.<Void>member());
    views.add(view);
    Widget widget = view.getViewWidget();
    if(selectable || clickable) {
        FocusPanel wrapper = new FocusPanel(view.getViewWidget());
        wrapper.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {
            onRowClicked(i);
          }
        });
        wrapper.addMouseListener(new HoverStyleHandler(wrapper, hoverGroup));
        widget = wrapper;
    }
    widget.setStylePrimaryName("ui-list-item");
    if(rowStyle != null) DOM.setElementAttribute(widget.getElement(), "style", rowStyle);
    if(rowClass != null) {
View Full Code Here

        boolean clickable = (this.selectable || this.clickable);
    for(int i=0; i < flow.getWidgetCount(); i++) {
      Widget w = flow.getWidget(i);
      Widget replacement;
      if(selectable) {
          FocusPanel wrapper = new FocusPanel(w);
          final int row = i;
          wrapper.addClickListener(new ClickListener() {
            public void onClick(Widget sender) {
              onRowClicked(row);
            }
          });
          wrapper.addMouseListener(new HoverStyleHandler(w, hoverGroup));
          replacement = wrapper;
      } else {
        replacement = ((FocusPanel)w).getWidget();
      }
        flow.insert(replacement, i);
View Full Code Here

            {
                hide();
            }
        };
       
        m_focusPanel = new FocusPanel();
        m_body.add(m_focusPanel, m_id + "_body");
       
        m_focusPanel.addMouseOutHandler(this);
        m_focusPanel.addMouseOverHandler(this);
    }
View Full Code Here

    final PopupPanel popup = new PopupPanel( true, false ) {
      public void show() {
        // show glass pane
        super.show();
        if ( pageBackground == null ) {
          pageBackground = new FocusPanel() {
            public void onBrowserEvent( Event event ) {
              int type = event.getTypeInt();
              switch ( type ) {
                case Event.ONKEYDOWN: {
                  if ( (char) event.getKeyCode() == KeyCodes.KEY_ESCAPE ) {
View Full Code Here

    toolbarWrapper.add( toolbar );
    toolbarWrapper.setStyleName( "files-toolbar" ); //$NON-NLS-1$
    add( toolbarWrapper );

    SimplePanel filesListWrapper = new SimplePanel();
    FocusPanel fp = new FocusPanel( filesList ) {
      public void onBrowserEvent( Event event ) {
        if ( ( DOM.eventGetType( event ) & Event.ONKEYDOWN ) == Event.ONKEYDOWN ) {
          if ( event.getKeyCode() == KeyCodes.KEY_UP ) {
            selectPreviousItem( selectedFileItems );
          } else if ( event.getKeyCode() == KeyCodes.KEY_DOWN ) {
            selectNextItem( selectedFileItems );
          } else if ( event.getKeyCode() == KeyCodes.KEY_ENTER ) {
            SolutionBrowserPanel sbp = SolutionBrowserPanel.getInstance();
            FilesListPanel flp = sbp.getFilesListPanel();
            List<FileItem> items = flp.getSelectedFileItems();
            if ( items != null && items.size() == 1 ) {
              sbp.openFile( items.get( 0 ).getRepositoryFile(), COMMAND.RUN );
            }
          }
        }
        super.onBrowserEvent( event );
      }
    };
    filesList.setCellPadding( 1 );
    filesList.setWidth( "100%" );
    AbsolutePanel bounderyPanel = new AbsolutePanel();
    bounderyPanel.add( fp );

    fp.sinkEvents( Event.KEYEVENTS );

    filesListWrapper.add( bounderyPanel );
    fp.getElement().getStyle().setProperty( "margin", "29px 0px 10px 0px" ); //$NON-NLS-1$ //$NON-NLS-2$
    filesListWrapper.setStyleName( "files-list-panel" ); //$NON-NLS-1$
    add( filesListWrapper );

    setStyleName( "panelWithTitledToolbar" ); //$NON-NLS-1$ 
    setWidth( "100%" ); //$NON-NLS-1$
View Full Code Here

  public String getModuleName() {
    return "com.google.gwt.user.User";
  }

  public void testFocusPanelGestureEventSinkByAddingHandler() {
    verifyGestureStartEventSinkOnAddHandler(new FocusPanel(), false);
    verifyGestureEndEventSinkOnAddHandler(new FocusPanel(), false);
    verifyGestureChangeEventSinkOnAddHandler(new FocusPanel(), false);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.FocusPanel

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.