forked from Coded/SIPRP
				
			no message
	
		
	
				
					
				
			git-svn-id: https://svn.coded.pt/svn/SIPRP@301 bb69d46d-e84e-40c8-a05a-06db0d633741
							parent
							
								
									23e4047da4
								
							
						
					
					
						commit
						ee2855aa36
					
				| @ -0,0 +1,115 @@ | |||||||
|  | /* | ||||||
|  |  * LembretesWindow.java | ||||||
|  |  * | ||||||
|  |  * Created on 13 de Fevereiro de 2007, 11:11 | ||||||
|  |  * | ||||||
|  |  * To change this template, choose Tools | Template Manager | ||||||
|  |  * and open the template in the editor. | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | package siprp.lembretes; | ||||||
|  | 
 | ||||||
|  | import java.awt.*; | ||||||
|  | import java.awt.event.ActionEvent; | ||||||
|  | import javax.swing.*; | ||||||
|  | 
 | ||||||
|  | import com.evolute.utils.tables.*; | ||||||
|  | import com.evolute.utils.tracker.TrackableWindow; | ||||||
|  | import java.awt.event.ActionListener; | ||||||
|  | import java.awt.event.WindowAdapter; | ||||||
|  | import java.awt.event.WindowEvent; | ||||||
|  | import javax.swing.event.ListSelectionEvent; | ||||||
|  | import javax.swing.event.ListSelectionListener; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * | ||||||
|  |  * @author Frederico | ||||||
|  |  */ | ||||||
|  | public class LembretesWindow extends JFrame | ||||||
|  | 	implements ActionListener, TrackableWindow, ListSelectionListener | ||||||
|  | { | ||||||
|  | 	public static final String TITLE = "Lembretes"; | ||||||
|  | 	 | ||||||
|  | 	protected VectorTableModel tiposModel; | ||||||
|  | 	protected BaseTable tiposTable; | ||||||
|  | 	protected JPanel lembretesPanel; | ||||||
|  | 	 | ||||||
|  | 	/** Creates a new instance of LembretesWindow */ | ||||||
|  | 	public LembretesWindow() | ||||||
|  | 	{ | ||||||
|  | 		setupComponents(); | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
|  | 	private void setupComponents() | ||||||
|  | 	{ | ||||||
|  | 		tiposModel = new VectorTableModel( new String[]{ "tipo", "quantidade" } ); | ||||||
|  | 		tiposTable = new BaseTable( tiposModel ); | ||||||
|  | 		tiposTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION ); | ||||||
|  | 		tiposTable.fixColumnWidth( 0, 200 ); | ||||||
|  | 		tiposTable.fixColumnWidth( 1, 100 ); | ||||||
|  | 		tiposTable.getSelectionModel().addListSelectionListener( this ); | ||||||
|  | 		JScrollPane scp = | ||||||
|  | 			new JScrollPane( tiposTable, JScrollPane.VERTICAL_SCROLLBAR_NEVER, | ||||||
|  | 			JScrollPane.HORIZONTAL_SCROLLBAR_NEVER ); | ||||||
|  | 		scp.setPreferredSize( new Dimension( 300, 20 ) ); | ||||||
|  | 		lembretesPanel = new JPanel(); | ||||||
|  | 		 | ||||||
|  | 		getContentPane().setLayout( new BorderLayout() ); | ||||||
|  | 		getContentPane().add( scp, BorderLayout.WEST ); | ||||||
|  | 		getContentPane().add( lembretesPanel, BorderLayout.CENTER ); | ||||||
|  | 		 | ||||||
|  | 		addWindowListener( new WindowAdapter(){ | ||||||
|  | 			public void windowClosing( WindowEvent e ) | ||||||
|  | 			{ | ||||||
|  | 				close(); | ||||||
|  | 			} | ||||||
|  | 			 | ||||||
|  | 			public void windowOpened( WindowEvent e ) | ||||||
|  | 			{ | ||||||
|  | 				setExtendedState( getExtendedState() | MAXIMIZED_BOTH ); | ||||||
|  | 			} | ||||||
|  | 		} ); | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
|  | 	public void refresh() | ||||||
|  | 	{ | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public void open() | ||||||
|  | 	{ | ||||||
|  | 		setVisible( true ); | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
|  | 	public void close() | ||||||
|  | 	{ | ||||||
|  | 		SwingUtilities.invokeLater( new Runnable() { | ||||||
|  | 			public void run() | ||||||
|  | 			{ | ||||||
|  | 				setVisible( false ); | ||||||
|  | 				dispose(); | ||||||
|  | 			} | ||||||
|  | 		} ); | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
|  | 	protected void reloadTotais() | ||||||
|  | 	{ | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
|  | 	protected void reloadLembretes() | ||||||
|  | 	{ | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public boolean closeIfPossible() | ||||||
|  | 	{ | ||||||
|  | 		close(); | ||||||
|  | 		return true; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public void actionPerformed(ActionEvent e) | ||||||
|  | 	{ | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public void valueChanged(ListSelectionEvent e) | ||||||
|  | 	{ | ||||||
|  | 	} | ||||||
|  | } | ||||||
					Loading…
					
					
				
		Reference in new issue