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

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


  /**
   * @deprecated
   */
  @Deprecated
  private FocusPanel makeHeader() {
    FocusPanel header;
    header = new FocusPanel();
    HorizontalPanel masterPanel = new HorizontalPanel();
    masterPanel.setWidth("100%");
    header.add(masterPanel);

    final Label titleLabel = new Label("gwt-log", false);
    titleLabel.setStylePrimaryName(LogClientBundle.INSTANCE.css().logTitle());

    HorizontalPanel buttonPanel = new HorizontalPanel();
View Full Code Here


  /**
   * A new dummy object is created each time its added to panel.
   * @return the dummy thumbnail to be added to the DOM.
   */
  private void addDummy() {
    dummy = new FocusPanel();
    dummy.setSize("126px", "142px");
    dummy.getElement().getStyle().setDisplay(Display.INLINE_BLOCK);
    dummy.addStyleName("FileIcon"); // TODO
    dummy.addStyleName("dummy");
    contentPanel.add(dummy);
View Full Code Here

    }

    protected void init() {
        this.baseStyleName = "gwittir-SoftButton";
        this.clickers = new ClickListenerCollection();
        this.softBase = new FocusPanel();
        this.grid = new Grid(1, 1);
        DOM.setStyleAttribute(this.softBase.getElement(), "display", "inline");
        this.setContent(new Label());
        this.softBase.setWidget(grid);
View Full Code Here

        // Scale to the size of the browser window's client area.
        double scaleFactor = photo.getScaleFactor(Window.getClientWidth(),
                Window.getClientHeight());
        final int width = (int) (photo.getWidth() * scaleFactor);
        Image image = new Image(photo.getURL(width));
        FocusPanel focusPanel = new FocusPanel(image);
        focusPanel.addKeyDownHandler(new KeyDownHandler() {
            public void onKeyDown(KeyDownEvent event) {
                switch (event.getNativeKeyCode()) {
                case KeyCodes.KEY_RIGHT:
                    showNearbyPhoto(true);
                    break;
                case KeyCodes.KEY_LEFT:
                    showNearbyPhoto(false);
                    break;
                case KeyCodes.KEY_ESCAPE:
                    hidePhoto();
                    break;
                }
            }
        });
        imagePopup.setWidget(focusPanel);
        image.setPixelSize(width, (int) (photo.getHeight() * scaleFactor));
        final Element imageElement = image.getElement();
        focusPanel.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                showNearbyPhoto(event.getRelativeX(imageElement) >= width / 2);
            }
        });

        imagePopup.setGlassEnabled(true);
        imagePopup.center();
        focusPanel.setFocus(true);
    }
View Full Code Here

    Connector connector3 = new Connector(450, 120, 500, 80, new SectionDecoration(DecorationType.ARROW_SOLID), new SectionDecoration(DecorationType.ARROW_SOLID));
    connector3.style = ConnectorStyle.DOTTED;
    connector3.showOnDiagram(diagram);

    FocusPanel diamond = new FocusPanel();
    Image img = AbstractImagePrototype.create(ConnectorsBundle.INSTANCE.diamondImg()).createImage();
    img.getElement().getStyle().setDisplay(Display.BLOCK);
    diamond.setWidget(img);
    boundaryPanel.add(diamond, 700, 400);

    // Add some elements that can be connected
    final Label label = new Label("LABEL");
    final Label label2 = new Label("LABEL_2");
View Full Code Here

      super();

      Label label = new Label(text);
      label.setStyleName("");

      FocusPanel focusPanel = new FocusPanel();
      focusPanel.add(label);
      focusPanel.setTabIndex(tabStopIndex);
      initWidget(focusPanel);

      setStyleName(join(UI_WIDGET, UI_STATE_DEFAULT, UI_CORNER_TOP));
      setSelected(false);
      sinkEvents(Event.ONMOUSEOVER | Event.ONMOUSEOUT | Event.KEYEVENTS);
View Full Code Here

      popup = new OptionsPopup(2000);
      popup.setOptions(new Option[] {
        new Option("Option 1"), new Option("Option 2"), new Option("Option 3"), new Option("Option 4"),
        new Option("Option 5") });

      contextArea = new FocusPanel();
      contextArea.setSize("200px", "200px");
      contextArea.getElement().getStyle().setProperty("margin", "1em");
      contextArea.getElement().getStyle().setProperty("border", "1px solid gray");

      // IMPT: this enables the popup to be positioned at the mouse click
View Full Code Here

      popup = new OptionsPopup();
      popup.setOptions(new Option[] {
        new Option("Option 1"), new Option("Option 2"), new Option("Option 3"), new Option("Option 4"),
        new Option("Option 5") });

      contextArea = new FocusPanel();
      contextArea.setSize("200px", "200px");
      contextArea.getElement().getStyle().setProperty("margin", "1em");
      contextArea.getElement().getStyle().setProperty("border", "1px solid gray");

      // IMPT: this enables the popup to be positioned at the mouse click
View Full Code Here

      popup = new OptionsPopup(2000);
      popup.setOptions(new Option[] {
        new Option("Option 1"), new Option("Option 2"), new Option("Option 3"), new Option("Option 4"),
        new Option("Option 5") });

      contextArea = new FocusPanel();
      contextArea.setSize("200px", "200px");
      contextArea.getElement().getStyle().setProperty("margin", "1em");
      contextArea.getElement().getStyle().setProperty("border", "1px solid gray");

      // IMPT: this enables the popup to be positioned at the mouse click
View Full Code Here

      popup = new OptionsPopup();
      popup.setOptions(new Option[] {
        new Option("Option 1"), new Option("Option 2"), new Option("Option 3"), new Option("Option 4"),
        new Option("Option 5") });

      contextArea = new FocusPanel();
      contextArea.setSize("200px", "200px");
      contextArea.getElement().getStyle().setProperty("margin", "1em");
      contextArea.getElement().getStyle().setProperty("border", "1px solid gray");

      // IMPT: this enables the popup to be positioned at the mouse click
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.