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.
85 lines
2.8 KiB
85 lines
2.8 KiB
package siprp.higiene.gestao;
|
|
|
|
import static com.evolute.utils.strings.UnicodeLatin1Map.atilde;
|
|
import static com.evolute.utils.strings.UnicodeLatin1Map.ccedil;
|
|
import static com.evolute.utils.strings.UnicodeLatin1Map.otilde;
|
|
import info.clearthought.layout.TableLayout;
|
|
import info.clearthought.layout.TableLayoutConstraints;
|
|
|
|
import java.awt.Dimension;
|
|
|
|
import javax.swing.BorderFactory;
|
|
|
|
import shst.data.outer.EmpresasData;
|
|
import siprp.higiene.gestao.email.AdicionarEmailsPanel;
|
|
import siprp.higiene.gestao.legislacao.AdicionarLegislacaoPanel;
|
|
import siprp.higiene.gestao.normalizacao.AdicionarNormalizacaoPanel;
|
|
import siprp.higiene.gestao.postos.GerirAreasPanel;
|
|
import siprp.higiene.gestao.riscos.AdicionarRiscosPanel;
|
|
|
|
public class GerirEmpresaPanel extends SIPRPLazyLoadedPanel
|
|
{
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private final GerirAreasPanel panelAreas = new GerirAreasPanel();
|
|
private final AdicionarRiscosPanel panelRiscos = new AdicionarRiscosPanel();
|
|
private final AdicionarEmailsPanel panelEmails = new AdicionarEmailsPanel();
|
|
private final AdicionarLegislacaoPanel panelLegislacao = new AdicionarLegislacaoPanel();
|
|
private final AdicionarNormalizacaoPanel panelNormalizacao = new AdicionarNormalizacaoPanel();
|
|
|
|
public GerirEmpresaPanel()
|
|
{
|
|
startupComponents();
|
|
setupLayout();
|
|
placeComponents();
|
|
startupListeners();
|
|
}
|
|
|
|
private void startupComponents()
|
|
{
|
|
panelAreas.setBorder( BorderFactory.createTitledBorder( "Postos de trabalho" ) );
|
|
panelRiscos.setBorder( BorderFactory.createTitledBorder( "Riscos" ) );
|
|
panelEmails.setBorder( BorderFactory.createTitledBorder( "Emails" ) );
|
|
panelLegislacao.setBorder( BorderFactory.createTitledBorder( "Legisla" + ccedil + atilde + "o" ) );
|
|
panelNormalizacao.setBorder( BorderFactory.createTitledBorder( "Normaliza" + ccedil + otilde + "es" ) );
|
|
panelEmails.setPreferredSize( new Dimension(0,150) );
|
|
}
|
|
|
|
private void setupLayout()
|
|
{
|
|
double [] cols = new double[]{ TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, };
|
|
double [] rows = new double[]{ TableLayout.FILL, TableLayout.FILL };
|
|
TableLayout layout = new TableLayout( cols, rows );
|
|
layout.setHGap( 5 );
|
|
layout.setVGap( 5 );
|
|
this.setLayout( layout );
|
|
}
|
|
|
|
private void placeComponents()
|
|
{
|
|
this.add( panelAreas, new TableLayoutConstraints( 0, 0, 0, 1 ) );
|
|
this.add( panelRiscos, new TableLayoutConstraints( 1, 0, 1, 1 ) );
|
|
this.add( panelLegislacao, new TableLayoutConstraints( 2, 0 ) );
|
|
this.add( panelNormalizacao, new TableLayoutConstraints( 2, 1 ) );
|
|
}
|
|
|
|
private void startupListeners()
|
|
{
|
|
}
|
|
|
|
public void setEmpresa( EmpresasData empresa )
|
|
{
|
|
panelAreas.setEmpresa( empresa );
|
|
panelLegislacao.setEmpresa( empresa );
|
|
panelRiscos.setEmpresa( empresa );
|
|
panelNormalizacao.setEmpresa( empresa );
|
|
}
|
|
|
|
@Override
|
|
protected void refresh()
|
|
{
|
|
}
|
|
|
|
}
|