Examples of Popup


Examples of org.eclipse.sapphire.ui.forms.swt.Popup

    @Override
    protected String browse( final Presentation context )
    {
        final MutableReference<String> result = new MutableReference<String>();
       
        final Popup dialog = new Popup( ( (FormComponentPresentation) context ).shell(), null )
        {
            private DateTime calendar;
           
            @Override
            protected Point getInitialLocation( final Point size )
            {
                return ( (PropertyEditorPresentation2) context ).getActionPopupPosition( size.x, size.y );
            }

            @Override
            protected Control createContentArea( final Composite parent )
            {
                this.calendar = new DateTime( parent, SWT.CALENDAR );
               
                final Date existing = (Date) property().content();
               
                if( existing != null )
                {
                    final Calendar cal = Calendar.getInstance();
                    cal.setTime( existing );
                   
                    this.calendar.setYear( cal.get( Calendar.YEAR ) );
                    this.calendar.setMonth( cal.get( Calendar.MONTH ) );
                    this.calendar.setDay( cal.get( Calendar.DATE ) );
                }
               
                this.calendar.addMouseListener
                (
                    new MouseAdapter()
                    {
                        @Override
                        public void mouseDoubleClick( final MouseEvent event )
                        {
                            registerSelectionAndClose();
                        }
                    }
                );
               
                this.calendar.addKeyListener
                (
                    new KeyAdapter()
                    {
                        @Override
                        public void keyPressed( final KeyEvent event )
                        {
                            if( event.character == SWT.CR )
                            {
                                registerSelectionAndClose();
                            }
                        }
                    }
                );
               
                return calendar;
            }
           
            private void registerSelectionAndClose()
            {
                final Calendar cal = Calendar.getInstance();
                cal.set( this.calendar.getYear(), this.calendar.getMonth(), this.calendar.getDay() );
                final Date date = cal.getTime();
               
                result.set( property().service( MasterConversionService.class ).convert( date, String.class ) );
               
                close();
            }
        };
       
        dialog.setBlockOnOpen( true );
       
        dialog.open();
       
        return result.get();
    }
View Full Code Here

Examples of org.eclipse.sapphire.ui.forms.swt.Popup

        toolTipCreate(event);
    }

    private Popup toolTipCreate(final Event event) {
        if (shouldCreateToolTip(event)) {
            final Popup popup = new Popup(this.control.getShell(), null)
            {
                @Override
                protected Control createContentArea( final Composite parent )
                {
                    getShell().setData( DATA_SAPPHIRE_TOOLTIP, this );
View Full Code Here

Examples of org.gwtoolbox.widget.client.popup.Popup

        }

        // Create a new popup for this item, and position it next to
        // the item (below if this is a horizontal menu bar, to the
        // right if it's a vertical bar).
        popup = new Popup(true, false) {
            {
                setWidget(item.getSubMenu());
                item.getSubMenu().onShow();
            }
View Full Code Here

Examples of org.thechiselgroup.choosel.core.client.ui.popup.Popup

        assert !highlightingManagers.containsKey(viewItem.getViewItemID());

        final HighlightingManager highlightingManager = new HighlightingManager(
                hoverModel, viewItem.getResources());

        Popup popup = getPopupManager(viewItem).getPopup();

        popup.addDomHandler(new MouseOverHandler() {
            @Override
            public void onMouseOver(MouseOverEvent e) {
                highlightingManager.setHighlighting(true);
            }
        }, MouseOverEvent.getType());
        popup.addDomHandler(new MouseOutHandler() {
            @Override
            public void onMouseOut(MouseOutEvent event) {
                highlightingManager.setHighlighting(false);
            }
        }, MouseOutEvent.getType());
        popup.addHandler(new PopupOpacityChangedEventHandler() {
            @Override
            public void onOpacityChangeStarted(PopupOpacityChangedEvent event) {
                if (event.getOpacity() == Opacity.TRANSPARENT) {
                    highlightingManager.setHighlighting(false);
                }
View Full Code Here

Examples of org.thechiselgroup.choosel.core.client.ui.popup.Popup

    // TODO move to factory
    // TODO refactor
    protected DelayedPopupManager createPopup(final DragContext context,
            String message) {

        Popup popup = popupFactory.createPopup();

        DelayedPopupManager popupManager = new DefaultDelayedPopupManager(
                POPUP_SHOW_DELAY, POPUP_HIDE_DELAY, popup) {

            @Override
View Full Code Here

Examples of org.thechiselgroup.choosel.core.client.ui.popup.Popup

        assert !highlightingManagers.containsKey(visualItem.getId());

        final HighlightingManager highlightingManager = new HighlightingManager(
                hoverModel, visualItem.getResources());

        Popup popup = getHandler(visualItem).getPopup();

        popup.addDomHandler(new MouseOverHandler() {
            @Override
            public void onMouseOver(MouseOverEvent e) {
                highlightingManager.setHighlighting(true);
            }
        }, MouseOverEvent.getType());
        popup.addDomHandler(new MouseOutHandler() {
            @Override
            public void onMouseOut(MouseOutEvent event) {
                highlightingManager.setHighlighting(false);
            }
        }, MouseOutEvent.getType());
        popup.addHandler(new PopupOpacityChangedEventHandler() {
            @Override
            public void onOpacityChangeStarted(PopupOpacityChangedEvent event) {
                if (event.getOpacity() == Opacity.TRANSPARENT) {
                    highlightingManager.setHighlighting(false);
                }
View Full Code Here

Examples of org.waveprotocol.wave.client.widget.popup.simple.Popup

  private EditorImpl createEditor(KeyBindingRegistry keyBinding) {
    EditorStaticDeps.setPopupProvider(new PopupProvider() {
      @Override
      public UniversalPopup createPopup(Element reference, RelativePopupPositioner positioner,
          PopupChrome chrome, boolean autoHide) {
        return new Popup(reference, positioner);
      }
      @Override
      public void setRootPanel(Panel rootPanel) {
        // Not used as we use our own popup implementation.
      }
View Full Code Here

Examples of org.zkoss.zul.Popup

   */
  public void onMouseOverListCell(MouseEvent event) {

    // System.out.println("current target : " + event.getTarget());
    if (popup == null) {
      popup = new Popup();
      popup.setSclass("myPopup");
      popup.setParent(window_customerList);
      // popup.setWidth("200px");
      vbox = new Vbox();
      vbox.setStyle("padding: 0px;");
View Full Code Here

Examples of org.zkoss.zul.Popup

        result.appendChild(label);
        return result;
    }

    private static Popup createPopup(Div parent, String originalValue) {
        Popup result = new Popup();
        result.appendChild(new Label(originalValue));
        parent.appendChild(result);
        return result;
    }
View Full Code Here

Examples of welcome.client.ui.popup.Popup

    this.openInPopupBt = new Button("Open the store in a popup");
    this.openInPopupBt.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {

        Popup pop = new Popup("The Official Store !!");

        // do not forget a store is a Content and a content is an
        // extension of Widget.
        pop.setContent(new StoreForm());
        pop.center();

      }
    });
    mainPanel.add(this.openInPopupBt);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.