diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/GerirEmpresaPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/GerirEmpresaPanel.java index c0f7891d..7ad642ab 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/GerirEmpresaPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/GerirEmpresaPanel.java @@ -41,7 +41,7 @@ public class GerirEmpresaPanel extends JPanel panelAreas.setBorder( BorderFactory.createTitledBorder( "Postos de trabalho" ) ); panelRiscos.setBorder( BorderFactory.createTitledBorder( "Riscos" ) ); panelEmails.setBorder( BorderFactory.createTitledBorder( "Emails" ) ); - panelLegislacao.setBorder( BorderFactory.createTitledBorder( "Legisla" + ccedil + otilde + "es" ) ); + panelLegislacao.setBorder( BorderFactory.createTitledBorder( "Legisla" + ccedil + atilde + "o" ) ); panelNormalizacao.setBorder( BorderFactory.createTitledBorder( "Normaliza" + ccedil + otilde + "es" ) ); panelEmails.setPreferredSize( new Dimension(0,150) ); } diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/GerirEquipamentosPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/GerirEquipamentosPanel.java index ba714cc8..848665ce 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/GerirEquipamentosPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/GerirEquipamentosPanel.java @@ -27,18 +27,15 @@ import javax.swing.tree.TreeSelectionModel; import leaf.ui.LeafButton; import leaf.ui.LeafError; import leaf.ui.LeafIconButton; +import leaf.ui.LeafUIConstants; import leaf.ui.TreeTools; import siprp.database.cayenne.objects.HsEquipamento; import siprp.logic.HigieneSegurancaLogic; -public class GerirEquipamentosPanel extends JPanel implements CaretListener +public class GerirEquipamentosPanel extends JPanel implements CaretListener, LeafUIConstants { private static final long serialVersionUID = 1L; - - private static final String ICON_NAME_SAVE = "leaf/ui/icons/save.png"; - - private static final String ICON_NAME_REVERT = "leaf/ui/icons/revert.png"; private LeafIconButton buttonSaveRequesito = LeafIconButton.createButton( ICON_NAME_SAVE ); @@ -56,9 +53,9 @@ public class GerirEquipamentosPanel extends JPanel implements CaretListener private final JTextField textModelo = new JTextField(20); - private final LeafButton buttonCriar = new LeafButton( "Criar" ); + private final LeafButton buttonCriar = LeafIconButton.createDefaultNewButton(); - private final LeafButton buttonRemover = new LeafButton( "Remover" ); + private final LeafButton buttonRemover = LeafIconButton.createDefaultRemoveButton(); private final DefaultMutableTreeNode root = new DefaultMutableTreeNode(); @@ -259,16 +256,16 @@ public class GerirEquipamentosPanel extends JPanel implements CaretListener TableLayout layout = new TableLayout( new double[] { TableLayout.MINIMUM, TableLayout.PREFERRED, TableLayout.FILL }, new double[] { - TableLayout.FILL + TableLayout.MINIMUM, TableLayout.FILL } ); layout.setHGap( 5 ); layout.setVGap( 5 ); setLayout( layout ); layout = new TableLayout( new double[] { - TableLayout.MINIMUM + TableLayout.MINIMUM, TableLayout.MINIMUM }, new double[] { - TableLayout.MINIMUM, TableLayout.MINIMUM + TableLayout.MINIMUM } ); layout.setHGap( 5 ); layout.setVGap( 5 ); @@ -289,7 +286,7 @@ public class GerirEquipamentosPanel extends JPanel implements CaretListener private void placeComponents() { panelButtons.add( buttonCriar, new TableLayoutConstraints( 0, 0 ) ); - panelButtons.add( buttonRemover, new TableLayoutConstraints( 0, 1 ) ); + panelButtons.add( buttonRemover, new TableLayoutConstraints( 1, 0 ) ); panelTree.add( scroll, new TableLayoutConstraints( 0, 0 ) ); @@ -303,8 +300,8 @@ public class GerirEquipamentosPanel extends JPanel implements CaretListener panelData.add( textModelo, new TableLayoutConstraints( 1, 3, 3, 3 ) ); add( panelButtons, new TableLayoutConstraints( 0, 0 ) ); - add( panelTree, new TableLayoutConstraints( 1, 0 ) ); - add( panelData, new TableLayoutConstraints( 2, 0 ) ); + add( panelTree, new TableLayoutConstraints( 0, 1, 1, 1 ) ); + add( panelData, new TableLayoutConstraints( 2, 1 ) ); } private void refresh() diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/GerirLegislacaoPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/GerirLegislacaoPanel.java index 02057160..2000b3b4 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/GerirLegislacaoPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/GerirLegislacaoPanel.java @@ -29,13 +29,15 @@ import javax.swing.tree.TreeSelectionModel; import leaf.data.Validator; import leaf.ui.LeafButton; import leaf.ui.LeafError; +import leaf.ui.LeafIconButton; import leaf.ui.LeafTextAreaEditor; +import leaf.ui.LeafUIConstants; import leaf.ui.TreeTools; import siprp.database.cayenne.objects.HsLegislacao; import siprp.database.cayenne.objects.HsLegislacaoCategoria; import siprp.logic.HigieneSegurancaLogic; -public class GerirLegislacaoPanel extends JPanel +public class GerirLegislacaoPanel extends JPanel implements LeafUIConstants { private static final long serialVersionUID = 1L; @@ -46,23 +48,23 @@ public class GerirLegislacaoPanel extends JPanel private final JPanel panelButtonsGeral = new JPanel(); - private final LeafButton buttonGeralCriar = new LeafButton( "Criar" ); + private final LeafButton buttonGeralCriar = LeafIconButton.createDefaultNewButton(); - private final LeafButton buttonGeralRemover = new LeafButton( "Remover" ); + private final LeafButton buttonGeralRemover = LeafIconButton.createDefaultRemoveButton(); private final JPanel panelButtonsCategoriasCategoria = new JPanel(); - private final LeafButton buttonCategoriaCriar = new LeafButton( "Criar" ); + private final LeafButton buttonCategoriaCriar = LeafIconButton.createDefaultNewButton(); - private final LeafButton buttonCategoriaEditar = new LeafButton( "Editar" ); + private final LeafButton buttonCategoriaEditar = LeafIconButton.createDefaultEditButton(); - private final LeafButton buttonCategoriaRemover = new LeafButton( "Remover" ); + private final LeafButton buttonCategoriaRemover = LeafIconButton.createDefaultRemoveButton(); private final JPanel panelButtonsCategoriasLegislacao = new JPanel(); - private final LeafButton buttonCategoriasLegislacaoCriar = new LeafButton( "Criar" ); + private final LeafButton buttonCategoriasLegislacaoCriar = LeafIconButton.createDefaultNewButton(); - private final LeafButton buttonCategoriasLegislacaoRemover = new LeafButton( "Remover" ); + private final LeafButton buttonCategoriasLegislacaoRemover = LeafIconButton.createDefaultRemoveButton(); private final DefaultMutableTreeNode rootGeral = new DefaultMutableTreeNode(); @@ -102,17 +104,17 @@ public class GerirLegislacaoPanel extends JPanel placeComponents(); setupListeners(); reload(); + setEnable(); } private void startupComponents() { panelGeral.setBorder( BorderFactory.createTitledBorder( "Legisla" + ccedil + atilde + "o de aplica" + ccedil + atilde + "o geral" ) ); - panelButtonsGeral.setBorder( BorderFactory.createTitledBorder( "Legisla" + ccedil + atilde + "o" ) ); - + panelCategorias.setBorder( BorderFactory.createTitledBorder( "Legisla" + ccedil + atilde + "o espec" + iacute + "fica" ) ); panelButtonsCategoriasCategoria.setBorder( BorderFactory.createTitledBorder( "Categoria" ) ); panelButtonsCategoriasLegislacao.setBorder( BorderFactory.createTitledBorder( "Legisla" + ccedil + atilde + "o" ) ); - + treeCategorias.setRootVisible( false ); treeGeral.setRootVisible( false ); treeCategorias.getSelectionModel().setSelectionMode( TreeSelectionModel.SINGLE_TREE_SELECTION ); @@ -136,19 +138,19 @@ public class GerirLegislacaoPanel extends JPanel panelGeral.setLayout( layout ); layout = new TableLayout( new double[] { - TableLayout.MINIMUM, TableLayout.FILL - }, new double[] { TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.FILL + }, new double[] { + TableLayout.MINIMUM, TableLayout.FILL } ); panelCategorias.setLayout( layout ); - layout = new GridLayout( 2, 1, 5, 5 ); + layout = new GridLayout( 1, 2, 5, 5 ); panelButtonsGeral.setLayout( layout ); - layout = new GridLayout( 3, 1, 5, 5 ); + layout = new GridLayout( 1, 4, 5, 5 ); panelButtonsCategoriasCategoria.setLayout( layout ); - layout = new GridLayout( 2, 1, 5, 5 ); + layout = new GridLayout( 1, 4, 5, 5 ); panelButtonsCategoriasLegislacao.setLayout( layout ); } @@ -160,16 +162,19 @@ public class GerirLegislacaoPanel extends JPanel panelButtonsCategoriasCategoria.add( buttonCategoriaCriar ); panelButtonsCategoriasCategoria.add( buttonCategoriaEditar ); panelButtonsCategoriasCategoria.add( buttonCategoriaRemover ); + panelButtonsCategoriasCategoria.add( new JPanel() ); panelButtonsCategoriasLegislacao.add( buttonCategoriasLegislacaoCriar ); panelButtonsCategoriasLegislacao.add( buttonCategoriasLegislacaoRemover ); + panelButtonsCategoriasLegislacao.add( new JPanel() ); + panelButtonsCategoriasLegislacao.add( new JPanel() ); panelGeral.add( panelButtonsGeral, new TableLayoutConstraints( 0, 0 ) ); - panelGeral.add( scrollGeral, new TableLayoutConstraints( 1, 0, 1, 1 ) ); + panelGeral.add( scrollGeral, new TableLayoutConstraints( 0, 1, 1, 1 ) ); panelCategorias.add( panelButtonsCategoriasCategoria, new TableLayoutConstraints( 0, 0 ) ); - panelCategorias.add( panelButtonsCategoriasLegislacao, new TableLayoutConstraints( 0, 1 ) ); - panelCategorias.add( scrollCategorias, new TableLayoutConstraints( 1, 0, 1, 2 ) ); + panelCategorias.add( panelButtonsCategoriasLegislacao, new TableLayoutConstraints( 1, 0 ) ); + panelCategorias.add( scrollCategorias, new TableLayoutConstraints( 0, 1, 2, 1 ) ); this.add( panelGeral, new TableLayoutConstraints( 0, 0 ) ); this.add( panelCategorias, new TableLayoutConstraints( 0, 1 ) ); diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/GerirNormalizacaoPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/GerirNormalizacaoPanel.java index e9f39397..0989c0c3 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/GerirNormalizacaoPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/GerirNormalizacaoPanel.java @@ -31,12 +31,14 @@ import javax.swing.tree.TreeSelectionModel; import leaf.data.Validator; import leaf.ui.LeafButton; import leaf.ui.LeafError; +import leaf.ui.LeafIconButton; import leaf.ui.LeafTextAreaEditor; +import leaf.ui.LeafUIConstants; import leaf.ui.TreeTools; import siprp.database.cayenne.objects.HsNormalizacao; import siprp.logic.HigieneSegurancaLogic; -public class GerirNormalizacaoPanel extends JPanel +public class GerirNormalizacaoPanel extends JPanel implements LeafUIConstants { private static final long serialVersionUID = 1L; @@ -47,19 +49,19 @@ public class GerirNormalizacaoPanel extends JPanel private final JPanel panelButtonsPortuguesa = new JPanel(); - private final LeafButton buttonPortuguesaCriar = new LeafButton( "Criar" ); + private final LeafButton buttonPortuguesaCriar = LeafIconButton.createDefaultNewButton(); - private final LeafButton buttonPortuguesaEditar = new LeafButton( "Editar" ); + private final LeafButton buttonPortuguesaEditar = LeafIconButton.createDefaultEditButton(); - private final LeafButton buttonPortuguesaRemover = new LeafButton( "Remover" ); + private final LeafButton buttonPortuguesaRemover = LeafIconButton.createDefaultRemoveButton(); private final JPanel panelButtonsInternacional = new JPanel(); - private final LeafButton buttonInternacionalCriar = new LeafButton( "Criar" ); + private final LeafButton buttonInternacionalCriar = LeafIconButton.createDefaultNewButton(); - private final LeafButton buttonInternacionalEditar = new LeafButton( "Editar" ); + private final LeafButton buttonInternacionalEditar = LeafIconButton.createDefaultEditButton(); - private final LeafButton buttonInternacionalRemover = new LeafButton( "Remover" ); + private final LeafButton buttonInternacionalRemover = LeafIconButton.createDefaultRemoveButton(); private final DefaultMutableTreeNode rootPortuguesa = new DefaultMutableTreeNode(); @@ -101,6 +103,7 @@ public class GerirNormalizacaoPanel extends JPanel placeComponents(); setupListeners(); reload(); + setEnable(); } private void startupComponents() @@ -145,10 +148,10 @@ public class GerirNormalizacaoPanel extends JPanel panelInternacional.setLayout( layout ); - layout = new GridLayout( 3, 1, 5, 5 ); + layout = new GridLayout( 1, 3, 5, 5 ); panelButtonsPortuguesa.setLayout( layout ); - layout = new GridLayout( 3, 1, 5, 5 ); + layout = new GridLayout( 1, 3, 5, 5 ); panelButtonsInternacional.setLayout( layout ); layout = new TableLayout( new double[] { @@ -172,10 +175,10 @@ public class GerirNormalizacaoPanel extends JPanel panelButtonsInternacional.add( buttonInternacionalRemover ); panelPortuguesa.add( panelButtonsPortuguesa, new TableLayoutConstraints( 0, 0 ) ); - panelPortuguesa.add( scrollPortuguesa, new TableLayoutConstraints( 1, 0, 1, 1 ) ); + panelPortuguesa.add( scrollPortuguesa, new TableLayoutConstraints( 0, 1, 1, 1 ) ); panelInternacional.add( panelButtonsInternacional, new TableLayoutConstraints( 0, 0 ) ); - panelInternacional.add( scrollInternacional, new TableLayoutConstraints( 1, 0, 1, 1 ) ); + panelInternacional.add( scrollInternacional, new TableLayoutConstraints( 0, 1, 1, 1 ) ); panelData.add( new JLabel("C" + oacute + "digo"), new TableLayoutConstraints( 0, 0 ) ); panelData.add( textCodigo, new TableLayoutConstraints( 1, 0 ) ); diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/GerirAreasPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/GerirAreasPanel.java index 42c6f0ce..4e2e5e14 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/GerirAreasPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/GerirAreasPanel.java @@ -29,6 +29,8 @@ import javax.swing.tree.TreeSelectionModel; import leaf.ui.LeafButton; import leaf.ui.LeafError; +import leaf.ui.LeafIconButton; +import leaf.ui.LeafUIConstants; import leaf.ui.TreeTools; import siprp.database.cayenne.objects.Empresas; import siprp.database.cayenne.objects.HsArea; @@ -36,7 +38,7 @@ import siprp.database.cayenne.objects.HsPosto; import siprp.logic.node.AreaNode; import siprp.logic.node.PostoNode; -public class GerirAreasPanel extends JPanel +public class GerirAreasPanel extends JPanel implements LeafUIConstants { private static final long serialVersionUID = 1L; @@ -45,17 +47,17 @@ public class GerirAreasPanel extends JPanel private final JPanel panelTree = new JPanel(); - public final LeafButton buttonAreaCriar = new LeafButton( "Criar" ); + public final LeafButton buttonAreaCriar = LeafIconButton.createDefaultNewButton(); - public final LeafButton buttonAreaEditar = new LeafButton( "Editar" ); + public final LeafButton buttonAreaEditar = LeafIconButton.createDefaultEditButton(); - public final LeafButton buttonAreaRemover = new LeafButton( "Remover" ); + public final LeafButton buttonAreaRemover = LeafIconButton.createDefaultRemoveButton(); - public final LeafButton buttonPostoCriar = new LeafButton( "Criar" ); + public final LeafButton buttonPostoCriar = LeafIconButton.createDefaultNewButton(); - public final LeafButton buttonPostoEditar = new LeafButton( "Editar" ); + public final LeafButton buttonPostoEditar = LeafIconButton.createDefaultEditButton(); - public final LeafButton buttonPostoRemover = new LeafButton( "Remover" ); + public final LeafButton buttonPostoRemover = LeafIconButton.createDefaultRemoveButton(); private final DefaultMutableTreeNode root = new DefaultMutableTreeNode(); @@ -117,7 +119,7 @@ public class GerirAreasPanel extends JPanel { JPanel panel = new JPanel(); panel.setBorder( BorderFactory.createTitledBorder( "Area" ) ); - panel.setLayout( new GridLayout( 3, 1 ) ); + panel.setLayout( new GridLayout( 1, 3 ) ); panel.add( buttonAreaCriar ); panel.add( buttonAreaEditar ); panel.add( buttonAreaRemover ); @@ -125,7 +127,7 @@ public class GerirAreasPanel extends JPanel panel = new JPanel(); panel.setBorder( BorderFactory.createTitledBorder( "Posto" ) ); - panel.setLayout( new GridLayout( 3, 1 ) ); + panel.setLayout( new GridLayout( 1, 3 ) ); panel.add( buttonPostoCriar ); panel.add( buttonPostoEditar ); panel.add( buttonPostoRemover ); diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/GerirRiscosPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/GerirRiscosPanel.java index 33c598a0..f7b2a532 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/GerirRiscosPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/GerirRiscosPanel.java @@ -27,6 +27,8 @@ import javax.swing.tree.TreeSelectionModel; import leaf.ui.LeafButton; import leaf.ui.LeafError; +import leaf.ui.LeafIconButton; +import leaf.ui.LeafUIConstants; import leaf.ui.TreeTools; import siprp.database.cayenne.objects.HsMedida; import siprp.database.cayenne.objects.HsRisco; @@ -34,7 +36,7 @@ import siprp.database.cayenne.objects.HsRiscoMedida; import siprp.database.cayenne.objects.HsRiscoTema; import siprp.logic.HigieneSegurancaLogic; -public class GerirRiscosPanel extends JPanel +public class GerirRiscosPanel extends JPanel implements LeafUIConstants { private static final long serialVersionUID = 1L; @@ -57,21 +59,21 @@ public class GerirRiscosPanel extends JPanel private final GerirMedidaPanel panelDataMedida = new GerirMedidaPanel(); - private final LeafButton buttonTemaCriar = new LeafButton( "Criar" ); + private final LeafButton buttonTemaCriar = LeafIconButton.createDefaultNewButton(); - private final LeafButton buttonTemaEditar = new LeafButton( "Editar" ); + private final LeafButton buttonTemaEditar = LeafIconButton.createDefaultEditButton(); - private final LeafButton buttonTemaRemover = new LeafButton( "Remover" ); + private final LeafButton buttonTemaRemover = LeafIconButton.createDefaultRemoveButton(); - private final LeafButton buttonRiscoCriar = new LeafButton( "Criar" ); + private final LeafButton buttonRiscoCriar = LeafIconButton.createDefaultNewButton(); - private final LeafButton buttonRiscoEditar = new LeafButton( "Editar" ); + private final LeafButton buttonRiscoEditar = LeafIconButton.createDefaultEditButton(); - private final LeafButton buttonRiscoRemover = new LeafButton( "Remover" ); + private final LeafButton buttonRiscoRemover = LeafIconButton.createDefaultRemoveButton(); - private final LeafButton buttonMedidaCriar = new LeafButton( "Criar" ); + private final LeafButton buttonMedidaCriar = LeafIconButton.createDefaultNewButton(); - private final LeafButton buttonMedidaRemover = new LeafButton( "Remover" ); + private final LeafButton buttonMedidaRemover = LeafIconButton.createDefaultRemoveButton(); private final DefaultMutableTreeNode root = new DefaultMutableTreeNode(); @@ -429,18 +431,18 @@ public class GerirRiscosPanel extends JPanel private void startupLayout() { TableLayout layout = new TableLayout( new double[] { - TableLayout.MINIMUM, TableLayout.PREFERRED, TableLayout.FILL + TableLayout.PREFERRED, TableLayout.FILL }, new double[] { - TableLayout.FILL + TableLayout.MINIMUM, TableLayout.FILL } ); layout.setHGap( 5 ); layout.setVGap( 5 ); setLayout( layout ); layout = new TableLayout( new double[] { - TableLayout.MINIMUM + TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL }, new double[] { - TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.FILL + TableLayout.MINIMUM } ); layout.setHGap( 5 ); layout.setVGap( 5 ); @@ -480,24 +482,25 @@ public class GerirRiscosPanel extends JPanel { JPanel panel = new JPanel(); panel.setBorder( BorderFactory.createTitledBorder( "Tema" ) ); - panel.setLayout( new GridLayout( 3, 1 ) ); + panel.setLayout( new GridLayout( 1, 3 ) ); panel.add( buttonTemaCriar ); panel.add( buttonTemaEditar ); panel.add( buttonTemaRemover ); panelButtons.add( panel, new TableLayoutConstraints( 0, 0 ) ); panel = new JPanel(); panel.setBorder( BorderFactory.createTitledBorder( "Risco" ) ); - panel.setLayout( new GridLayout( 3, 1 ) ); + panel.setLayout( new GridLayout( 1, 3 ) ); panel.add( buttonRiscoCriar ); panel.add( buttonRiscoEditar ); panel.add( buttonRiscoRemover ); - panelButtons.add( panel, new TableLayoutConstraints( 0, 1 ) ); + panelButtons.add( panel, new TableLayoutConstraints( 1, 0 ) ); panel = new JPanel(); panel.setBorder( BorderFactory.createTitledBorder( "Requisito" ) ); - panel.setLayout( new GridLayout( 2, 1 ) ); + panel.setLayout( new GridLayout( 1, 3 ) ); panel.add( buttonMedidaCriar ); panel.add( buttonMedidaRemover ); - panelButtons.add( panel, new TableLayoutConstraints( 0, 2 ) ); + panel.add( new JPanel() ); + panelButtons.add( panel, new TableLayoutConstraints( 2, 0 ) ); panelTree.add( scroll, new TableLayoutConstraints( 0, 0 ) ); @@ -506,8 +509,8 @@ public class GerirRiscosPanel extends JPanel panelData.add( panelDataMedida, PANEL_MEDIDA ); add( panelButtons, new TableLayoutConstraints( 0, 0 ) ); - add( panelTree, new TableLayoutConstraints( 1, 0 ) ); - add( panelData, new TableLayoutConstraints( 2, 0 ) ); + add( panelTree, new TableLayoutConstraints( 0, 1 ) ); + add( panelData, new TableLayoutConstraints( 1, 1 ) ); } private void selectCard() diff --git a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/PanelRelatorio.java b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/PanelRelatorio.java index da8c0e35..700034db 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/PanelRelatorio.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/PanelRelatorio.java @@ -85,7 +85,9 @@ public class PanelRelatorio extends JPanel implements CaretListener, ChangeListe private final PlanoActuacaoPanel panelPlano = new PlanoActuacaoPanel(); - private final RelatorioLegislacoesPanel panelLegislacao = new RelatorioLegislacoesPanel(); + private final RelatorioLegislacaoPanel panelLegislacao = new RelatorioLegislacaoPanel(); + + private final RelatorioNormalizacaoPanel panelNormalizacao = new RelatorioNormalizacaoPanel(); ButtonGroup bg = new ButtonGroup(); @@ -110,6 +112,11 @@ public class PanelRelatorio extends JPanel implements CaretListener, ChangeListe panelEquipamentos.setBorder( BorderFactory.createTitledBorder( "Equipamentos de medi"+ccedil+atilde+"o" ) ); tabs.addTab( "Plano de actua" + ccedil + atilde + "o", panelPlano ); tabs.addTab( "Legisla" + ccedil + atilde + "o", panelLegislacao ); + tabs.addTab( "Normaliza" + ccedil + atilde + "o", panelNormalizacao ); + tabs.setEnabledAt( 1, false ); + tabs.setEnabledAt( 2, false ); + buttonSave.setToolTipText( "Guardar" ); + buttonRevert.setToolTipText( "Reverter" ); } private void startupLayout() diff --git a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/RelatorioLegislacoesPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/RelatorioLegislacaoPanel.java similarity index 68% rename from trunk/SIPRPSoft/src/siprp/higiene/relatorio/RelatorioLegislacoesPanel.java rename to trunk/SIPRPSoft/src/siprp/higiene/relatorio/RelatorioLegislacaoPanel.java index a95ff703..ed0dea95 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/RelatorioLegislacoesPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/RelatorioLegislacaoPanel.java @@ -2,7 +2,7 @@ package siprp.higiene.relatorio; import javax.swing.JPanel; -public class RelatorioLegislacoesPanel extends JPanel +public class RelatorioLegislacaoPanel extends JPanel { private static final long serialVersionUID = 1L; diff --git a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/RelatorioNormalizacaoPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/RelatorioNormalizacaoPanel.java new file mode 100644 index 00000000..ddd10942 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/RelatorioNormalizacaoPanel.java @@ -0,0 +1,10 @@ +package siprp.higiene.relatorio; + +import javax.swing.JPanel; + +public class RelatorioNormalizacaoPanel extends JPanel +{ + + private static final long serialVersionUID = 1L; + +} diff --git a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/revert.png b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/revert.png index 72b49ea9..f7e5f935 100644 Binary files a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/revert.png and b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/revert.png differ diff --git a/trunk/common/src/leaf/ui/LeafIconButton.java b/trunk/common/src/leaf/ui/LeafIconButton.java index ec5dfe8c..b943d67f 100644 --- a/trunk/common/src/leaf/ui/LeafIconButton.java +++ b/trunk/common/src/leaf/ui/LeafIconButton.java @@ -5,7 +5,7 @@ import java.awt.Insets; import com.evolute.utils.images.ImageException; import com.evolute.utils.images.ImageIconLoader; -public class LeafIconButton extends LeafButton +public class LeafIconButton extends LeafButton implements LeafUIConstants { private static final long serialVersionUID = 1L; @@ -14,6 +14,27 @@ public class LeafIconButton extends LeafButton super(ImageIconLoader.loadImageIcon( imagePath )); } + public static LeafIconButton createDefaultNewButton() + { + LeafIconButton result = createButton( ICON_NAME_CREATE ); + result.setToolTipText( "Criar" ); + return result; + } + + public static LeafIconButton createDefaultEditButton() + { + LeafIconButton result = createButton( ICON_NAME_EDIT ); + result.setToolTipText( "Editar" ); + return result; + } + + public static LeafIconButton createDefaultRemoveButton() + { + LeafIconButton result = createButton( ICON_NAME_REMOVE ); + result.setToolTipText( "Remover" ); + return result; + } + public static LeafIconButton createButton( String imagePath ) { LeafIconButton result = null; diff --git a/trunk/common/src/leaf/ui/LeafUIConstants.java b/trunk/common/src/leaf/ui/LeafUIConstants.java new file mode 100644 index 00000000..5e4817c6 --- /dev/null +++ b/trunk/common/src/leaf/ui/LeafUIConstants.java @@ -0,0 +1,15 @@ +package leaf.ui; + +public interface LeafUIConstants +{ + public static final String ICON_NAME_CREATE = "leaf/ui/icons/create.png"; + + public static final String ICON_NAME_EDIT = "leaf/ui/icons/edit.png"; + + public static final String ICON_NAME_REMOVE = "leaf/ui/icons/delete.png"; + + public static final String ICON_NAME_SAVE = "leaf/ui/icons/save.png"; + + public static final String ICON_NAME_REVERT = "leaf/ui/icons/revert.png"; + +} diff --git a/trunk/common/src/leaf/ui/icons/create.png b/trunk/common/src/leaf/ui/icons/create.png new file mode 100644 index 00000000..d149d546 Binary files /dev/null and b/trunk/common/src/leaf/ui/icons/create.png differ diff --git a/trunk/common/src/leaf/ui/icons/delete.png b/trunk/common/src/leaf/ui/icons/delete.png new file mode 100644 index 00000000..312bb3f5 Binary files /dev/null and b/trunk/common/src/leaf/ui/icons/delete.png differ diff --git a/trunk/common/src/leaf/ui/icons/edit.png b/trunk/common/src/leaf/ui/icons/edit.png new file mode 100644 index 00000000..35d01513 Binary files /dev/null and b/trunk/common/src/leaf/ui/icons/edit.png differ