Java 类com.google.gwt.dom.client.Style.Display 实例源码

项目:EasyML    文件:DescribeGrid.java   
public DescribeGrid(String[][] labarr, String type) {
    categoryPanel = new CategoryPanel(type);
    categoryPanel.hide();
    mask.addStyleName("alertBack");
    mask.getElement().getStyle().setDisplay(Display.NONE);
    this.add(mask);

    this.setStyleName("bda-descgrid");
    this.labarr = labarr;
    this.type = type;
    this.add(leftPanel);
    this.add(rightPanel);
    leftPanel.setStyleName("bda-descgrid-left");
    rightPanel.setStyleName("bda-descgrid-right");
    init();
}
项目:vaadin-combobox-multiselect    文件:VComboBoxMultiselect.java   
/**
 * Should paging be enabled. If paging is enabled then only a certain
 * amount of items are visible at a time and a scrollbar or buttons are
 * visible to change page. If paging is turned of then all options are
 * rendered into the popup menu.
 *
 * @param paging
 *            Should the paging be turned on?
 */
public void setPagingEnabled(boolean paging) {
    debug("VComboBoxMultiselect.SP: setPagingEnabled(" + paging + ")");
    if (this.isPagingEnabled == paging) {
        return;
    }
    if (paging) {
        this.down.getStyle()
            .clearDisplay();
        this.up.getStyle()
            .clearDisplay();
        this.status.getStyle()
            .clearDisplay();
    } else {
        this.down.getStyle()
            .setDisplay(Display.NONE);
        this.up.getStyle()
            .setDisplay(Display.NONE);
        this.status.getStyle()
            .setDisplay(Display.NONE);
    }
    this.isPagingEnabled = paging;
}
项目:MIBO-IDE    文件:MainController.java   
public void showEditorView(Definition definition) {

        // Destruct the explorer components (e.g. the toolbar's event handler)
        this.explorerController.destruct();

        // Store a new editor controller reference
        this.editorController = new EditorController(this, this.explorerController, this.toolbar_webcomponent);

        // Initialize the controller's view
        this.editorController.initalizeView();

        // Initialize required library elements
        List<AbstractScopeItem> scopeItems = this.factory.getAvailableScopeItems();
        List<EventItemGroup> eventItemGroups = this.factory.getAvailableEventItemGroups();
        List<AbstractControlItem> controls = this.factory.getAvailableControlItems();
        this.editorController.initializeContent(definition, scopeItems, eventItemGroups, controls);

        // Update the toolbar to the editor view
        this.toolbar_webcomponent.setupEditorView();

        // Show editor container in host page
        DOM.getElementById("editor-container").getStyle().setDisplay(Display.BLOCK);

        // Remove loading overlayer
        LayerManager.getInstance().hideLoadingOverlayer();
    }
项目:MIBO-IDE    文件:MainController.java   
public void showExplorerView() {

        // Destruct the editor components (e.g. the toolbar's event handler)
        this.editorController.destruct();

        // Reset reference
        this.editorController = null;

        // Setup the explorer view
        this.explorerController.initializeView();

        // Update the toolbar to the explorer view
        this.toolbar_webcomponent.setupExplorerView();

        // Show explorer container in host page
        DOM.getElementById("explorer-container").getStyle().setDisplay(Display.BLOCK);

        // Remove loading overlayer
        LayerManager.getInstance().hideLoadingOverlayer();
    }
项目:MIBO-IDE    文件:EditorController.java   
/**
 * Setup the controller's view
 * <p>
 * This includes the initialization of the WebComponent, the setup the
 * WebComponent (Register EventHandler, ...), and the attachment to the
 * WebComponent to parent element
 * </p>
 */
public void initalizeView() {

    // Create a new actions controller
    ActionsController actions_controller = new ActionsController(this);

    // Create a new console area and attach event handlers
    this.console_webcomponent = new WCConsoleArea("Console");
    this.console_webcomponent.addWebComponentEventHandler(this);

    // Setup the toolbar
    this.toolbar_webcomponent.setHeading("MIBO Editor");
    this.toolbar_webcomponent.addWebComponentEventHandler(this);

    // Attach the console to the host page and hide it by default
    DOM.getElementById("console-container").appendChild(this.console_webcomponent.getElement());
    DOM.getElementById("console-container").getStyle().setDisplay(Display.NONE);

    // Attach the actions view to the host page
    DOM.getElementById("actions-container").appendChild(actions_controller.getView());
}
项目:MIBO-IDE    文件:EditorController.java   
public void destruct() {

        // Show loading overlayer
        LayerManager.getInstance().showLoadingOverlayer();

        // De-register the event handler for toolbar events
        this.toolbar_webcomponent.removeWebComponentEventHandler(this);

        // Hide the editor-specific container elements
        DOM.getElementById("editor-container").getStyle().setDisplay(Display.NONE);

        // Remove all WebComponent elements that have been created so far
        DOM.getElementById("console-container").removeAllChildren();
        DOM.getElementById("sections-container-top").removeAllChildren();
        DOM.getElementById("sections-container-bottom").removeAllChildren();
        DOM.getElementById("actions-container").removeAllChildren();

    }
