BrightSide Workbench Full Report + Source Code
org.turro.zkoss.dialog.InputDialog Class Reference
Inheritance diagram for org.turro.zkoss.dialog.InputDialog:
Collaboration diagram for org.turro.zkoss.dialog.InputDialog:

Public Member Functions

 InputDialog (String title, InputField[] fields, Set< DialogButton > buttons)
 
InputField[] getFields ()
 
DialogButton getPressedButton ()
 
- Public Member Functions inherited from org.turro.elephant.zkoss.ModalWindow
 ModalWindow (String title, String border, boolean closable)
 
 ModalWindow ()
 
int getResult ()
 
void setResult (int result)
 
Object getResultValue ()
 
void setResultValue (Object resultValue)
 
void show (Page page, Command command)
 

Static Public Member Functions

static void getInput (Page page, String title, String label, Object value, String format, int scale, final Command onOk)
 
static void getInput (Page page, String title, String label, Object value, String format, int scale, final Command onOk, final Command onClose)
 
static void getInput (Page page, String title, InputField[] fields, final Command onOk)
 
static void getInput (Page page, String title, InputField[] fields, final Command onOk, final Command onClose)
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.elephant.zkoss.ModalWindow
int result
 
Object resultValue
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 36 of file InputDialog.java.

Constructor & Destructor Documentation

◆ InputDialog()

org.turro.zkoss.dialog.InputDialog.InputDialog ( String  title,
InputField[]  fields,
Set< DialogButton buttons 
)

Definition at line 44 of file InputDialog.java.

44  {
45  super(title, "normal", false);
46  this.fields = fields;
47  this.buttons = buttons;
48  panel = new Panel();
49  appendChild(panel);
50  Panelchildren pc = new Panelchildren();
51  pc.setStyle("padding: 5px;");
52  panel.appendChild(pc);
53  container = new Vbox();
54  container.setSclass("inputDialogContainer");
55  pc.appendChild(container);
56  createFields();
57  container.appendChild(new Separator());
58  createButtons();
59  }
Here is the caller graph for this function:

Member Function Documentation

◆ getFields()

InputField [] org.turro.zkoss.dialog.InputDialog.getFields ( )

Definition at line 61 of file InputDialog.java.

61  {
62  return fields;
63  }
Here is the caller graph for this function:

◆ getInput() [1/4]

static void org.turro.zkoss.dialog.InputDialog.getInput ( Page  page,
String  title,
InputField[]  fields,
final Command  onOk 
)
static

Definition at line 139 of file InputDialog.java.

139  {
140  getInput(page, title, fields, onOk, null);
141  }
static void getInput(Page page, String title, String label, Object value, String format, int scale, final Command onOk)
Here is the call graph for this function:

◆ getInput() [2/4]

static void org.turro.zkoss.dialog.InputDialog.getInput ( Page  page,
String  title,
InputField[]  fields,
final Command  onOk,
final Command  onClose 
)
static

Definition at line 143 of file InputDialog.java.

143  {
144 // try {
145  final InputDialog id = new InputDialog(title, fields, DialogButton.getOkCancelButtons());
146  id.setPage(page);
147  Modal.doModal(id, new Command() {
148  @Override
149  public Object execute(Context context) {
150  if(onClose != null) onClose.execute(context);
151  if(id.getPressedButton().equals(DialogButton.BUTTON_OK)) {
152  context.put("fields", id.getFields());
153  if(onOk != null) onOk.execute(context);
154  }
155  return null;
156  }
157  });
158 // id.show(page);
159 // if(id.getPressedButton().equals(DialogButton.BUTTON_OK)) {
160 // return id.getFields();
161 // }
162 // } catch (InterruptedException ex) {
163 // Logger.getLogger(InputDialog.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
164 // }
165 // return new InputField[0];
166  }
InputDialog(String title, InputField[] fields, Set< DialogButton > buttons)
Here is the call graph for this function:

◆ getInput() [3/4]

static void org.turro.zkoss.dialog.InputDialog.getInput ( Page  page,
String  title,
String  label,
Object  value,
String  format,
int  scale,
final Command  onOk 
)
static

Definition at line 105 of file InputDialog.java.

106  {
107  getInput(page, title, label, value, format, scale, onOk, null);
108  }
Here is the caller graph for this function:

◆ getInput() [4/4]

static void org.turro.zkoss.dialog.InputDialog.getInput ( Page  page,
String  title,
String  label,
Object  value,
String  format,
int  scale,
final Command  onOk,
final Command  onClose 
)
static

Definition at line 110 of file InputDialog.java.

111  {
112 // try {
113  InputField field = new InputField(label, value, format, scale);
114  final InputDialog id = new InputDialog(title, new InputField[] { field }, DialogButton.getOkCancelButtons());
115  id.setPage(page);
116  Modal.doModal(id, new Command() {
117  @Override
118  public Object execute(Context context) {
119  if(onClose != null) onClose.execute(context);
120  if(id.getPressedButton().equals(DialogButton.BUTTON_OK)) {
121  context.put("value", id.getFields()[0].getValue());
122  if(onOk != null) onOk.execute(context);
123  }
124  return null;
125  }
126  });
127 // id.show(page);
128 // if(id.getPressedButton().equals(DialogButton.BUTTON_OK)) {
129 // for(InputField f : id.getFields()) {
130 // return f.getValue();
131 // }
132 // }
133 // } catch (InterruptedException ex) {
134 // Logger.getLogger(InputDialog.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
135 // }
136 // return null;
137  }
Here is the call graph for this function:

◆ getPressedButton()

DialogButton org.turro.zkoss.dialog.InputDialog.getPressedButton ( )

Definition at line 65 of file InputDialog.java.

65  {
66  return pressedButton;
67  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: