Java Code Examples for com.google.gwt.dom.client.Style.clearLeft()

The following are Jave code examples for showing how to use clearLeft() of the com.google.gwt.dom.client.Style class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: empiria.player   File: MultiPageView.java   Source Code and License Vote up 6 votes
public void setSwipeDisabled(boolean swipeDisabled) {
    Style style = controller.getStyle();
    Style elementStyle = getElement().getStyle();

    style.setWidth(controller.getWidth(), Unit.PCT);

    if (swipeDisabled) {
        style.clearPosition();
        style.clearTop();
        style.clearLeft();
        elementStyle.clearPosition();
    } else {
        style.setPosition(Position.ABSOLUTE);
        style.setTop(0, Unit.PX);
        style.setLeft(0, Unit.PX);
        elementStyle.setPosition(Position.RELATIVE);
    }

    setSwipeLength();
}
 
Example 2
Project: appinventor-extensions   File: MockImageBase.java   Source Code and License Vote up 5 votes
private void unclipImage() {
  Style style = image.getElement().getStyle();
  style.clearLeft();
  style.clearTop();
  style.clearWidth();
  style.clearHeight();
}
 
Example 3
Project: calendar-component   File: DateCellDayItem.java   Source Code and License Vote up 4 votes
private void cancelMouseMove() {
    mouseMoveCanceled = true;

    // reset and remove everything related to the event handling
    Event.releaseCapture(getElement());
    setFocus(false);

    if (moveRegistration != null) {
        moveRegistration.removeHandler();
        moveRegistration = null;
    }

    mouseMoveStarted = false;
    removeGlobalResizeStyle();

    Style s = getElement().getStyle();
    s.setZIndex(1);

    // reset the position of the event
    int dateCellWidth = getDateCellWidth();
    int dayOffset = startXrelative / dateCellWidth;
    s.clearLeft();

    calendarItem.setStartTime(startDatetimeFrom);
    calendarItem.setEndTime(startDatetimeTo);

    long startFromMinutes = (startDatetimeFrom.getHours() * 60)
            + startDatetimeFrom.getMinutes();
    long range = calendarItem.getRangeInMinutes();

    startFromMinutes = calculateStartFromMinute(startFromMinutes,
            startDatetimeFrom, startDatetimeTo, dayOffset);
    if (startFromMinutes < 0) {
        range += startFromMinutes;
    }

    updatePosition(startFromMinutes, range);

    startY = -1;
    startX = -1;

    // to reset the event width
    ((DateCell) getParent()).recalculateItemWidths();
}