*/
private TAction action;
+ /**
+ * The background color used for the button "shadow".
+ */
+ private CellAttributes shadowColor;
+
// ------------------------------------------------------------------------
// Constructors -----------------------------------------------------------
// ------------------------------------------------------------------------
setY(y);
setHeight(2);
setWidth(mnemonic.getRawLabel().length() + 3);
+
+ shadowColor = new CellAttributes();
+ shadowColor.setTo(getWindow().getBackground());
+ shadowColor.setForeColor(Color.BLACK);
+ shadowColor.setBold(false);
}
/**
public void draw() {
CellAttributes buttonColor;
CellAttributes menuMnemonicColor;
- CellAttributes shadowColor = new CellAttributes();
- shadowColor.setTo(getWindow().getBackground());
- shadowColor.setForeColor(Color.BLACK);
- shadowColor.setBold(false);
if (!isEnabled()) {
buttonColor = getTheme().getColor("tbutton.disabled");
putCharXY(1 + mnemonic.getShortcutIdx(), 0,
mnemonic.getShortcut(), menuMnemonicColor);
}
-
}
}
}
}
+ /**
+ * Set the background color used for the button "shadow".
+ *
+ * @param color the new background color
+ */
+ public void setShadowColor(final CellAttributes color) {
+ shadowColor = new CellAttributes();
+ shadowColor.setTo(color);
+ shadowColor.setForeColor(Color.BLACK);
+ shadowColor.setBold(false);
+ }
+
}