Exemplo n.º 1
0
 public void setCurrentValueLong(long i) {
   if (i <= maxValue && (i >= minValue)) {
     currentValue = i;
     tf.setText(Long.toString(currentValue));
     decrementButton.setEnabled(currentValue > minValue);
     incrementButton.setEnabled(currentValue < maxValue);
   }
 }
Exemplo n.º 2
0
 public void setCurrentValue(int i) {
   if (i <= maxValue && (i >= minValue)) {
     currentValue = i;
     tf.setText(Integer.toString((int) currentValue));
     decrementButton.setEnabled(currentValue > minValue);
     incrementButton.setEnabled(currentValue < maxValue);
   }
 }
Exemplo n.º 3
0
 public void crement(int i) {
   if (MesquiteWindow.getQueryMode(this)) {
     MesquiteWindow.respondToQueryMode("Mini scroll", command, this);
     return;
   }
   if (i <= maxValue && (i >= minValue) && command != null) {
     currentValue = i;
     command.doItMainThread(
         Long.toString(currentValue),
         CommandChecker.getQueryModeString("Mini scroll", command, this),
         this);
     tf.setText(Long.toString(currentValue));
     decrementButton.setEnabled(i > minValue);
     incrementButton.setEnabled(i < maxValue);
   }
 }
Exemplo n.º 4
0
 public void decrement() {
   if (MesquiteWindow.getQueryMode(this)) {
     MesquiteWindow.respondToQueryMode("Mini scroll", command, this);
     return;
   }
   if (currentValue > minValue && command != null) {
     currentValue--;
     tf.setText(Long.toString(currentValue));
     command.doItMainThread(
         Long.toString(currentValue),
         CommandChecker.getQueryModeString("Mini scroll", command, this),
         this);
     enterButton.setEnabled(false);
     decrementButton.setEnabled(currentValue > minValue);
     incrementButton.setEnabled(currentValue < maxValue);
   }
 }
Exemplo n.º 5
0
 public void
     increment() { // have interface incrementable and pass object to this miniscroll so it can
   // notify object
   if (MesquiteWindow.getQueryMode(this)) {
     MesquiteWindow.respondToQueryMode("Mini scroll", command, this);
     return;
   }
   if (currentValue < maxValue && command != null) {
     currentValue++;
     command.doItMainThread(
         Long.toString(currentValue),
         CommandChecker.getQueryModeString("Mini scroll", command, this),
         this);
     tf.setText(Long.toString(currentValue));
     enterButton.setEnabled(false);
     decrementButton.setEnabled(currentValue > minValue);
     incrementButton.setEnabled(currentValue < maxValue);
   }
 }