@Test public void testSetAlign() { JComboBox comboBox = new JComboBox(); for (EnumAlign enumAlign : EnumAlign.values()) { comboBox.addItem(enumAlign); } comboBox.setSelectedIndex(0); Whitebox.setInternalState(panLine, "comboBoxAlign", comboBox); panLine.setAlign(EnumAlign.CENTER); String actual = ((EnumAlign) comboBox.getSelectedItem()).getXmlValue(); String expectedAlign = EnumAlign.CENTER.getXmlValue(); assertEquals(expectedAlign, actual); assertEquals(1, comboBox.getSelectedIndex()); }
public void setAlign(EnumAlign enumAlign) { comboBoxAlign.setSelectedItem(enumAlign); }
PanLine extends JPanel { public void setAlign(EnumAlign enumAlign) { comboBoxAlign.setSelectedItem(enumAlign); } }
PanLine extends JPanel { public void setAlign(EnumAlign enumAlign) { comboBoxAlign.setSelectedItem(enumAlign); } PanLine(); }
PanLine extends JPanel { public void setAlign(EnumAlign enumAlign) { comboBoxAlign.setSelectedItem(enumAlign); } PanLine(); String getAlign(); String getThickness(); String getCustomWidth(); String getCustomWidthUnit(); String getColor(); void setAlign(EnumAlign enumAlign); void setThickness(String thickness); void setCustomWidth(String width); void setCustomWidthUnit(EnumWidthUnit enumWidthUnit); void setColor(String hexValue); }
PanLine extends JPanel { public void setAlign(EnumAlign enumAlign) { comboBoxAlign.setSelectedItem(enumAlign); } PanLine(); String getAlign(); String getThickness(); String getCustomWidth(); String getCustomWidthUnit(); String getColor(); void setAlign(EnumAlign enumAlign); void setThickness(String thickness); void setCustomWidth(String width); void setCustomWidthUnit(EnumWidthUnit enumWidthUnit); void setColor(String hexValue);  }