项目:Wiab.pro    文件:SuggestionButton.java   
public SuggestionButton(final ContentElement element) {
  Widget clickButton =
      ButtonFactory.createIconClickButton(IconButtonStyle.LIGHTBULB, TOOLTIP,
      new ClickButtonListener() {
        @Override
        public void onClick() {
          HasSuggestions suggestion =
              element.getProperty(SuggestionRenderer.HAS_SUGGESTIONS_PROP);
          element.getSuggestionsManager().showSuggestionsFor(suggestion);
        }
      });
  clickButton.getElement().getStyle().setDisplay(Display.INLINE_BLOCK);
  // Logically attach it to the root panel to listen to events, but then
  // manually move the dom to the desired location.
  RootPanel.get().add(clickButton);
  this.element = clickButton.getElement();
  NodeManager.setTransparency(this.element, Skip.DEEP);
  DomHelper.makeUnselectable(this.element);
  this.element.setAttribute("contentEditable", "false");
}
项目:Wiab.pro    文件:CollapsibleDomImpl.java   
public void setCollapsed(boolean collapsed) {
  if (collapsed) {
    self.setAttribute(COLLAPSED_ATTRIBUTE, COLLAPSED_VALUE);

    // Webkit's incremental layout is incorrect, so we have to kick it a bit.
    if (UserAgent.isWebkit()) {
      self.getStyle().setDisplay(Display.INLINE_BLOCK);
      // Force layout.
      self.getOffsetParent();
      // Revert to CSS display property (layed out correctly now).
      self.getStyle().clearDisplay();
    }
  } else {
    self.removeAttribute("c");
  }
  updatedCssClassNames();
}
项目:ontobrowser    文件:SearchOptionsView.java   
private Panel createPanel() {
    Label label = new Label("Search Options");
    label.addStyleName("search-header");
    label.getElement().getStyle().setDisplay(Display.BLOCK);

    Grid grid = new Grid(2,2);
    grid.setText(0, 0, "Ontology/Codelist:");
    grid.setWidget(0, 1, ontologiesDropBox);
    grid.setText(1, 0, "Include Synonyms:");
    grid.setWidget(1, 1, includeSynonyms);
    grid.addStyleName("search-options");

    CellFormatter cellFormatter = grid.getCellFormatter();
    for(int i = 0; i < grid.getRowCount(); i++) {
        cellFormatter.addStyleName(i, 0, "search-option");
    }

    Panel panel = new FlowPanel();
    panel.add(label);
    panel.add(grid);
    return panel;
}
项目:vaadin-combobox-multiselect    文件:VComboBoxMultiselect.java   
/**
 * Should paging be enabled. If paging is enabled then only a certain
 * amount of items are visible at a time and a scrollbar or buttons are
 * visible to change page. If paging is turned of then all options are
 * rendered into the popup menu.
 *
 * @param paging
 *            Should the paging be turned on?
 */
