Пример #1
0
 public void setDisabled(boolean isDisabled) {
   super.setDisabled(isDisabled);
   if (this.haveButtonImage(this.mDisabledImage, this.mDisabledRect)) {
     markDirty(null);
   }
   ;
 }
Пример #2
0
 public void update() {
   super.update();
   markDirty(null);
   if (((isDown) && (isOver))) {
     this.mButtonListener.buttonDownTick(this.mId);
   }
   ;
   if (((((!(isDown)) && (!(isOver)))) && ((this.mOverAlpha > 0)))) {
     if (this.mOverAlphaSpeed > 0) {
       this.mOverAlpha = (this.mOverAlpha - this.mOverAlphaSpeed);
       if (this.mOverAlpha < 0) {
         this.mOverAlpha = 0;
       }
       ;
     } else {
       this.mOverAlpha = 0;
     }
     ;
     markDirty(null);
   } else {
     if (((((isOver) && ((this.mOverAlphaFadeInSpeed > 0)))) && ((this.mOverAlpha < 1)))) {
       this.mOverAlpha = (this.mOverAlpha + this.mOverAlphaFadeInSpeed);
       if (this.mOverAlpha > 1) {
         this.mOverAlpha = 1;
       }
       ;
       markDirty(null);
     }
     ;
   }
   ;
 }
Пример #3
0
 public void onMouseUp(int x, int y) {
   super.onMouseUp(x, y);
   if (((isOver) && (widgetManager.hasFocus))) {
     this.mButtonListener.buttonRelease(this.mId);
   }
   ;
   markDirty(null);
 }
Пример #4
0
 public void onMouseEnter() {
   super.onMouseEnter();
   if ((((this.mOverAlphaFadeInSpeed == 0)) && ((this.mOverAlpha > 0)))) {
     this.mOverAlpha = 0;
   }
   ;
   if ((((isDown
       || this.haveButtonImage(
           this.mOverImage,
           this.mOverRect))))) // || (!((colors[COLOR_LABEL_HILITE] == colors[COLOR_LABEL])))))
   {
     markDirty(null);
   }
   ;
   //            Color aColor= (Color)colors.elementAt(COLOR_LABEL_HILITE);
   this.mButtonListener.buttonMouseEnter(this.mId);
 }
Пример #5
0
 public void onMouseLeave() {
   super.onMouseLeave();
   if ((((this.mOverAlphaSpeed == 0)) && ((this.mOverAlpha > 0)))) {
     this.mOverAlpha = 0;
   } else {
     if ((((this.mOverAlphaSpeed > 0)) && ((this.mOverAlpha == 0)))) {
       this.mOverAlpha = 1;
     }
     ;
   }
   ;
   if (((((isDown)
       || (this.haveButtonImage(
           this.mOverImage,
           this.mOverRect)))))) // || (!((colors[COLOR_LABEL_HILITE] == colors[COLOR_LABEL])))))
   {
     markDirty(null);
   }
   ;
   this.mButtonListener.buttonMouseLeave(this.mId);
 }
Пример #6
0
 public void onMouseMove(int x, int y) {
   super.onMouseMove(x, y);
   this.mButtonListener.buttonMouseMove(this.mId, x, y);
 }
Пример #7
0
 public void onMouseDown(int x, int y) {
   super.onMouseDown(x, y);
   this.mButtonListener.buttonPress(this.mId);
   markDirty(null);
 }