« Main Widgets » : différence entre les versions
Aller à la navigation
Aller à la recherche
m (Admin a déplacé la page Main Widget vers Main Widgets sans laisser de redirection) |
Aucun résumé des modifications |
||
(3 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
We find basic classes needed to build a scientific tool <font color=#FF8C00>GUI</font> … in particular entering <font color=#FF0000>'''real data with units'''</font> !!! | We find basic classes needed to build a scientific tool <font color=#FF8C00 title="Graphical User Interface">GUI</font> … in particular entering <font color=#FF0000>'''real data with units'''</font> !!! | ||
Here are some of such available widgets: | Here are some of such available widgets: | ||
* [ | * [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GButton.html GButton], [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GHyperlinkLabel.html GHyperlinkLabel] | ||
* [ | * [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GLabel.html GLabel], [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GImage.html GImage], [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GSeparator.html GSeparator] | ||
* [ | * [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GRadioButton.html GRadioButton], [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GCheckBox.html GCheckBox], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GChoice.html GChoice], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GMultipleChoice.html GMultipleChoice] | ||
* [ | * [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GComboBox.html GComboBox], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GComboBoxWithLabel.html GComboBoxWithLabel] | ||
* [ | * [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GPopupList.html GPopupList ], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GPopupListWithLabel.html GPopupListWithLabel] | ||
* [ | * [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GEntryInt.html GEntryInt], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GEntryReal.html GEntryReal], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GEntryString.html GEntryString], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GEntryDate.html GEntryDate] | ||
* [ | * [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GSliderWithLabel.html GSliderWithLabel], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GSliderRealWithLabel.html GSliderRealWithLabel] | ||
* [ | * [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GTextArea.html GTextArea] (text over several lines), [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GConsole.html GConsole] | ||
* [ | * [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GEntryIntVector.html GEntryIntVector], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GEntryRealVector.html GEntryRealVector], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GEntryDateVector.html GEntryDateVector] | ||
* [ | * [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GTable1D.html GTable1D], [{{PathCurrentJavaDoc}}/fr/cnes/genius/table/GTable2D.html GTable2D], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GComponentList.html GComponentList] | ||
* [ | * [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GMenuBar.html GMenuBar], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GMenu.html GMenu], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GMenuItem.html GMenuItem] | ||
We do not explain how to use each item of this widget list. To do that, refer to the [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/ GENIUS javadoc]. Moreover, we saw at the previous page how to manage a simple button. So, the principle is very simple : | We do not explain how to use each item of this widget list. To do that, refer to the [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/ GENIUS javadoc]. Moreover, we saw at the previous page how to manage a simple button. So, the principle is very simple : | ||
Ligne 22 : | Ligne 22 : | ||
# At last, use it, at list for display by "putting" it in the <font color=#4169E1>display()</font> or <font color=#4169E1>generic()</font> method | # At last, use it, at list for display by "putting" it in the <font color=#4169E1>display()</font> or <font color=#4169E1>generic()</font> method | ||
We can see below a very short example based on a [ | We can see below a very short example based on a [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GEntryReal.html GEntryReal] | ||
<syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> |
Dernière version du 10 juillet 2017 à 07:50
We find basic classes needed to build a scientific tool GUI … in particular entering real data with units !!!
Here are some of such available widgets:
- GButton, GHyperlinkLabel
- GLabel, GImage, GSeparator
- GRadioButton, GCheckBox, GChoice, GMultipleChoice
- GComboBox, GComboBoxWithLabel
- GPopupList , GPopupListWithLabel
- GEntryInt, GEntryReal, GEntryString, GEntryDate
- GSliderWithLabel, GSliderRealWithLabel
- GTextArea (text over several lines), GConsole
- GEntryIntVector, GEntryRealVector, GEntryDateVector
- GTable1D, GTable2D, GComponentList
- GMenuBar, GMenu, GMenuItem
We do not explain how to use each item of this widget list. To do that, refer to the GENIUS javadoc. Moreover, we saw at the previous page how to manage a simple button. So, the principle is very simple :
- First, to declare the object, if possible as a global variable of the current class
- Then, to instantiate it, if possible inside the constructor of the current class
- Eventually to customize it (see later how to do do it)
- At last, use it, at list for display by "putting" it in the display() or generic() method
We can see below a very short example based on a GEntryReal
public class MyPanel extends GPanel {
private GEntryReal myReal;
public MyPanel () {
myReal= new GEntryReal("This is a real:", 123.); // First value displayed will be 123.0
myReal.setCurrentFormat(GRealField.Format.SCIENTIFIC);
}
public void display() {
generic();
}
public void generic() throws GException {
put(myReal);
}
};