1 14 package org.wings.plaf.css.msie; 15 16 import java.io.IOException ; 17 18 import org.wings.SAbstractButton; 19 import org.wings.SIcon; 20 import org.wings.io.Device; 21 import org.wings.plaf.css.Utils; 22 23 24 25 public class RadioButtonCG extends CheckBoxCG { 26 protected void installIcons(final SAbstractButton button) { 27 org.wings.plaf.CGManager manager = button.getSession().getCGManager(); 28 button.setIcon((SIcon) manager.getObject("SRadioButton.icon", SIcon.class)); 29 button.setSelectedIcon((SIcon) manager.getObject("SRadioButton.selectedIcon", SIcon.class)); 30 button.setRolloverIcon((SIcon) manager.getObject("SRadioButton.rolloverIcon", SIcon.class)); 31 button.setRolloverSelectedIcon((SIcon) manager.getObject("SRadioButton.rolloverSelectedIcon", SIcon.class)); 32 button.setPressedIcon((SIcon) manager.getObject("SRadioButton.pressedIcon", SIcon.class)); 33 button.setDisabledIcon((SIcon) manager.getObject("SRadioButton.disabledIcon", SIcon.class)); 34 button.setDisabledSelectedIcon((SIcon) manager.getObject("SRadioButton.disabledSelectedIcon", SIcon.class)); 35 } 36 37 protected void inputTypeCheckbox(Device device, SAbstractButton button) throws IOException { 38 device.print("<input type=\"hidden\" name=\""); 39 Utils.write(device, Utils.event(button)); 40 device.print("\" value=\""); 41 Utils.write(device, button.getDeselectionParameter()); 42 device.print("\"/>"); 43 44 device.print("<input type=\"radio\" name=\""); 45 Utils.write(device, Utils.event(button)); 46 device.print("\" value=\""); 47 Utils.write(device, button.getToggleSelectionParameter()); 48 device.print("\""); 49 50 if (!button.isEnabled()) 51 device.print(" disabled=\"true\""); 52 if (button.isFocusOwner()) 53 Utils.optAttribute(device, "focus", button.getName()); 54 55 if (button.isSelected()) 56 device.print(" checked=\"true\""); 57 58 Utils.writeEvents(device, button); 59 device.print("/>"); 60 } 61 } 62 | Popular Tags |