Main Widgets : Différence entre versions

De Wiki
Aller à : navigation, rechercher
Ligne 2 : Ligne 2 :
  
 
Here are some of such available widgets:
 
Here are some of such available widgets:
 
[https://logiciels-pp.cst.cnes.fr/sites/default/files/javadoc/1491391747/documentation/fr/cnes/genius/lowLevel/GFrame.html GFrame]
 
  
 
* [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/lowLevel/GButton.html GButton], [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/lowLevel/GHyperlinkLabel.html GHyperlinkLabel]
 
* [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/lowLevel/GButton.html GButton], [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/lowLevel/GHyperlinkLabel.html GHyperlinkLabel]
* [[javadoc>fr/cnes/genius/current/fr/cnes/genius/lowLevel/GLabel.html|GLabel]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/lowLevel/GImage.html|GImage]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/lowLevel/GSeparator.html|GSeparator]]
+
* [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/lowLevel/GLabel.html GLabel], [[http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/lowLevel/GImage.html GImage]], [javadoc>fr/cnes/genius/current/fr/cnes/genius/lowLevel/GSeparator.html GSeparator]
* [[javadoc>fr/cnes/genius/current/fr/cnes/genius/lowLevel/GRadioButton.html|GRadioButton]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/lowLevel/GCheckBox.html|GCheckBox]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GChoice.html|GChoice]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GMultipleChoice.html|GMultipleChoice]]
+
* [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/lowLevel/GRadioButton.html|GRadioButton], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/lowLevel/GCheckBox.html|GCheckBox]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GChoice.html GChoice], [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GMultipleChoice.html GMultipleChoice]
* [[javadoc>fr/cnes/genius/current/fr/cnes/genius/lowLevel/GComboBox.html|GComboBox]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GComboBoxWithLabel.html|GComboBoxWithLabel]]
+
* [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/lowLevel/GComboBox.html GComboBox], [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GComboBoxWithLabel.html GComboBoxWithLabel]
* [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GPopupList.html|GPopupList ]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GPopupListWithLabel.html|GPopupListWithLabel]]
+
* [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GPopupList.html|GPopupList ], [[http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GPopupListWithLabel.html|GPopupListWithLabel]
* [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryInt.html|GEntryInt]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryReal.html|GEntryReal]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryString.html|GEntryString]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryDate.html|GEntryDate]]
+
* [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryInt.html|GEntryInt]], [[http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryReal.html GEntryReal], [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryString.html GEntryString], [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryDate.html GEntryDate]
* [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GSliderWithLabel.html|GSliderWithLabel]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GSliderRealWithLabel.html|GSliderRealWithLabel]]
+
* [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GSliderWithLabel.html GSliderWithLabel], [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GSliderRealWithLabel.html GSliderRealWithLabel]
* [[javadoc>fr/cnes/genius/current/fr/cnes/genius/lowLevel/GTextArea.html|GTextArea]] (text over several lines), [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GConsole.html|GConsole]]
+
* [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/lowLevel/GTextArea.html GTextArea] (text over several lines), [[http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GConsole.html GConsole]
* [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryIntVector.html|GEntryIntVector]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryRealVector.html|GEntryRealVector]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryDateVector.html|GEntryDateVector]]
+
* [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryIntVector.html|GEntryIntVector]], [[http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryRealVector.html|GEntryRealVector]], [javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryDateVector.html|GEntryDateVector]
* [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GTable1D.html|GTable1D]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/table/GTable2D.html|GTable2D]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GComponentList.html|GComponentList]]
+
* [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GTable1D.html GTable1D], [[http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/table/GTable2D.html GTable2D], [javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GComponentList.html GComponentList]
* [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GMenuBar.html|GMenuBar]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GMenu.html|GMenu]], [[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 [[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 [[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 24 : 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 [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryReal.html|GEntryReal]]
+
We can see below a very short example based on a [http://tu-dctsb-p02.cst.cnes.fr/javadoc/fr/cnes/genius/current/fr/cnes/genius/highLevel/GEntryReal.html GEntryReal]
  
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">

Version du 4 mai 2017 à 08:15

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:

We do not explain how to use each item of this widget list. To do that, refer to the [[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 :

  1. First, to declare the object, if possible as a global variable of the current class
  2. Then, to instantiate it, if possible inside the constructor of the current class
  3. Eventually to customize it (see later how to do do it)
  4. 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);
  }
 
};

Return to the introduction ↑ Go to the next page →