use of org.entirej.applicationframework.rwt.renderers.stack.EJRWTStackedItemRendererType in project rap by entirej.
the class EJRWTStackedItemRenderer method setEditAllowed.
@Override
public void setEditAllowed(boolean editAllowed) {
EJRWTStackedItemRendererType[] values = EJRWTStackedItemRendererType.values();
for (EJRWTStackedItemRendererType type : values) {
Control control = stackedPane.getControl(type.name());
if (control != null && controlState(control)) {
if (control instanceof Button) {
((Button) control).setEnabled(editAllowed);
} else if (control instanceof Text) {
((Text) control).setEditable(editAllowed);
} else if (control instanceof Combo) {
((Combo) control).setEnabled(editAllowed);
}
}
}
setMandatoryBorder(editAllowed && _mandatory);
if (controlState(_actionControl)) {
_actionControl.setActionVisible(isLovActivated() && editAllowed);
}
}
use of org.entirej.applicationframework.rwt.renderers.stack.EJRWTStackedItemRendererType in project rap by entirej.
the class EJRWTStackedItemRenderer method refreshFont.
private void refreshFont() {
EJRWTStackedItemRendererType[] values = EJRWTStackedItemRendererType.values();
for (EJRWTStackedItemRendererType type : values) {
Control control = stackedPane.getControl(type.name());
if (control != null && controlState(control)) {
EJRWTItemRendererVisualContext _visualContext = (EJRWTItemRendererVisualContext) control.getData("EJRWTItemRendererVisualContext");
control.setFont(EJRWTVisualAttributeUtils.INSTANCE.getFont(_visualAttributeProperties, _visualContext.getItemFont()));
}
}
}
Aggregations