public void setPagingEnabled(boolean paging) {
    debug("VComboBoxMultiselect.SP: setPagingEnabled(" + paging + ")");
    if (this.isPagingEnabled == paging) {
        return;
    }
    if (paging) {
        this.down.getStyle()
            .clearDisplay();
        this.up.getStyle()
            .clearDisplay();
        this.status.getStyle()
            .clearDisplay();
    } else {
        this.down.getStyle()
            .setDisplay(Display.NONE);
        this.up.getStyle()
            .setDisplay(Display.NONE);
        this.status.getStyle()
            .setDisplay(Display.NONE);
    }
    this.isPagingEnabled = paging;
}
项目:vaadin-sliderpanel    文件:VSliderPanel.java   
@Override
protected void onStart() {
    VSliderPanel.this.contentNode.getStyle()
                                 .setDisplay(Display.BLOCK);
    if (VSliderPanel.this.componentSize == null || VSliderPanel.this.componentSize <= 0) {
        if (VSliderPanel.this.mode.isVertical()) {
            VSliderPanel.this.contentNode.getStyle()
                                         .clearWidth();
            if (VSliderPanel.this.contentNode.getFirstChildElement() != null) {
                VSliderPanel.this.componentSize = VSliderPanel.this.contentNode.getFirstChildElement()
                                                                               .getOffsetWidth();
            }
        }
        else {
            VSliderPanel.this.contentNode.getStyle()
                                         .clearHeight();
            if (VSliderPanel.this.contentNode.getFirstChildElement() != null) {
                VSliderPanel.this.componentSize = VSliderPanel.this.contentNode.getFirstChildElement()
                                                                               .getOffsetHeight();
            }
        }
    }
}
项目:gerrit    文件:ValueEditor.java   
@Override
public void showErrors(List<EditorError> errors) {
  StringBuilder buf = new StringBuilder();
  for (EditorError error : errors) {
    if (error.getEditor().equals(editProxy)) {
      buf.append("\n");
      if (error.getUserData() instanceof ParseException) {
        buf.append(((ParseException) error.getUserData()).getMessage());
      } else {
        buf.append(error.getMessage());
      }
    }
  }

  if (0 < buf.length()) {
    errorLabel.setInnerText(buf.substring(1));
    errorLabel.getStyle().setDisplay(Display.BLOCK);
  } else {
    errorLabel.setInnerText("");
    errorLabel.getStyle().setDisplay(Display.NONE);
  }
}
项目:gerrit    文件:ChangeScreen.java   
private void renderUploader(ChangeInfo changeInfo, RevisionInfo revInfo) {
  AccountInfo uploader = revInfo.uploader();
  boolean isOwner = uploader == null || uploader._accountId() == changeInfo.owner()._accountId();
  renderPushCertificate(revInfo, isOwner ? ownerPanel : uploaderPanel);
  if (isOwner) {
    uploaderRow.getStyle().setDisplay(Display.NONE);
    return;
  }
  uploaderRow.getStyle().setDisplay(Display.TABLE_ROW);

  if (uploader.avatar(AvatarInfo.DEFAULT_SIZE) != null) {
    uploaderPanel.insert(new AvatarImage(uploader), 0);
  }
  String name = name(uploader);
  uploaderName.setText(name);
  uploaderName.setTitle(email(uploader, name));
}
项目:google-apis-explorer    文件:SchemaForm.java   
@Override
public Widget render(Schema property) {
  HTMLPanel panel = new HTMLPanel("");
  panel.getElement().getStyle().setDisplay(Display.INLINE);

  panel.add(new InlineLabel("\""));
  if (property.locked()) {
    InlineLabel label = new InlineLabel();
    panel.add(label);
    hasText = label;
  } else {
    TextArea editor = new TextArea();
    panel.add(editor);
    hasText = editor;
  }
  panel.add(new InlineLabel("\""));

  if (property.getDefault() != null) {
    hasText.setText(property.getDefault());
  }

  return panel;
}
项目:platypus-js    文件:DateTimeBox.java   
private void changeViewPresentation() {
    if (dateShown && timeShown) {
        right.getElement().getStyle().setDisplay(Style.Display.INLINE_BLOCK);
        datePicker.setDateAndTimeView();
        right.getElement().removeClassName("time-select");
        right.getElement().addClassName("date-select");
        redecorate();
    } else if (dateShown) {
        right.getElement().getStyle().setDisplay(Style.Display.INLINE_BLOCK);
        datePicker.setDateView();
        right.getElement().removeClassName("time-select");
        right.getElement().addClassName("date-select");
        redecorate();
    } else if (timeShown) {
        right.getElement().getStyle().setDisplay(Style.Display.INLINE_BLOCK);
        datePicker.setTimeView();
        right.getElement().removeClassName("date-select");
        right.getElement().addClassName("time-select");
        redecorate();
    } else {
        right.getElement().getStyle().setDisplay(Display.NONE);
        redecorate();
    }

}
项目:gwt-ol3    文件:DemoUtils.java   
/**
 * Create a MapBox logo.
 *
 * @return MapBox logo
 */
