001: /*
002: * SalomeTMF is a Test Management Framework
003: * Copyright (C) 2005 France Telecom R&D
004: *
005: * This library is free software; you can redistribute it and/or
006: * modify it under the terms of the GNU Lesser General Public
007: * License as published by the Free Software Foundation; either
008: * version 2 of the License, or (at your option) any later version.
009: *
010: * This library is distributed in the hope that it will be useful,
011: * but WITHOUT ANY WARRANTY; without even the implied warranty of
012: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
013: * Lesser General Public License for more details.
014: *
015: * You should have received a copy of the GNU Lesser General Public
016: * License along with this library; if not, write to the Free Software
017: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
018: *
019: * @author Fayçal SOUGRATI, Vincent Pautret, Marche Mikael
020: *
021: * Contact: mikael.marche@rd.francetelecom.com
022: */
023:
024: package org.objectweb.salome_tmf.ihm;
025:
026: import java.awt.BorderLayout;
027: import java.awt.Container;
028: import java.awt.FlowLayout;
029: import java.awt.event.ActionEvent;
030: import java.awt.event.ActionListener;
031:
032: import javax.swing.BoxLayout;
033: import javax.swing.ButtonGroup;
034: import javax.swing.JButton;
035: import javax.swing.JDialog;
036: import javax.swing.JLabel;
037: import javax.swing.JPanel;
038: import javax.swing.JRadioButton;
039:
040: import org.objectweb.salome_tmf.ihm.languages.Language;
041:
042: /**
043: * Classe repr?sentatn la vue permettant de choisir les filtres d'ex?cution
044: * @author teaml039
045: * @version 0.1
046: */
047: public class ExecutionFilter extends JDialog {
048:
049: /******************************************************************************/
050: /** CONSTRUCTEUR ***/
051: /******************************************************************************/
052:
053: /**
054: * Constructeur de la vue
055: */
056: public ExecutionFilter() {
057:
058: super (SalomeTMF.ptrFrame, true);
059:
060: JLabel message = new JLabel(Language.getInstance().getText(
061: "Filtrer_par_:_"));
062:
063: //Create the radio buttons.
064: JRadioButton environment = new JRadioButton(Language
065: .getInstance().getText("Environnement"));
066: environment.addActionListener(new ActionListener() {
067: public void actionPerformed(ActionEvent e) {
068:
069: }
070: });
071:
072: JRadioButton data = new JRadioButton(Language.getInstance()
073: .getText("Jeu_de_données"));
074: data.addActionListener(new ActionListener() {
075: public void actionPerformed(ActionEvent e) {
076:
077: }
078: });
079:
080: JRadioButton date = new JRadioButton(Language.getInstance()
081: .getText("Date_de_création"));
082: date.addActionListener(new ActionListener() {
083: public void actionPerformed(ActionEvent e) {
084:
085: }
086: });
087:
088: //Group the radio buttons.
089: ButtonGroup buttonGroup = new ButtonGroup();
090: buttonGroup.add(environment);
091: buttonGroup.add(data);
092: buttonGroup.add(date);
093:
094: JPanel radioButtonPanel = new JPanel();
095: radioButtonPanel.setLayout(new BoxLayout(radioButtonPanel,
096: BoxLayout.Y_AXIS));
097: radioButtonPanel.add(environment);
098: radioButtonPanel.add(data);
099: radioButtonPanel.add(date);
100:
101: JPanel radioPanel = new JPanel(
102: new FlowLayout(FlowLayout.CENTER));
103: radioPanel.add(message);
104: radioPanel.add(radioButtonPanel);
105:
106: //les boutons
107: JButton validate = new JButton(Language.getInstance().getText(
108: "Valider"));
109: validate.setToolTipText(Language.getInstance().getText(
110: "Valider"));
111: validate.addActionListener(new ActionListener() {
112: public void actionPerformed(ActionEvent e) {
113: ExecutionFilter.this .dispose();
114: }
115: });
116:
117: JButton cancel = new JButton(Language.getInstance().getText(
118: "Annuler"));
119: cancel
120: .setToolTipText(Language.getInstance().getText(
121: "Annuler"));
122: cancel.addActionListener(new ActionListener() {
123: public void actionPerformed(ActionEvent e) {
124: ExecutionFilter.this .dispose();
125: }
126: });
127:
128: JPanel buttonPanel = new JPanel(
129: new FlowLayout(FlowLayout.RIGHT));
130: buttonPanel.add(validate);
131: buttonPanel.add(cancel);
132:
133: JPanel view = new JPanel(new BorderLayout());
134: view.add(radioPanel, BorderLayout.NORTH);
135: view.add(buttonPanel, BorderLayout.SOUTH);
136:
137: Container contentPaneFrame = this .getContentPane();
138: contentPaneFrame.add(view, BorderLayout.CENTER);
139: this .setLocation(500, 400);
140: this .setTitle(Language.getInstance().getText("Filtrage"));
141: this .pack();
142: this .setVisible(true);
143:
144: } // Fin du constructeur ExecutionFilter/0
145:
146: } // Fin de la classe ExecutionFilter
|