Search in sources :

Example 1 with DivElement

use of com.google.gwt.dom.client.DivElement in project che by eclipse.

the class SplitEditorPartViewImpl method tuneVerticalSplitter.

/**
     * Tunes splitter. Makes it wider and adds double border to seem rich.
     *
     * @param el
     *         element to tune
     */
private void tuneVerticalSplitter(Element el) {
    /** Add Z-Index to move the splitter on the top and make content visible */
    el.getParentElement().getStyle().setProperty("zIndex", "1000");
    el.getParentElement().getStyle().setProperty("overflow", "visible");
    /** Tune splitter catch panel */
    el.getStyle().setProperty("boxSizing", "border-box");
    el.getStyle().setProperty("width", "5px");
    el.getStyle().setProperty("overflow", "hidden");
    el.getStyle().setProperty("marginLeft", "-3px");
    el.getStyle().setProperty("backgroundColor", "transparent");
    /** Add small border */
    DivElement smallBorder = Document.get().createDivElement();
    smallBorder.getStyle().setProperty("position", "absolute");
    smallBorder.getStyle().setProperty("width", "1px");
    smallBorder.getStyle().setProperty("height", "100%");
    smallBorder.getStyle().setProperty("left", "3px");
    smallBorder.getStyle().setProperty("top", "0px");
    smallBorder.getStyle().setProperty("backgroundColor", Style.getSplitterSmallBorderColor());
    el.appendChild(smallBorder);
}
Also used : DivElement(com.google.gwt.dom.client.DivElement)

Example 2 with DivElement

use of com.google.gwt.dom.client.DivElement in project che by eclipse.

the class PerspectiveViewImpl method tuneBottomSplitter.

/**
     * Tunes bottom splitter. Makes it tiny but with a transparent area for easy resizing.
     *
     * @param el
     *         element to tune
     */
private void tuneBottomSplitter(Element el) {
    /** Add Z-Index to move the splitter on the top and make content visible */
    el.getParentElement().getStyle().setProperty("zIndex", "1000");
    el.getParentElement().getStyle().setProperty("overflow", "visible");
    el.getStyle().setProperty("height", "3px");
    el.getStyle().setProperty("marginTop", "-2px");
    el.getStyle().setProperty("backgroundColor", "transparent");
    /** Add small border */
    DivElement delimiter = Document.get().createDivElement();
    delimiter.getStyle().setProperty("position", "absolute");
    delimiter.getStyle().setProperty("width", "100%");
    delimiter.getStyle().setProperty("height", "1px");
    delimiter.getStyle().setProperty("left", "0px");
    delimiter.getStyle().setProperty("top", "2px");
    delimiter.getStyle().setProperty("backgroundColor", Style.theme.tabsPanelBackground());
    el.appendChild(delimiter);
}
Also used : DivElement(com.google.gwt.dom.client.DivElement)

Example 3 with DivElement

use of com.google.gwt.dom.client.DivElement in project che by eclipse.

the class PerspectiveViewImpl method tuneLeftSplitter.

/**
     * Tunes left splitter. Makes it wider and adds double border to seem rich.
     *
     * @param el
     *         element to tune
     */
private void tuneLeftSplitter(Element el) {
    /** Add Z-Index to move the splitter on the top and make content visible */
    el.getParentElement().getStyle().setProperty("zIndex", "1000");
    el.getParentElement().getStyle().setProperty("overflow", "visible");
    /** Tune splitter catch panel */
    el.getStyle().setProperty("boxSizing", "border-box");
    el.getStyle().setProperty("width", "5px");
    el.getStyle().setProperty("overflow", "hidden");
    el.getStyle().setProperty("marginLeft", "-3px");
    el.getStyle().setProperty("backgroundColor", "transparent");
    /** Add small border */
    DivElement smallBorder = Document.get().createDivElement();
    smallBorder.getStyle().setProperty("position", "absolute");
    smallBorder.getStyle().setProperty("width", "1px");
    smallBorder.getStyle().setProperty("height", "100%");
    smallBorder.getStyle().setProperty("left", "3px");
    smallBorder.getStyle().setProperty("top", "0px");
    smallBorder.getStyle().setProperty("backgroundColor", Style.getSplitterSmallBorderColor());
    el.appendChild(smallBorder);
    /** Add large border */
    DivElement largeBorder = Document.get().createDivElement();
    largeBorder.getStyle().setProperty("position", "absolute");
    largeBorder.getStyle().setProperty("width", "2px");
    largeBorder.getStyle().setProperty("height", "100%");
    largeBorder.getStyle().setProperty("left", "1px");
    largeBorder.getStyle().setProperty("top", "0px");
    largeBorder.getStyle().setProperty("opacity", "0.4");
    largeBorder.getStyle().setProperty("backgroundColor", Style.getSplitterLargeBorderColor());
    el.appendChild(largeBorder);
}
Also used : DivElement(com.google.gwt.dom.client.DivElement)

Example 4 with DivElement

use of com.google.gwt.dom.client.DivElement in project che by eclipse.

the class HotKeysDialogPresenter method wrapCategory.

private static Element wrapCategory(String text) {
    final DivElement div = Document.get().createDivElement();
    div.setClassName("divCategory");
    div.setInnerText(text);
    return div;
}
Also used : DivElement(com.google.gwt.dom.client.DivElement)

Example 5 with DivElement

use of com.google.gwt.dom.client.DivElement in project che by eclipse.

the class HotKeysDialogPresenter method wrapHotKey.

private static Element wrapHotKey(String hotKey, String description, boolean global) {
    final DivElement containerDiv = Document.get().createDivElement();
    final DivElement hotKeyDiv = Document.get().createDivElement();
    final DivElement descriptionDiv = Document.get().createDivElement();
    hotKeyDiv.setInnerText(hotKey);
    descriptionDiv.setInnerText(description);
    containerDiv.setClassName("divRow");
    hotKeyDiv.setClassName("divCell");
    hotKeyDiv.addClassName("hotKey");
    descriptionDiv.setClassName("divCell");
    descriptionDiv.addClassName("description");
    containerDiv.appendChild(hotKeyDiv);
    containerDiv.appendChild(descriptionDiv);
    return containerDiv;
}
Also used : DivElement(com.google.gwt.dom.client.DivElement)

Aggregations

DivElement (com.google.gwt.dom.client.DivElement)25 Element (com.google.gwt.dom.client.Element)2 Test (org.junit.Test)2 RepeatingCommand (com.google.gwt.core.client.Scheduler.RepeatingCommand)1 ImageElement (com.google.gwt.dom.client.ImageElement)1 Style (com.google.gwt.dom.client.Style)1 HTMLPanel (com.google.gwt.user.client.ui.HTMLPanel)1 Label (com.google.gwt.user.client.ui.Label)1 Element (elemental.dom.Element)1 Event (elemental.events.Event)1 EventListener (elemental.events.EventListener)1 LIElement (elemental.html.LIElement)1 SpanElement (elemental.html.SpanElement)1 ActionEvent (org.eclipse.che.ide.api.action.ActionEvent)1 Presentation (org.eclipse.che.ide.api.action.Presentation)1 ResourceChangedEvent (org.eclipse.che.ide.api.resources.ResourceChangedEvent)1 Value (org.rstudio.studio.client.common.Value)1 OMSVGSVGElement (org.vectomatic.dom.svg.OMSVGSVGElement)1