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

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



        final ExtElement e = new ExtElement(hp.getElement());
        e.setOpacity(0.1f, false);

        FocusPanel actionPanel = new FocusPanel(hp);

        MouseListenerAdapter mouseListenerAdapter = new MouseListenerAdapter() {

            @Override
            public void onMouseEnter(Widget sender) {
                e.setOpacity(1, false);
            }

            @Override
            public void onMouseLeave(Widget sender) {
                e.setOpacity(0.1f, false);
            }
        };


        actionPanel.addMouseListener(mouseListenerAdapter);

        layout.setWidget(currentLayoutRow, 2, actionPanel);
        layout.getFlexCellFormatter().setHorizontalAlignment(currentLayoutRow, 2, HasHorizontalAlignment.ALIGN_CENTER);
        layout.getFlexCellFormatter().setVerticalAlignment(currentLayoutRow, 2, HasVerticalAlignment.ALIGN_MIDDLE);
    }
View Full Code Here


    projectImg.setPixelSize(64, 64);
   
    projectPanel.add(projectImg);
    projectPanel.add(new Label(projectName));
   
    final FocusPanel testLabel = new FocusPanel();
    testLabel.add(projectPanel);
    testLabel.setStyleName(style.projectIcon());
    testLabel.addMouseOverHandler(new MouseOverHandler(){
      public void onMouseOver(MouseOverEvent event){
        testLabel.setStyleName(style.projectIconActive());
        desc.show();
        desc.setPopupPosition(testLabel.getAbsoluteLeft() +
            testLabel.getOffsetWidth(), testLabel.getAbsoluteTop() - 5);
        desc.setTitle("Applications");
        desc.setText(appNames);
      }
    });
    testLabel.addMouseOutHandler(new MouseOutHandler(){
      public void onMouseOut(MouseOutEvent event){
        testLabel.setStyleName(style.projectIcon());
        desc.hide();
      }
    });
    testLabel.addClickHandler(new ClickHandler() {
          public void onClick(ClickEvent event) {
            testLabel.setStyleName(style.projectIcon());
            eventBus.fireEvent(new PanelTransitionEvent(PanelTransitionEvent.TransitionTypes.DASHBOARD, projectName));
          }
       });
   
    projectIconsFlowPanel.add(testLabel)
