« Main Widgets » : différence entre les versions
Aller à la navigation
Aller à la recherche
Aucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 15 : | Ligne 15 : | ||
* [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GMenuBar.html GMenuBar], [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GMenu.html GMenu], [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GMenuItem.html GMenuItem] | * [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GMenuBar.html GMenuBar], [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GMenu.html GMenu], [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/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/ | 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 : | ||
# First, to declare the object, if possible as a global variable of the current class | # First, to declare the object, if possible as a global variable of the current class |
Version du 4 mai 2017 à 08:19
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
- [1], [2], GChoice, GMultipleChoice
- GComboBox, GComboBoxWithLabel
- [3], [4]
- [5], GEntryReal, GEntryString, GEntryDate
- GSliderWithLabel, GSliderRealWithLabel
- GTextArea (text over several lines), GConsole
- [6], [7], [8]
- 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);
}
};