19 package org.turro.zkoss.input;
21 import org.turro.elephant.util.Images;
22 import org.turro.i18n.I_;
23 import org.turro.zkoss.label.LabelTypes;
24 import org.zkoss.zk.ui.event.Event;
25 import org.zkoss.zk.ui.event.EventListener;
26 import org.zkoss.zk.ui.event.Events;
27 import org.zkoss.zk.ui.ext.AfterCompose;
28 import org.zkoss.zul.Button;
29 import org.zkoss.zul.Hlayout;
30 import org.zkoss.zul.Label;
31 import org.zkoss.zul.impl.InputElement;
37 public abstract class OverrideInput extends Hlayout implements AfterCompose {
40 private Label information;
54 setSclass(
"z-valign-middle");
58 editor.addEventListener(Events.ON_CHANGE,
new EventListener<Event>() {
60 public void onEvent(Event event) throws Exception {
61 information.setValue(isCalculated() ? I_.get(
"Calculated") : I_.get(
"Manual"));
66 appendChild(information);
68 reset.setTooltiptext(
I_.
get(
"Reset value"));
70 reset.addEventListener(Events.ON_CLICK,
new EventListener<Event>() {
72 public void onEvent(Event event) throws Exception {
74 information.setValue(isCalculated() ? I_.get(
"Calculated") : I_.get(
"Manual"));
static String getImage(String image)
static String get(String msg)
static Label getSoftLabel(String value)