Exemplo n.º 1
0
 @Override
 protected void onStart() {
   offsetHeight = curPanel.getOffsetHeight();
   offsetWidth = curPanel.getOffsetWidth();
   curPanel.getElement().getStyle().setProperty("overflow", "hidden");
   super.onStart();
 }
Exemplo n.º 2
0
  // Fade out the "Loading application" pop-up
  private void hideLoadingPopup() {
    final Element e = RootPanel.get("loading").getElement();

    Animation r =
        new Animation() {

          @Override
          protected void onUpdate(double progress) {
            e.getStyle().setOpacity(1.0 - progress);
          }

          @Override
          protected void onComplete() {
            e.getStyle().setVisibility(Visibility.HIDDEN);
          }
        };

    r.run(500);
  }
Exemplo n.º 3
0
 /////////////////////////////////////////////////////////////////////////////////////////
 //  METHODS
 /////////////////////////////////////////////////////////////////////////////////////////
 public void fade(final int duration, final double targetOpacity) {
   double theTargetOpacity = 0.0;
   if (targetOpacity > 1.0) {
     theTargetOpacity = 1.0;
   } else if (targetOpacity < 0.0) {
     theTargetOpacity = 0.0;
   } else {
     theTargetOpacity = targetOpacity;
   }
   _targetOpacity = theTargetOpacity;
   String opacityStr = _element.getStyle().getOpacity();
   try {
     _baseOpacity = new BigDecimal(opacityStr).doubleValue();
     _opacityIncrement = targetOpacity - _baseOpacity;
     super.run(duration);
   } catch (NumberFormatException nfEx) {
     this.onComplete(); // set opacity directly
   }
 }
Exemplo n.º 4
0
 @Override
 protected void onComplete() {
   super.onComplete();
   _element.getStyle().setOpacity(_targetOpacity);
 }
Exemplo n.º 5
0
 @Override
 protected void onStart() {
   super.onStart();
   startButton.setEnabled(false);
   cancelButton.setEnabled(true);
 }
Exemplo n.º 6
0
 @Override
 public void cancel() {
   isCancelled = true;
   super.cancel();
 }