public static Control createMapboxLogo() {

    ControlOptions controlOptions = new ControlOptions();

    LinkElement mapboxLogo = Document.get().createLinkElement();
    mapboxLogo.setHref("https://mapbox.com/about/maps");
    mapboxLogo.setTarget("_blank");

    mapboxLogo.getStyle().setPosition(Position.ABSOLUTE);
    mapboxLogo.getStyle().setLeft(2, Unit.PX);
    mapboxLogo.getStyle().setBottom(5, Unit.PX);
    mapboxLogo.getStyle().setWidth(126, Unit.PX);
    mapboxLogo.getStyle().setHeight(40, Unit.PX);
    mapboxLogo.getStyle().setDisplay(Display.BLOCK);
    mapboxLogo.getStyle().setOverflow(Overflow.HIDDEN);

    mapboxLogo.getStyle().setBackgroundImage("url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIIAAAAoCAMAAAAFWtJHAAAAwFBMVEUAAAAAAAAAAABtbW0AAAAAAAAAAAAAAAAAAAAAAAClpaUAAADp6ekAAAD5+fna2toAAAAMDAzv7+/Nzc0AAAA2Njb8/Pz9/f3T09MAAAAAAAD7+/sAAAArKyuxsbH39/fs7OwbGxuIiIjz8/N8fHyenp7u7u74+PgAAAC8vLxWVlbx8fF1dXXl5eVcXFyUlJTQ0NDFxcVCQkLAwMC4uLj19fXo6OjW1tarq6ve3t77+/vi4uL6+vrKysrNzc3///8w7gSSAAAAP3RSTlMAOQNdPSYBPywKexLLGPCxNEHXnzFL+v2nGwf1IEiE6dBFad9jd9PuLo1V2mDDV3Cjl06SiuXIq4C3973ym6BQMVUPAAAEXElEQVR4Ae2WCVP6OBiH05L0l1IqrVbkKHJ54I0oHn+PfP9vtUle0z/YdhbH2XVnd58ZnRJIeHiPJOx//mH4vQSAN+8FjAhFxgHIaPvJeZ99hxwEElon5iAQbj85Y98g8ODwjEOMAvGFyeE3FEKgodTBqj0BJGN9DhyNd5Ta3ean9QEopfaA+LsKhnEKRExqg4FSP6Og7oEkAjBWnxSCgBX4xF+kcLoPcOBQrSv0e5kH7s1j37jECQieCTPiFGxL5VHw2zQWCeeJiPt6kjRQw0XSkIdVChf67xGa4alSnZlT6HEQ8CK9ANbhvXUF9xlDkBfTuHDWScgC9+z5FQpPI12TlwC6+sV7ixR8CUMKiwjm2GQeOQWHMGuHGdbnObJAwCEqFJpNU5H6uaPUaEIKiQfg+PHk1+u4OwW9PlWW2ctbA4BHCtp+cNK+H8Jos4gDmC5ar4Nx9waaG/2B13NgDqS7+vm2RgEtEws82P+kwIHhs/pgkQKcFIhfd7CogtGNjYMHTLpurD0ERbYFw4JaD3GlQuNAL/JEsSAF4HqlCnaHACk4WhOn4OgCkMD5hSpYNYDJTD8Y46n+jsE1kPhVCuR6QBXhFK7MUOu9O6b1SWF3b+/9ZVWMGOlu93E8UDaAhgc7bfH+0DHqKXCkHzoNDFfU+zxiVQrUC9QXTuHYtKpN59OA3IxCG4b7jh6ZFuVockaNTW09mkJzOaPU49a6mE9cAchZpQJNpUWcwgV9r6FJswsFKrITp2B5pMBMdnS0z2HZNy2+BNKxSZxZfglkrFYBJxQnpzA5sN/HheR2aFQoZBLAi149dQoyAYYjW0hHlHguBAdMcR0DuDZ5omevX6+AI8qcU7ikKT3GBHCnXwydgmCC0tRwCnGQ2Wp6Be71yNIWfQSkOl9vAI1SBCNWrwC01RROgX7BuT2HI4r7tFAw086p/NwZEdOEa7R1uAFuNmQPuKAEAjYNQ0CyeoUEWHYBnpQVQgpvc0Ph+gsKlAnKg1+vEHsw5LKciLKCAJobiWBzYFGbCKpHqkZZrxBFHEASyFI59vJPCskcwNVGOWZAOqsrR+pKbaNeAMT1CixMEtlnsqopNxUMzVJT3tY35aXZm6a6Y9QhwMN6BUJWbE1lhbMO1WehkO7poO0sK7em9MJGxp1XSbC1gtugzzSLQmGsX7VntJGSwsPZ2d2z3bIPKzdoOp3Wzqt8G4XyMVUoFIxLx1S7+piaHtCvR3FeRVsq0GFdp9C5TbGpcNqsPqyHKxcfd14h21KhuLKUFU4f3osrC7F6uV3WXFnadL7wyAPeKDXw2RoJCO5GY4DouYvb/gepVXheLoewzPseQG9N/vzilrMIjoStE3++zvle4eSurw7XEe76ynI4aq+v7lEyt1x5awiFlFLQbHKIpabnM3eJLym4Szzzc/du7SU+zOXv9UNpECH7IoH/gecURPlN9vdQpeD47yhIFNX0U0QgvID9nENm+yxk/xb+AGAjNfRZuk9qAAAAAElFTkSuQmCC)");

    controlOptions.setElement(mapboxLogo);

    return new Control(controlOptions);
}
项目:sigmah    文件:ClientUtils.java   
/**
 * Sets the given {@code isWidget} display style property.
 * 
 * @param isWidget
 *          The widget.
 * @param display
 *          The display style property. Is the given value is {@code null}, the {@code display} style property is
 *          cleared.
 */
public static <W extends IsWidget> void setDisplay(W isWidget, Display display) {
    if (isWidget == null) {
        return;
    }

    final Widget widget = isWidget.asWidget();
    if (widget == null) {
        return;
    }

    if (display == null) {
        widget.getElement().getStyle().clearDisplay();
    } else {
        widget.getElement().getStyle().setDisplay(display);
    }
}
项目:quake2-gwt-port    文件:GwtWebGLRenderer.java   
public void setPicDataLowLevel(Image image, ImageElement img) {
        CanvasElement canvas = (CanvasElement) Document.get().createElement("canvas");
        int w = img.getWidth();
        int h = img.getHeight();
        canvas.setWidth(w);
        canvas.setHeight(h);
//      canvas.getStyle().setProperty("border", "solid 1px green");
        canvas.getStyle().setDisplay(Display.NONE);
        Document.get().getBody().appendChild(canvas);
        CanvasRenderingContext2D ctx = canvas.getContext2D();
        ctx.drawImage(img, 0, 0);
        ImageData data = ctx.getImageData(0, 0, w, h);
        CanvasPixelArray pixels = data.getData();

        int count = w * h * 4;
        byte[] pic = new byte[count];
        for (int i = 0; i < count; i += 4) {
            pic[i + 3] = (byte) pixels.get(i + 3); // alpha, then bgr
            pic[i + 2] = (byte) pixels.get(i + 2);
            pic[i + 1] = (byte) pixels.get(i + 1);
            pic[i] = (byte) pixels.get(i);
        }

        image.setData(pic, w, h, 32);
    }
