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

Public Member Functions

 SelectionDialog (String title, Component component, Set< DialogButton > buttons)
 
Component getComponent ()
 
DialogButton getPressedButton ()
 
void afterCompose ()
 
- 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 getComponent (Page page, String title, Component component, String width, String height, final Command command)
 
static void showComponent (Page page, String title, Component component, String width, String height, final Command command)
 
static void popupComponent (Page page, String title, Component component, String width, String height)
 

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 37 of file SelectionDialog.java.

Constructor & Destructor Documentation

◆ SelectionDialog()

org.turro.zkoss.dialog.SelectionDialog.SelectionDialog ( String  title,
Component  component,
Set< DialogButton buttons 
)

Definition at line 45 of file SelectionDialog.java.

45  {
46  super(title, "normal", false);
47  this.component = component;
48  this.buttons = buttons;
49  panel = new Panel();
50  panel.setVflex("true");
51  panel.setHflex("true");
52  appendChild(panel);
53  Panelchildren pc = new Panelchildren();
54  panel.appendChild(pc);
55  container = new Vlayout();
56  container.setHflex("true");
57  container.setVflex("true");
58  container.setSclass("_inputDialogContainer");
59  pc.appendChild(container);
60  container.appendChild(component);
61  if(component instanceof AfterCompose) {
62  ((AfterCompose) component).afterCompose();
63  }
64  if(buttons != null) {
65  createButtons();
66  setSizable(true);
67  setMaximizable(true);
68  } else {
69  setClosable(true);
70  setSizable(true);
71  setMaximizable(true);
72  //setWidth(((HtmlBasedComponent) component).getWidth());
73  //setHeight(((HtmlBasedComponent) component).getHeight());
74  //((HtmlBasedComponent) component).setVflex("true");
75  //((HtmlBasedComponent) component).setHflex("true");
76  }
77  if(((HtmlBasedComponent) this.component).getHeight()== null) {
78  ((HtmlBasedComponent) this.component).setVflex("true");
79  }
80  if(((HtmlBasedComponent) this.component).getWidth() == null) {
81  ((HtmlBasedComponent) this.component).setHflex("true");
82  }
83  }
Here is the caller graph for this function:

Member Function Documentation

◆ afterCompose()

void org.turro.zkoss.dialog.SelectionDialog.afterCompose ( )

Definition at line 94 of file SelectionDialog.java.

94  {
95  ((HtmlBasedComponent) component).setVflex("true");
96  ((HtmlBasedComponent) component).setHflex("true");
97  }

◆ getComponent() [1/2]

Component org.turro.zkoss.dialog.SelectionDialog.getComponent ( )

Definition at line 85 of file SelectionDialog.java.

85  {
86  return component;
87  }
Here is the caller graph for this function:

◆ getComponent() [2/2]

static void org.turro.zkoss.dialog.SelectionDialog.getComponent ( Page  page,
String  title,
Component  component,
String  width,
String  height,
final Command  command 
)
static

Definition at line 126 of file SelectionDialog.java.

126  {
127  final SelectionDialog id = new SelectionDialog(title, component, DialogButton.getOkCancelButtons());
128  if(width != null) id.setWidth(width);
129  if(height != null) id.setHeight(height);
130  id.show(page, new Command() {
131  @Override
132  public Object execute(Context context) {
133  if(id.getPressedButton().equals(DialogButton.BUTTON_OK)) {
134  context.put("component", id.getComponent());
135  if(command != null) command.execute(context);
136  }
137  return null;
138  }
139  });
140  }
SelectionDialog(String title, Component component, Set< DialogButton > buttons)
Here is the call graph for this function:

◆ getPressedButton()

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

Definition at line 89 of file SelectionDialog.java.

89  {
90  return pressedButton;
91  }
Here is the caller graph for this function:

◆ popupComponent()

static void org.turro.zkoss.dialog.SelectionDialog.popupComponent ( Page  page,
String  title,
Component  component,
String  width,
String  height 
)
static

Definition at line 156 of file SelectionDialog.java.

156  {
157  SelectionDialog id = new SelectionDialog(title, component, DialogButton.getCloseButtons());
158  id.setMode("popup");
159  if(width != null) id.setWidth(width);
160  if(height != null) id.setHeight(height);
161  id.show(page, null);
162  }
Here is the call graph for this function:

◆ showComponent()

static void org.turro.zkoss.dialog.SelectionDialog.showComponent ( Page  page,
String  title,
Component  component,
String  width,
String  height,
final Command  command 
)
static

Definition at line 142 of file SelectionDialog.java.

142  {
143  final SelectionDialog id = new SelectionDialog(title, component, null);
144  if(width != null) id.setWidth(width);
145  if(height != null) id.setHeight(height);
146  id.show(page, new Command() {
147  @Override
148  public Object execute(Context context) {
149  context.put("component", id.getComponent());
150  if(command != null) command.execute(context);
151  return null;
152  }
153  });
154  }
Here is the call graph for this function:
Here is the caller graph for this function:

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