示例#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);
   }
 }