项目:avro-ui    文件:BusyPopup.java   
public void onResize(ResizeEvent event) {
  Style style = glass.getStyle();

  int winWidth = Window.getClientWidth();
  int winHeight = Window.getClientHeight();

  style.setDisplay(Display.NONE);
  style.setWidth(0, Unit.PX);
  style.setHeight(0, Unit.PX);

  int width = Document.get().getScrollWidth();
  int height = Document.get().getScrollHeight();

  style.setWidth(Math.max(width, winWidth), Unit.PX);
  style.setHeight(Math.max(height, winHeight), Unit.PX);

  style.setDisplay(Display.BLOCK);
}
项目:avro-ui    文件:FieldWidgetPanel.java   
/**
 * Open or close the content.
 * 
 * @param panel the panel to open or close
 * @param animate true to animate, false to open instantly
 */
public void setOpen(FieldWidgetPanel panel, boolean animate) {
  // Immediately complete previous open
  cancel();

  // Open the new item
  if (animate) {
    curPanel = panel;
    opening = panel.isOpen;
    run(OPEN_ANIMATION_DURATION);
  } else {
    panel.updateStyles();
    panel.contentPanel.setVisible(panel.isOpen);
    panel.contentPanel.getElement().getStyle().setDisplay(Display.INLINE_BLOCK);
    if (panel.isOpen) {
        panel.contentPanel.getElement().getStyle().clearProperty("overflow");
        if (panel.getContent() != null) {
            panel.getContent().setVisible(true);
        }
    } else {
        panel.contentPanel.getElement().getStyle().setProperty("overflow", "hidden");
    }
  }
}
项目:hexa.tools    文件:Pager.java   
public void update()
{
    position.setInnerHTML( "&nbsp;<b>" + start + " - " + end + "</b> of <b>" + nb + "</b>&nbsp;" );

    if( fFirst )
        first.getStyle().clearDisplay();
    else
        first.getStyle().setDisplay( Display.NONE );

    if( fPrev )
        prev.getStyle().clearDisplay();
    else
        prev.getStyle().setDisplay( Display.NONE );

    if( fNext )
        next.getStyle().clearDisplay();
    else
        next.getStyle().setDisplay( Display.NONE );

    if( fLast )
        last.getStyle().clearDisplay();
    else
        last.getStyle().setDisplay( Display.NONE );
}
项目:putnami-web-toolkit    文件:InputDatePicker.java   
private void redrawMonthPicker() {
    this.monthPicker.getStyle().setWidth(this.calendarTable.getClientWidth(), Unit.PX);
    this.calendarTable.getStyle().setDisplay(Display.NONE);
    this.monthPicker.getStyle().clearDisplay();

    int currentYear = this.cursor.getYear() + InputDatePicker.YEAR_OFFSET;
    if (this.monthPickerInner.getChildCount() == 0) {
        for (int year = currentYear - 100; year < currentYear + 100; year++) {
            DivElement yearDiv = Document.get().createDivElement();
            yearDiv.setInnerText(String.valueOf(year));
            StyleUtils.addStyle(yearDiv, InputDatePicker.STYLE_YEAR_BUTTON);
            Event.sinkEvents(yearDiv, Event.ONCLICK);
            this.monthPickerInner.appendChild(yearDiv);
            yearDiv.setAttribute(InputDatePicker.ATTRIBUTE_DATA_YEAR, String.valueOf(year));
        }
    }
    this.openMonthOfYear(this.cursor.getYear() + InputDatePicker.YEAR_OFFSET);
}
项目:putnami-web-toolkit    文件:Modal.java   
public void show() {
    this.ensureDismissButton();
    this.redraw();
    this.visible = true;

    Widget modal = getContainerWidget();

    if (modal.isAttached()) {
        modal.removeFromParent();
    }

    Modal.MODAL_BACKDROP.show();
    this.getElement().getStyle().setDisplay(Display.BLOCK);
    RootPanel rootPanel = RootPanel.get();
    rootPanel.add(modal);
    StyleUtils.addStyle(rootPanel, Modal.STYLE_MODAL_OPEN);

    Scheduler.get().scheduleFixedDelay(new RepeatingCommand() {
        @Override
        public boolean execute() {
            StyleUtils.addStyle(Modal.this, Modal.STYLE_VISIBLE);
            return false;
        }
    }, 150);
}
项目:gantt    文件:GanttWidget.java   
private void updateMoveElementFor(Element target) {
    if (target == null) {
        moveElement.getStyle().setDisplay(Display.NONE);
    }
    moveElement.getStyle().clearDisplay();

    String styleLeft = target.getStyle().getLeft();
    // user capturePointLeftPx as default
    double left = capturePointLeftPx;
    if (styleLeft != null && styleLeft.length() > 2 && styleLeft.endsWith("px")) {
        // if target's 'left' is pixel value like '123px', use that.
        // When target is already moved, then it's using pixel values. If
        // it's not moved yet, it may use percentage value.
        left = parseSize(styleLeft, "px");
    }
    if (isSubBar(target)) {
        left += target.getParentElement().getOffsetLeft();
    }
    moveElement.getStyle().setProperty("left", left + "px");
    moveElement.getStyle().setProperty("width", target.getClientWidth() + "px");
}
项目:geomajas-project-client-gwt2    文件:MessageBox.java   
public void setMessageStyleType(MessageStyleType messageStyleType) {
    if (messageStyleType == null) {
        icon.getElement().getStyle().setDisplay(Display.NONE);
    } else {
        icon.getElement().getStyle().setDisplay(Display.BLOCK);
        icon.setStyleName(resource.css().messageBoxIcon());
        switch (messageStyleType) {
            case HELP:
                icon.addStyleName(resource.css().messageBoxIconHelp());
                break;
            case WARN:
                icon.addStyleName(resource.css().messageBoxIconWarn());
                break;
            case ERROR:
                icon.addStyleName(resource.css().messageBoxIconError());
                break;
            default:
                icon.addStyleName(resource.css().messageBoxIconInfo());
        }
    }
}
项目:incubator-wave    文件:SuggestionButton.java   
public SuggestionButton(final ContentElement element) {
  Widget clickButton =
      ButtonFactory.createIconClickButton(IconButtonStyle.LIGHTBULB, TOOLTIP,
      new ClickButtonListener() {
        @Override
        public void onClick() {
          HasSuggestions suggestion =
              element.getProperty(SuggestionRenderer.HAS_SUGGESTIONS_PROP);
          element.getSuggestionsManager().showSuggestionsFor(suggestion);
        }
      });
  clickButton.getElement().getStyle().setDisplay(Display.INLINE_BLOCK);
  // Logically attach it to the root panel to listen to events, but then
  // manually move the dom to the desired location.
  RootPanel.get().add(clickButton);
  this.element = clickButton.getElement();
  NodeManager.setTransparency(this.element, Skip.DEEP);
  DomHelper.makeUnselectable(this.element);
  this.element.setAttribute("contentEditable", "false");
}
项目:incubator-wave    文件:FullStructure.java   
@Override
public ParticipantView append(
    ParticipantsDomImpl impl, Conversation conv, ParticipantId participant) {
  Element t = getRenderer().render(conv, participant);
  DomViewHelper.attachBefore(impl.getParticipantContainer(), impl.getSimpleMenu(), t);
  // Kick Webkit, because of its incremental layout bugs.
  if (UserAgent.isWebkit()) {

    String oldDisplay = impl.getElement().getStyle().getDisplay();

    // Erase layout. Querying getOffsetParent() forces layout.
    impl.getElement().getStyle().setDisplay(Display.NONE);
    impl.getElement().getOffsetParent();

    // Restore layout.
    impl.getElement().getStyle().setProperty("display", oldDisplay);
  }
  return asParticipant(t);
}
项目:incubator-wave    文件:CollapsibleDomImpl.java   
public void setCollapsed(boolean collapsed) {
  if (collapsed) {
    self.setAttribute(COLLAPSED_ATTRIBUTE, COLLAPSED_VALUE);

    // Webkit's incremental layout is incorrect, so we have to kick it a bit.
    if (UserAgent.isWebkit()) {
      self.getStyle().setDisplay(Display.INLINE_BLOCK);
      // Force layout.
      self.getOffsetParent();
      // Revert to CSS display property (layed out correctly now).
      self.getStyle().clearDisplay();
    }
  } else {
    self.removeAttribute("c");
  }
  updatedCssClassNames();
}
项目:Peergos    文件:MobileWebAppShellMobile.java   
private void onShiftToLandscape() {

    // Landscape.
    layoutPanel.setWidgetTopBottom(titleBar, 0, Unit.PX, 0, Unit.PX);
    layoutPanel.setWidgetLeftWidth(titleBar, 0, Unit.PX, LANDSCAPE_MENU_WIDTH_EX, Unit.EX);
    titleElem.getStyle().setDisplay(Display.NONE);

    layoutPanel.setWidgetTopBottom(contentContainer, 0, Unit.PX, 0, Unit.PX);
    layoutPanel.setWidgetLeftRight(contentContainer, LANDSCAPE_MENU_WIDTH_EX, Unit.EX, 0, Unit.PX);

    layoutPanel.setWidgetTopHeight(addButtonContainer, 5, Unit.PX, 4, Unit.EX);
    layoutPanel
        .setWidgetLeftWidth(addButtonContainer, 0, Unit.PX, LANDSCAPE_MENU_WIDTH_EX, Unit.EX);

    layoutPanel.setWidgetBottomHeight(backButtonContainer, 5, Unit.PX, 4, Unit.EX);
    layoutPanel.setWidgetLeftWidth(backButtonContainer, 0, Unit.PX, LANDSCAPE_MENU_WIDTH_EX,
        Unit.EX);
  }
