applyToFrame(component);
}
@Override
protected void applyToComboBox(final UIComboBox component) {
final ColorRGBA upTop = new ColorRGBA(235 / 255f, 235 / 255f, 235 / 255f, 1);
final ColorRGBA upBottom = new ColorRGBA(200 / 255f, 200 / 255f, 200 / 255f, 1);
final GradientBackdrop upBack = new GradientBackdrop(upTop, upTop, upBottom, upBottom);
// value label
{
final UIBorder labelBorder = new ImageBorder(
// left
new SubTex(_sharedTex, 155, 11, 4, 10),
// right
new SubTex(_sharedTex, 185, 11, 4, 10),
// top
new SubTex(_sharedTex, 159, 7, 16, 4),
// bottom
new SubTex(_sharedTex, 159, 21, 16, 4),
// top left
new SubTex(_sharedTex, 155, 7, 4, 4),
// top right
new SubTex(_sharedTex, 177, 7, 1, 4),
// bottom left
new SubTex(_sharedTex, 155, 21, 4, 4),
// bottom right
new SubTex(_sharedTex, 177, 21, 1, 4));
final UILabel label = component.getValueLabel();
label.setBackdrop(upBack);
label.setBorder(labelBorder);
label.setAlignment(Alignment.LEFT);
label.setPadding(new Insets(0, 2, 0, 2));
}
// drop down button
{
final UIBorder buttonBorder = new ImageBorder(
// left
new SubTex(_sharedTex, 177, 11, 1, 10),
// right
new SubTex(_sharedTex, 185, 11, 4, 10),
// top
new SubTex(_sharedTex, 178, 7, 7, 4),
// bottom
new SubTex(_sharedTex, 178, 21, 7, 4),
// top left
new SubTex(_sharedTex, 177, 7, 1, 4),
// top right
new SubTex(_sharedTex, 185, 7, 4, 4),
// bottom left
new SubTex(_sharedTex, 177, 21, 1, 4),
// bottom right
new SubTex(_sharedTex, 185, 21, 4, 4));
final UIButton button = component.getOpenButton();
button.setButtonText("");
button.setButtonIcon(new SubTex(_sharedTex, 196, 12, 10, 9));
button.getMouseOverState().setIcon(new SubTex(_sharedTex, 210, 12, 10, 9));
button.setBorder(buttonBorder);
button.setBackdrop(upBack);
button.setMargin(new Insets(0, 0, 0, 0));
button.setPadding(new Insets(0, 1, 0, 1));
for (final UIState state : button.getStates()) {
state.setBorder(buttonBorder);
state.setBackdrop(upBack);
}
}
// skin for menuitems
{
final EmptyBorder itemBorder = new EmptyBorder();
final EmptyBackdrop itemBackdrop = new EmptyBackdrop();
final SolidBackdrop overBackdrop = new SolidBackdrop(new ColorRGBA(50 / 255f, 50 / 255f, 200 / 255f, 1));
component.setItemSkinCallback(new SkinningTask() {
@Override
public void skinComponent(final UIComponent c) {
c.setBorder(itemBorder);
c.setBackdrop(itemBackdrop);