View Full Code Here

   
    for(int i = 0; i < applicationsArray.length() - 1; i++) {
     
      final Application app = applicationsMap.get(applicationsArray.get(i));
      final FlowPanel application = new FlowPanel();
      final FocusPanel applicationLabel = new FocusPanel();
     
      final Label appName = new Label(app.getName());
      final Label httpLabel = new Label("HTTP");
      final Label httpsLabel = new Label("HTTPS");
      final Label settingsLabel = new Label("Settings");
     
      Image appIcon = new Image();
     
      if(app.getIconURL().split("//").length < 2) {
        appIcon = new Image(JSVarHandler.getCommunityBaseURL() + app.getIconURL());
      } else {
        appIcon = new Image(app.getIconURL());
      }
     
      appIcon.setSize("64px", "64px");
     
      application.add(appIcon);
      application.add(appName);
      application.add(httpLabel);
      application.add(httpsLabel);
      application.add(settingsLabel);
      application.setStyleName(manager.appIcon());
     
      applicationLabel.add(application);

      applicationLabel.addMouseOverHandler(new MouseOverHandler() {
        public void onMouseOver(MouseOverEvent event){
          if(project.isActive()) {
            applicationLabel.setStyleName(manager.appIconActive());
            appName.addStyleName(manager.text());
            httpLabel.addStyleName(manager.link());
            httpsLabel.addStyleName(manager.link());
            settingsLabel.addStyleName(manager.link());
          }
        }
      });
      applicationLabel.addMouseOutHandler(new MouseOutHandler() {
        public void onMouseOut(MouseOutEvent event){
          applicationLabel.setStyleName(manager.appIcon());
          appName.removeStyleName(manager.text());
          httpLabel.removeStyleName(manager.link());
          httpsLabel.removeStyleName(manager.link());
          settingsLabel.removeStyleName(manager.link());
        }
View Full Code Here

            hp.setHorizontalAlignment( HorizontalPanel.ALIGN_CENTER );
            hp.setWidth( "100%" );

            //Add row icon
            if ( !isReadOnly ) {
                FocusPanel fp = new FocusPanel();
                fp.setHeight( "100%" );
                fp.setWidth( "50%" );
                fp.add( new Image( resources.selectorAddIcon() ) );
                if ( !isReadOnly ) {
                    fp.addClickHandler( new ClickHandler() {

                        public void onClick(ClickEvent event) {
                            //Raise an event to add row
                            int index = rowMapper.mapToAbsoluteRow( widgets.indexOf( hp ) );
                            InsertRowEvent ire = new InsertRowEvent( index );
                            eventBus.fireEvent( ire );
                        }

                    } );
                }
                hp.add( fp );
            } else {
                SimplePanel sp = new SimplePanel();
                sp.setHeight( "100%" );
                sp.setWidth( "50%" );
                sp.add( new Image( resources.selectorAddIcon() ) );
                hp.add( sp );
            }

            //Delete row icon
            if ( !isReadOnly ) {
                FocusPanel fp = new FocusPanel();
                fp.setHeight( "100%" );
                fp.setWidth( "50%" );
                fp.add( new Image( resources.selectorDeleteIcon() ) );
                fp.addClickHandler( new ClickHandler() {

                    public void onClick(ClickEvent event) {
                        //Raise an event to delete row
                        int index = rowMapper.mapToAbsoluteRow( widgets.indexOf( hp ) );
                        DeleteRowEvent ire = new DeleteRowEvent( index );
View Full Code Here

        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

        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

        DOM.setStyleAttribute(getElement(), "border", "0px"); // TODO move to
                                                              // CSS class or
                                                              // CSS file

        this.windowTitle = title;
        this.rootPanel = new FocusPanel();
        setWidget(this.rootPanel);

        this.manager = windowManager;

        rootPanel.addStyleName(CSS_WINDOW);
View Full Code Here

    }

    private Widget initCell(int row, int col, ResizeDirection direction,
            String additionalCSSClass) {

        FocusPanel borderWidget = new FocusPanel();

        /*
         * Sets the size for the elements that are not resized (e.g. corners and
         * corner extensions). The corner extensions have the same size as the
         * corners.
         */
        borderWidget.setPixelSize(BORDER_THICKNESS, BORDER_THICKNESS);

        grid.setWidget(row, col, borderWidget);

        manager.getResizeDragController()
                .makeDraggable(borderWidget, direction);
View Full Code Here

    context.dragController.dragEnd();
  }

  private void initCapturingWidget() {
    capturingWidget = new FocusPanel();
    capturingWidget.setPixelSize(Window.getClientWidth(), Window.getClientHeight());
    capturingWidget.addMouseMoveHandler(this);
    capturingWidget.addMouseUpHandler(this);
    Style style = capturingWidget.getElement().getStyle();
    style.setProperty("filter", "alpha(opacity=0)");
View Full Code Here

    });
    origDialog.center();
  }
  public static void showAddTextAttributeDialog(String heading, final TextBoxBase addTextTa, final IDialogCallback eventRegister) {
    final DialogBox origDialog = new DialogBox();
    FocusPanel fp = new FocusPanel();
    origDialog.add(fp);
    fp.addKeyPressHandler(new KeyPressHandler() {
      @Override
      public void onKeyPress(KeyPressEvent event) {
        if(event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ESCAPE)
          origDialog.hide();
      }
    });
    final VerticalPanel dialog = new VerticalPanel();
    fp.add(dialog);
    origDialog.setText(heading);
    dialog.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
    dialog.setWidth("100%");
    DOM.setStyleAttribute(origDialog.getElement(), "zIndex", Integer.MAX_VALUE + "");
    new Timer(){
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.