项目:Peergos    文件:EditorDecorator.java   
public void showErrors(List<EditorError> errors) {
  StringBuilder sb = new StringBuilder();
  for (EditorError error : errors) {
    Editor<?> errorEditor = error.getEditor();
    if (this.equals(errorEditor) || editor.equals(errorEditor)) {
      sb.append("\n").append(error.getMessage());
    }
  }

  if (sb.length() == 0) {
    errorLabel.setInnerText("");
    errorLabel.getStyle().setDisplay(Display.NONE);
    return;
  }

  errorLabel.setInnerText(sb.substring(1));
  errorLabel.getStyle().setDisplay(Display.INLINE_BLOCK);
}
项目:swarm    文件:CodeEditor.java   
CodeEditor(UserManager userMngr, I_CodeMirrorListener listener)
{
    m_userMngr = userMngr;
    m_codeMirror_writable = new CodeMirrorWrapper(listener, false);
    m_codeMirror_readOnly = new CodeMirrorWrapper(null, true);

    this.setStyleName("sm_button_tray_ceiling");

    m_codeMirror_readOnly.getElement().getStyle().setDisplay(Display.NONE);
    m_codeMirror_writable.getElement().getStyle().setDisplay(Display.NONE);
    //m_codeMirror_readOnly.setVisible(false);
    //m_codeMirror_writable.setVisible(false);

    this.add(m_codeMirror_writable);
    this.add(m_codeMirror_readOnly);

    setActiveCodeMirrorInstance(m_codeMirror_readOnly);
}
项目:swarm    文件:Animation.java   
public Animation(double frameRate, String ... imagePaths)
{
    m_frameRate = frameRate;

    m_container = DOM.createDiv();

    m_elements = new Element[imagePaths.length];

    for( int i = 0; i < imagePaths.length; i++ )
    {
        Element frame = U_Image.createNonCachedImage(m_container, imagePaths[i], 1);
        frame.getStyle().setPosition(Position.ABSOLUTE);
        U_Css.setPosition(frame, 0, 0);
        frame.getStyle().setDisplay(Display.NONE);

        m_elements[i] = frame;
    }

    m_currentIndex = 0;
    m_time = 0;

    showFrame(0);
}
项目:swarm    文件:MobileWebAppShellMobile.java   
private void onShiftToLandscape() {

    // Landscape.
    layoutPanel.setWidgetTopBottom(titleBar, 0, Unit.PX, 0, Unit.PX);
    layoutPanel.setWidgetLeftWidth(titleBar, 0, Unit.PX, LANDSCAPE_MENU_WIDTH_EX, Unit.EX);
    titleElem.getStyle().setDisplay(Display.NONE);

    layoutPanel.setWidgetTopBottom(contentContainer, 0, Unit.PX, 0, Unit.PX);
    layoutPanel.setWidgetLeftRight(contentContainer, LANDSCAPE_MENU_WIDTH_EX, Unit.EX, 0, Unit.PX);

    layoutPanel.setWidgetTopHeight(addButtonContainer, 5, Unit.PX, 4, Unit.EX);
    layoutPanel
        .setWidgetLeftWidth(addButtonContainer, 0, Unit.PX, LANDSCAPE_MENU_WIDTH_EX, Unit.EX);

    layoutPanel.setWidgetBottomHeight(backButtonContainer, 5, Unit.PX, 4, Unit.EX);
    layoutPanel.setWidgetLeftWidth(backButtonContainer, 0, Unit.PX, LANDSCAPE_MENU_WIDTH_EX,
        Unit.EX);
  }
