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

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


    // Create the panel which will be disclosed.
    final PopupPanel popupMenu = new PopupPanel(/* auto hide */ true);
    popupMenu.setStyleName(style.dropDownMenuPopup());

    FocusPanel focusContents = new FocusPanel();
    focusContents.addMouseOutHandler(new MouseOutHandler() {
      @Override
      public void onMouseOut(MouseOutEvent event) {
        popupMenu.hide();
      }
    });
    focusContents.setWidget(menuContents);

    popupMenu.setWidget(focusContents);

    // Create the button which will disclose the menu.
    final PushButton menuButton = new PushButton(new Image(resources.downArrow()));
View Full Code Here


 
        FlowPanel contentItemPanel = new FlowPanel();
        contentItemPanel.add(displayString);
        contentItemPanel.add(contentItem.renderTiny());
       
        FocusPanel clickPanel = new FocusPanel(contentItemPanel);
        clickPanel.addClickHandler(new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            handler.onClick(contentItem);
          }
        });
View Full Code Here

            center();
        }
    }

    private FocusPanel createKeyListeningFocusPanel(VerticalPanel verticalPanel) {
        FocusPanel focusPanel = new FocusPanel(verticalPanel);

        focusPanel.addKeyDownHandler(new KeyDownHandler() {
            public void onKeyDown(KeyDownEvent event) {
                if (event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) {
                    hide();
                }
            }
        });

        focusPanel.setStyleName("");
        focusPanel.setFocus(true);
        focusPanel.setWidth("100%");
        return focusPanel;
    }
View Full Code Here

  public void center() {
    // IE6 has problems with 100% height so is better a huge size
    // pageBackground.setSize("100%", "100%");
    if (glassPanel == null) {
      glassPanel = new FocusPanel();
      glassPanel.setStyleName("base-glass-panel"); //$NON-NLS-1$
      glassPanel.addClickHandler(new ClickHandler() {

        public void onClick(ClickEvent event) {
          clickCount++;
View Full Code Here

  public void center() {
    // IE6 has problems with 100% height so is better a huge size
    // pageBackground.setSize("100%", "100%");
    if (glassPanel == null) {
      glassPanel = new FocusPanel();
      glassPanel.setStyleName("base-glass-panel"); //$NON-NLS-1$
      glassPanel.addClickHandler(new ClickHandler() {

        public void onClick(ClickEvent event) {
          clickCount++;
View Full Code Here

            HorizontalPanel hp = new HorizontalPanel();
            hp.setVerticalAlignment( VerticalPanel.ALIGN_MIDDLE );
            hp.setHorizontalAlignment( HorizontalPanel.ALIGN_CENTER );
            hp.setWidth( "100%" );

            FocusPanel fp;
            fp = new FocusPanel();
            fp.setHeight( "100%" );
            fp.setWidth( "50%" );
            fp.add( new Image( resource.selectorAdd() ) );
            fp.addClickHandler( new ClickHandler() {

                public void onClick(ClickEvent event) {
                    hasRows.insertRowBefore( row );
                }

            } );
            hp.add( fp );

            fp = new FocusPanel();
            fp.setHeight( "100%" );
            fp.setWidth( "50%" );
            fp.add( new Image( resource.selectorDelete() ) );
            fp.addClickHandler( new ClickHandler() {

                public void onClick(ClickEvent event) {
                    hasRows.deleteRow( row );
                }
View Full Code Here

   private boolean test;

   @Before
   public void beforeFocusPanelTest() {
      child = new Label("focus panel's child widget");
      panel = new FocusPanel(child);
      test = false;
   }
View Full Code Here

   }

   @Test
   public void click_EmptyPanel() {
      // Arrange
      panel = new FocusPanel();
      panel.addClickHandler(new ClickHandler() {

         public void onClick(ClickEvent event) {
            test = true;
         }
View Full Code Here

      assertThat(textBox.getCursorPos()).isEqualTo(6);
   }

   @Before
   public void beforeBrowserTest() {
      panel = new FocusPanel();
      RootPanel.get().add(panel);
      b = new Button();
      panel.add(b);

      tested = false;
View Full Code Here

   @Test
   public void click_firesNativePreviewHandler() {
      // Arrange
      Button b = new Button();
      FocusPanel focusPanel = new FocusPanel();
      focusPanel.add(b);
      RootPanel.get().add(focusPanel);

      final StringBuilder sb = new StringBuilder();

      Event.addNativePreviewHandler(new NativePreviewHandler() {
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.