forked from Coded/SIPRP
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
2.4 KiB
99 lines
2.4 KiB
package siprp.higiene.gestao;
|
|
|
|
import info.clearthought.layout.TableLayout;
|
|
import info.clearthought.layout.TableLayoutConstraints;
|
|
|
|
import javax.swing.JPanel;
|
|
import javax.swing.JScrollPane;
|
|
import javax.swing.JTable;
|
|
import javax.swing.JTree;
|
|
import javax.swing.ListSelectionModel;
|
|
import javax.swing.event.ListSelectionListener;
|
|
import javax.swing.tree.DefaultMutableTreeNode;
|
|
import javax.swing.tree.DefaultTreeModel;
|
|
import javax.swing.tree.TreeSelectionModel;
|
|
|
|
import siprp.database.cayenne.objects.Empresas;
|
|
import siprp.database.cayenne.objects.Estabelecimentos;
|
|
|
|
import com.evolute.utils.tables.VectorTableModel;
|
|
|
|
import leaf.ui.LeafButton;
|
|
|
|
public class AdicionarEmailsPanel extends JPanel
|
|
{
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private final LeafButton buttonAdicionar = new LeafButton("Adicionar");
|
|
|
|
private final LeafButton buttonRemover = new LeafButton("Remover");
|
|
|
|
private final VectorTableModel<String> model = new VectorTableModel<String>( new String[]{ "" } );
|
|
|
|
private final JTable table = new JTable( model );
|
|
|
|
private final JScrollPane scroll = new JScrollPane( table );
|
|
|
|
public AdicionarEmailsPanel()
|
|
{
|
|
startupComponents();
|
|
setupLayout();
|
|
placeComponents();
|
|
startupListeners();
|
|
}
|
|
|
|
private void startupComponents()
|
|
{
|
|
buttonAdicionar.setEnabled( false );
|
|
buttonRemover.setEnabled( false );
|
|
table.getSelectionModel().setSelectionMode( ListSelectionModel.SINGLE_SELECTION );
|
|
}
|
|
|
|
private void setupLayout()
|
|
{
|
|
TableLayout layout = new TableLayout(
|
|
new double[]{ TableLayout.FILL },
|
|
new double[]{ TableLayout.MINIMUM, TableLayout.FILL }
|
|
);
|
|
layout.setHGap( 5 );
|
|
layout.setVGap( 5 );
|
|
setLayout( layout );
|
|
}
|
|
|
|
private void placeComponents()
|
|
{
|
|
JPanel panel = new JPanel();
|
|
TableLayout layout = new TableLayout(
|
|
new double[]{ TableLayout.MINIMUM, TableLayout.FILL, TableLayout.MINIMUM },
|
|
new double[]{ TableLayout.MINIMUM }
|
|
);
|
|
layout.setHGap( 5 );
|
|
layout.setVGap( 5 );
|
|
panel.setLayout( layout );
|
|
panel.add( buttonAdicionar, new TableLayoutConstraints( 0, 0 ) );
|
|
panel.add( buttonRemover, new TableLayoutConstraints( 2, 0 ) );
|
|
|
|
add( panel, new TableLayoutConstraints( 0, 0 ) );
|
|
add( scroll, new TableLayoutConstraints( 0, 1 ) );
|
|
}
|
|
|
|
private void startupListeners()
|
|
{
|
|
|
|
}
|
|
|
|
public void setEmpresa( Empresas empresa )
|
|
{
|
|
// TODO Auto-generated method stub
|
|
|
|
}
|
|
|
|
public void setEstabelecimento( Estabelecimentos estabelecimento )
|
|
{
|
|
// TODO Auto-generated method stub
|
|
|
|
}
|
|
|
|
}
|