项目:swarm    文件:EditorDecorator.java   
public void showErrors(List<EditorError> errors) {
  StringBuilder sb = new StringBuilder();
  for (EditorError error : errors) {
    Editor<?> errorEditor = error.getEditor();
    if (this.equals(errorEditor) || editor.equals(errorEditor)) {
      sb.append("\n").append(error.getMessage());
    }
  }

  if (sb.length() == 0) {
    errorLabel.setInnerText("");
    errorLabel.getStyle().setDisplay(Display.NONE);
    return;
  }

  errorLabel.setInnerText(sb.substring(1));
  errorLabel.getStyle().setDisplay(Display.INLINE_BLOCK);
}
项目:obsolete-web-boards-gwt    文件:SVGDisplay.java   
private void updateSelectionRect() {
    SVGRectElement rect = (SVGRectElement) svg.getElementById("selection");
    if (ctx.selected == null) {
        rect.getStyle().setVisibility(Visibility.HIDDEN);
    } else {
        SVGImageElement c = (SVGImageElement) svg.getElementById(ctx.selected.ref().toString());
        if(c != null) { 
            rect.getStyle().setVisibility(Visibility.VISIBLE);
            rect.getX().getBaseVal().setValue(c.getX().getBaseVal().getValue());
            rect.getY().getBaseVal().setValue(c.getY().getBaseVal().getValue());
            rect.getStyle().setDisplay(Display.BLOCK);
            bringToTop(c);
            c.getParentElement().insertBefore(rect, c);
        }else{
            ClientEngine.log(ctx.selected.ref()+" not found");
        }
    }
}
项目:obsolete-web-boards-gwt    文件:SVGDisplay.java   
@Override
protected void resetCounters() {
    SVGRectElement rect = (SVGRectElement) getSVGElement("selection");
    rect.getStyle().setDisplay(Display.NONE);
    Element unitsLayer = svg.getElementById("units");
    unitsLayer.appendChild(rect);
    for (CounterInfo ci : ctx.board.getPlaced()) {
           String id = ci.ref().toString();
           Element element = svg.getElementById(id);
           if(element!=null){
               element.getStyle().setVisibility(Visibility.HIDDEN);
           }
       }

    stackSelector.getStyle().setVisibility(Visibility.HIDDEN);
    OMSVGRectElement omstackSelector = OMNode.convert(stackSelector);
    omstackSelector.addClickHandler(new ClickHandler() {            
        @Override
        public void onClick(ClickEvent event) {
            handler.onClicked(stackSelectorContents, stackSelectorPosition);
        }
    });
    unitsLayer.appendChild(stackSelector);
}
项目:touchkit    文件:VNavigationBar.java   
public void setRightWidget(Widget right) {
    rightComponentElement.getStyle().setDisplay(
            right != null ? Display.BLOCK : Display.NONE);
    if (right != null) {
        if (rightComponent != right && rightComponent != null) {
            clearComponent();
        }

        rightComponent = right;
        if (!rightComponent.isAttached()) {
            add(rightComponent,
                    (com.google.gwt.user.client.Element) rightComponentElement
                            .cast());
        }
    } else if (rightComponent != null) {
        clearComponent();
    }
}
项目:EasyML    文件:IndexPage.java   
/**
 * Init account roles 
 */
