Links with Swing

De GENIUS
Révision datée du 4 mai 2017 à 07:57 par Admin (discussion | contributions) (Page créée avec « <font color=#556B2F>'''GENIUS'''</font> classes use <font color=#FF8C00>swing</font> classes but are not directly inherited from them: strictly speaking, it is not recomme... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à la navigation Aller à la recherche

GENIUS classes use swing classes but are not directly inherited from them: strictly speaking, it is not recommended to directly use swing classes. For example, it will be recommanded to use [[javadoc>fr/cnes/genius/current/fr/cnes/genius/lowLevel/GPanel.html|GPanel]] rather than JPanel because, in that case, the « display » mechanism will not be effective.

Moreover, for certain methods, an over layer is proposed by GENIUS. For example, setEnabled(true/false) method is applicable for a GButton object.

But, in order not to be blocked, one can have direct calls to swing methods:

  • By a call to the swing object included in the **GENIUS** one as for example, with the getJButton() method which refer to the swing JButton object using by GButton;
GButton but = new GButton("button");
but.getJButton().setForeground(Color.BLUE);
  • By a call to swing widgets which do not need **GENIUS** mechanism as JOptionPane or JFileChooser.

Return to the introduction ↑ Go to the next page →