public RadioButton setLabelPadding(int thePaddingX, int thePaddingY) { _myPaddingX = thePaddingX; _myPaddingY = thePaddingY; for (Toggle t : _myRadioToggles) { t.getCaptionLabel().setPadding(thePaddingX, thePaddingY); } return this; }
/** * @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; }
public RadioButton toUpperCase(boolean theValue) { for (Toggle t : _myRadioToggles) { t.getCaptionLabel().toUpperCase(theValue); } return this; }
public RadioButton showLabels() { for (Toggle t : _myRadioToggles) { t.getCaptionLabel().setVisible(true); } return this; }
public RadioButton hideLabels() { for (Toggle t : _myRadioToggles) { t.getCaptionLabel().setVisible(false); } return this; }
public RadioButton setColorLabels(int theColor) { for (Toggle t : _myRadioToggles) { t.getCaptionLabel().setColor(theColor); } return this; }
private void updateAlign() { for (Toggle t : _myRadioToggles) { t.getCaptionLabel().align(alignX, alignY); } }