private void init() {
    accountSrv.isLogin(new AsyncCallback<Account>() {

        @Override
        public void onFailure(Throwable caught) {
            RootPanel.get("bda-login").getElement().getStyle().setDisplay(Display.INLINE);
        }

        @Override
        public void onSuccess(Account result) {
            if (result != null) {
                if(result.getEmail() != "guest"){
                    RootPanel.get("bda-logout").getElement().getStyle().setDisplay(Display.INLINE);
                    RootPanel.get("bda-workstage").getElement().getStyle().setDisplay(Display.INLINE);
                    if(result.getUsername() != null){
                        RootPanel.get("bda-account").getElement().setInnerText(result.getUsername());
                    }else{
                        RootPanel.get("bda-account").getElement().setInnerText(result.getEmail());
                    }
                    if(result.getEmail().equals("admin") || result.getEmail().equals("guest")){
                        RootPanel.get("bda-account").getElement().removeAttribute("href");
                    }else{
                        RootPanel.get("bda-account").getElement().setAttribute("href", "EMLStudio.html#account");
                    }
                }else{
                    RootPanel.get("bda-login").getElement().getStyle().setDisplay(Display.INLINE);
                }
            } else {
                RootPanel.get("bda-login").getElement().getStyle().setDisplay(Display.INLINE);
            }
        }
    });
}
项目:EasyML    文件:AdminPresenter.java   
private void init(){
    adminView.setAccount(AppController.username, AppController.email);      

    //Admin user have no workbench visit
    if(AppController.email.equals("admin")){                                        
        adminView.getWorkStage().getElement().getStyle().setDisplay(Display.NONE);
        adminView.getWorkStage().getElement().removeAttribute("href");
    }

    programLoader = new ProgramLoader(adminView);                               
    datasetLoader = new DatasetLoader(adminView);
    accountLoader = new AccountLoader(adminView);
    categoryLoader = new CategoryLoader(adminView);
    programLoader.go();                                                     
}
项目:EasyML    文件:AlertPanel.java   
public AlertPanel() {
    bind();

    title.setStyleName("alertTitle");
    close.setStyleName("alertClose");
    alertHeader.add(title);
    alertHeader.add(close);
    alertHeader.addStyleName("alertTitleBG");

    content.removeStyleName("gwt-Label");
    content.addStyleName("alertBody");
    alertContent.add(content);
    alertContent.addStyleName("alertBodyBG");

    confirmBtn.removeStyleName("gwt-Button");
    alertButton.add(confirmBtn);
    alertButton.addStyleName("alertButton1");

    vPanel.add(alertHeader);
    vPanel.add(alertContent);
    vPanel.add(alertButton);

    vPanel.addStyleName("alertBox");
    mask.addStyleName("alertBack");

    mask.addStyleName("alertBack");
    mask.getElement().getStyle().setDisplay(Display.NONE);
    vPanel.add(mask);

    root.add(mask);
    root.add(vPanel);
    this.add(root);
    this.removeStyleName("gwt-PopupPanel");
    this.getElement().getStyle().setPosition(Position.FIXED);
    this.getElement().getStyle().setZIndex(999999999);
}