no message

git-svn-id: https://svn.coded.pt/svn/SIPRP@277 bb69d46d-e84e-40c8-a05a-06db0d633741
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Frederico Palma 19 years ago
parent 14a0a6f221
commit 82f6bc9709

@ -0,0 +1,102 @@
/*
* DetalhesRealizacaoDialog.java
*
* Created on February 1, 2007, 11:19 AM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package siprp.medicina.presencas;
import com.evolute.utils.data.IDObject;
import com.evolute.utils.ui.CustomJDialog;
import com.evolute.utils.ui.panel.CheckBoxPanel;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
/**
*
* @author fpalma
*/
public class DetalhesRealizacaoDialog extends CustomJDialog
implements ActionListener
{
protected JButton okButton;
protected JButton cancelButton;
protected CheckBoxPanel opcoesPanel;
protected IDObject opcoes[];
protected Integer selected[];
/** Creates a new instance of DetalhesRealizacaoDialog */
public DetalhesRealizacaoDialog( JFrame owner, IDObject opcoes[] )
{
super( owner, true );
this.opcoes = opcoes;
setupComponents();
if( owner != null )
{
centerSuper();
}
else
{
center();
}
}
private void setupComponents()
{
setTitle( "Escolha os ECD's realizados" );
okButton = new JButton( "OK" );
okButton.addActionListener( this );
cancelButton = new JButton( "Cancelar" );
cancelButton.addActionListener( this );
opcoesPanel = new CheckBoxPanel( opcoes );
setLayout( new BorderLayout() );
add( opcoesPanel, BorderLayout.CENTER );
JPanel buttonPanel = new JPanel();
add( buttonPanel, BorderLayout.SOUTH );
buttonPanel.setLayout( new FlowLayout( FlowLayout.RIGHT ) );
buttonPanel.add( okButton );
buttonPanel.add( cancelButton );
setSize( 250, 300 );
}
public void actionPerformed(ActionEvent e)
{
Object source = e.getSource();
if( source.equals( okButton ) )
{
selected = opcoesPanel.getSelected();
close();
}
else if( source.equals( cancelButton ) )
{
close();
}
}
public void close()
{
SwingUtilities.invokeLater( new Runnable(){
public void run()
{
setVisible( false );
dispose();
}
} );
}
public Integer[] getSelected()
{
return selected;
}
}
Loading…
Cancel
Save