예제 #1
0
 public RadioButton setLabelPadding(int thePaddingX, int thePaddingY) {
   _myPaddingX = thePaddingX;
   _myPaddingY = thePaddingY;
   for (Toggle t : _myRadioToggles) {
     t.getCaptionLabel().setPadding(thePaddingX, thePaddingY);
   }
   return this;
 }
예제 #2
0
 /**
  * @param theName
  * @param theValue
  * @return
  */
 public RadioButton addItem(final String theName, final float theValue) {
   Toggle t = cp5.addToggle(theName, 0, 0, itemWidth, itemHeight);
   t.getCaptionLabel().align(alignX, alignY).setPadding(_myPaddingX, _myPaddingY);
   t.setMode(ControlP5.DEFAULT);
   t.setImages(images[0], images[1], images[2]);
   t.setSize(images[0]);
   addItem(t, theValue);
   return this;
 }
예제 #3
0
 public RadioButton toUpperCase(boolean theValue) {
   for (Toggle t : _myRadioToggles) {
     t.getCaptionLabel().toUpperCase(theValue);
   }
   return this;
 }
예제 #4
0
 public RadioButton showLabels() {
   for (Toggle t : _myRadioToggles) {
     t.getCaptionLabel().setVisible(true);
   }
   return this;
 }
예제 #5
0
 public RadioButton hideLabels() {
   for (Toggle t : _myRadioToggles) {
     t.getCaptionLabel().setVisible(false);
   }
   return this;
 }
예제 #6
0
 public RadioButton setColorLabels(int theColor) {
   for (Toggle t : _myRadioToggles) {
     t.getCaptionLabel().setColor(theColor);
   }
   return this;
 }
예제 #7
0
 private void updateAlign() {
   for (Toggle t : _myRadioToggles) {
     t.getCaptionLabel().align(alignX, alignY);
   }
 }