skiadas / PanthR

Statistics front-end and webserver with R connection
1 stars 2 forks source link

Dialog Widgets #13

Open altermattw opened 11 years ago

altermattw commented 11 years ago

It will be desirable to create re-usable dialog components, which Ian called "widgets". When attached to a dialog, these widgets contribute to the "state" of the dialog by supplying their current settings. It should be possible to add Listeners to each of these, maybe using the onchange event. Each widget might have a default width and length that could be altered on construction.

Some examples:

  1. Variable list. A list of all the variables in a dataset. The top of the widget is a drop-down box of all available datasets. When a dataset is selected, the variable list is populated with all the variables in the dataset. Under the drop-down box is a text field which filters variables according to character sequences. For example, if you wanted to display just the variables with "qp" in their name, you would type "qp" in the filter box. During construction, this accepts parameters of "dataset" and "filter" to return the variables from a particular dataset and only variables that meet certain criteria (e.g., only factors, or only numeric variables).
  2. SingleVariableSelector. A single text box which can accept a single variable from a variable list. Can specify a title.
  3. MultiVariableSelector. A text field which can accept multiple variables from a variable list. Can specify a title.
  4. CheckBoxes. Creates a set of one or more checkboxes with text labels. Upon construction, can specify which boxes begin as checked. Can also specify a title, which would be printed above the checkboxes.
  5. RadioButtons. Creates a set of one or more radio buttons with text labels. Upon construction, can specify which option is selected. Can also specify a title, which would be printed above the checkboxes.
  6. TextBox. A text field where the user can type in something like a new variable name. Consider some default arguments on this such as checking for illegal characters or spaces. Can take a title which will be printed either above, to the left, to the right, or below the text box.
  7. Label. A text label, just in case you need to put this next to something that doesn't have a default text title or label.
  8. Canvas. A plotting area, with title possible.