« Main Widgets » : différence entre les versions

De GENIUS
Aller à la navigation Aller à la recherche
Aucun résumé des modifications
Aucun résumé des modifications
 
(10 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:


  * [[javadoc>fr/cnes/genius/current/fr/cnes/genius/lowLevel/GButton.html|GButton]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/lowLevel/GHyperlinkLabel.html|GHyperlinkLabel]]
* [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GButton.html GButton], [{{PathCurrentJavaDoc}}/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]]
* [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GLabel.html GLabel], [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GImage.html GImage], [{{PathCurrentJavaDoc}}/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]]
* [{{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]
  * [[javadoc>fr/cnes/genius/current/fr/cnes/genius/lowLevel/GComboBox.html|GComboBox]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GComboBoxWithLabel.html|GComboBoxWithLabel]]
* [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GComboBox.html GComboBox], [{{PathCurrentJavaDoc}}/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]]
* [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GPopupList.html GPopupList ], [{{PathCurrentJavaDoc}}/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]]
* [{{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]
  * [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GSliderWithLabel.html|GSliderWithLabel]], [[javadoc>fr/cnes/genius/current/fr/cnes/genius/highLevel/GSliderRealWithLabel.html|GSliderRealWithLabel]]
* [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GSliderWithLabel.html GSliderWithLabel], [{{PathCurrentJavaDoc}}/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]]
* [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GTextArea.html GTextArea] (text over several lines), [{{PathCurrentJavaDoc}}/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]]
* [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GEntryIntVector.html GEntryIntVector], [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GEntryRealVector.html GEntryRealVector], [{{PathCurrentJavaDoc}}/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]]
* [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GTable1D.html GTable1D], [{{PathCurrentJavaDoc}}/fr/cnes/genius/table/GTable2D.html GTable2D], [{{PathCurrentJavaDoc}}/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 ]]
* [{{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 [[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 :


  - 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
  - Then, to instantiate it, if possible inside the constructor 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)
# Eventually to customize it (see later how to do do it)
  - 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 [{{PathCurrentJavaDoc}}/fr/cnes/genius/highLevel/GEntryReal.html GEntryReal]


<syntaxhighlight lang="java">
<syntaxhighlight lang="java">
Ligne 46 : Ligne 46 :


[[WELCOME_TO_THE_GENIUS_WIKI|Return to the introduction ↑]]  
[[WELCOME_TO_THE_GENIUS_WIKI|Return to the introduction ↑]]  
[[Links_With_Swing|Go to the next page →]]
[[Links_with_Swing|Go to the next page →]]

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:

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 :

  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 →