From 427451225008ad0aa3a7e60d0b1d7248037f1214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Sim=C3=A3o?= Date: Thu, 29 Jan 2009 20:10:21 +0000 Subject: [PATCH] git-svn-id: https://svn.coded.pt/svn/SIPRP@930 bb69d46d-e84e-40c8-a05a-06db0d633741 --- .../higiene/gestao/GerirEmpresaPanel.java | 2 +- .../equipamentos/GerirEquipamentosPanel.java | 23 ++++------ .../legislacao/GerirLegislacaoPanel.java | 43 ++++++++++-------- .../normalizacao/GerirNormalizacaoPanel.java | 25 +++++----- .../gestao/postos/GerirAreasPanel.java | 20 ++++---- .../gestao/riscos/GerirRiscosPanel.java | 43 ++++++++++-------- .../higiene/relatorio/PanelRelatorio.java | 9 +++- ...nel.java => RelatorioLegislacaoPanel.java} | 2 +- .../relatorio/RelatorioNormalizacaoPanel.java | 10 ++++ .../src/siprp/higiene/relatorio/revert.png | Bin 1376 -> 879 bytes trunk/common/src/leaf/ui/LeafIconButton.java | 23 +++++++++- trunk/common/src/leaf/ui/LeafUIConstants.java | 15 ++++++ trunk/common/src/leaf/ui/icons/create.png | Bin 0 -> 753 bytes trunk/common/src/leaf/ui/icons/delete.png | Bin 0 -> 914 bytes trunk/common/src/leaf/ui/icons/edit.png | Bin 0 -> 765 bytes 15 files changed, 139 insertions(+), 76 deletions(-) rename trunk/SIPRPSoft/src/siprp/higiene/relatorio/{RelatorioLegislacoesPanel.java => RelatorioLegislacaoPanel.java} (68%) create mode 100644 trunk/SIPRPSoft/src/siprp/higiene/relatorio/RelatorioNormalizacaoPanel.java create mode 100644 trunk/common/src/leaf/ui/LeafUIConstants.java create mode 100644 trunk/common/src/leaf/ui/icons/create.png create mode 100644 trunk/common/src/leaf/ui/icons/delete.png create mode 100644 trunk/common/src/leaf/ui/icons/edit.png 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 72b49ea9647fa5ebc6deb2ff4d2f230137baab8e..f7e5f9354e0ec25d1960e84e90cc78c7a9597c41 100644 GIT binary patch delta 790 zcmV+x1L^$W3hxFXiBL{Q4GJ0x0000DNk~Le0000G0000G2nGNE03Y-JVUZz31~dXt zVYEz~Ny8N*YbZ0?g^-6zgcGhtPk?U4nE3<@Vja*-IJKhEn zPBfGK*7?+E&87myn_HKU9jvb_(iWB!DyZVp+#r>^KNip546dF@vv)p`)OoS? zvz6NimH<>q09~EEF2C{WD{xPQQ8`!8+hUfdT|cKZ)RjfeuoVNC$x0yP*rEe{#gWEl zmJ zmEd6p%@ceACXJ5=1jmpl)Ce+$c*Uv-k>DJy)s^9%7K=brEMr{`a-fvsEhU4TGyvoH z2NWPBg>HCQ1V`@~(D18Ne~yoHGhw&gjr*8*MhH=^_1L^{dQTQOeB$c>7Y-Z1v(JA} zO%wo+UfAnxBLz0_+ux#t4`lL)zVNXX-7ZUX zZm6plop+$I_Iu-zB#L4^W+^3>fIk>=N7;8e6;wOdqVRl{fnm#{gPAhgxPhA<;G!Nh zbV`krfJktVo4l=-Qi_PJOp%MjZQEjUbeHBQMy6r<>4GrZjco(V$Rc8u0(d1Y6w=@D zVjAnSkdD+M?J|d_jtRev<{?iaq(g+A5>j4O&K~kk5VI=sC)Auimz*20Azh z?m%#nYbSpMxJg7oRCwCuRatCQRT%#6GBaIh!7dcK(xzZb#c0$Dl_&(zfJ*~be6b;d zk|=t0M0CN)Hmj&o@ayUbAMN!~(bRVR}K7=fG@{Ha) z!E1kA6*_&O>77^i=08!QN5dpA;{qZwz>5T`U!il#tQbh?DW!t^}s^GgVNybx1TA?O5f z29c8Ki=*>BGYDE|$jmF?xbf892eUq-R7ZcMpxOaTuOnXGwxi#_aj5dq9fcyUO(zOU zG7#tE3+nYBzU{SNKH2DLKi%mW{;AtFXO)ngQ=Ga!o8#AHaQ=~QH(UebH_YUiTt$p7x#UHo-gZgtf6A(Lq+?aDKp^uELBfbq$UBaos;U&cORaE=^GC@6JdXt zfN#+aTX(7}zAgH>B|RBC^mGeERZGi6!D&sQ!EVDJk!Ikgj72sgDx`Uw)E zft!lgc_}JIAc%}iq!DyHBEB1gW*4YG2!(;VXCL7zi_zSC$2eg2N7g1KxMmXZ1QX9XN@{h5Fxh{0wG)C~ zLV1l7)u%TA`LqN6j;kW3Ov^z(Was?y0TdA}r<{|!j`x#{D+O|4RB^<+$|oXtsH}&d zuBp=PKU~Fg9HKE5{h0;rv9rf(5i&25Nq8lNL3D(jb|})!9Fr)U19p;F#3vaoQnWH% zuR}yhoK2wLDB=DMYq6QYo@0M3F?oce@{Zwk*)PCqK1bFpiIS*62>GmZc-PQ8y)n6m z`FLq^=*Fns13fvjDi}R+u!^|E#4@^;oIcbyk0`^xUTlPQFq?eS|3HArect@C52F+|-Yju_bg4n3jCq=Q}WZL4tqZ=84ZhLPfvd zo`y6YV(bEBze7t9T)s`kv`=PxzdBH~O(I5#W^~MY&^W#jnr^$+j=rzwVeX5NimYTi zr41RQ!LH50@?rXdhE>B3!F*SkRMpkrgA7#GzJ$5165JX~(hR4xfwIMiiAvUj-1X~qx3xL} zt0q$`ku}b#oy4bU`Y#9lvjorr>$G6o?t$84k`xR{8({002ovPDHLkV1f~4 BbBh1~ 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 0000000000000000000000000000000000000000..d149d5465402168c086954728175489f26ab3c02 GIT binary patch literal 753 zcmVWdKcYATc!{L3L*!GB7YTATcpIGch_bG$1Q5F)%RM{uz1z000McNliru z)&&<0F*%$asVx8i010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00K!# zL_t(|+Kp06NK|1I{{Ff5HY$3PlI~EAF+^q%VKFii2%>^6f;I+Gt%7J5)FM~XqQ|prG>kN7bCA}yGig7nObQ<{qkB7x#h2bZUS=~z^&`R ziEh9+83f&bTtHj@R|(> zMF~i54)sg-j0?`D-{)V(BnfNsQ?s7cfvbf1aiC!qNRpDp1u(~qm0~nMiOuaDbmRt} z(l$%b0|nb2%;eM$=mTv)Dh)7Fa8U)CQUFyK6!c{H8XVUr0u#?i-^!y-!aQMJEmzvj9cPc7gDPeB zoQ9Umpy^BpGTI?WBnl(K1IcxnhA%xtFB;ZwgGy4mR0K>D>z< z_P6BG$07!SKM90JFM99ML_DC~$%z_u;T!~1C8){csCb(6`(cQXjtBb>lgSmr8$vlI js3RDW{~xmmRq1~NRh|#WJ7L-i00000NkvXXu0mjf1DQK} literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..312bb3f5f003766cc9fb67fce9803bf5eb900eac GIT binary patch literal 914 zcmV;D18w|?P)WdKBJATux^Q)O@fYOAIhl9J+|sKf}hUd$*e5Wx%|N}}F+D(JNydgw){ z-g=B81PfD(kp5ViMOGSUWun%mX1eL!AGdq&?)`P{-INVJ*v|QV-_H5YIY8Ry1JE!4 z+`kLd(N70~t><0?=ld95+y+{50Fgr0bS{1YxBSfqb@h5HA7E^lLi-4rM(!hUbfPp* z;b%&@uS(?IRyIcAVnT*xL!lt|r1#h!X4?c*G?pLe09q-!?HN$Zykb|`p#lLh8A_&r zPa6M2xduYchQPEx(4)@&1!NgpYj>jE?L5~49CzhsKdCuY=7JPKSXS}=b8x;BSR#sU zV55(EAmrAy4tH@rLoAMhBGKvfg_`Qxs+B)GOO2hii!?ozs!$Y@Y<`cakT@drZ*v+jilhe` zQnO_5r~_-E`_bX{{bkw4;MQU=TTzk%nRbRskKirz$HV}~kRO<*SE?!S9B3}8ExK3P zSZue1q-5!d1T;m4g?iT$8fj_Bpjykf3!c1X^@vO53slC8;emzJqK3m*4iY(TjxiL8 zqIX~}G5tGCtEhqNBtoJ##?iFb?%4%gAaXUqY00&+n>&iKsLz;5UX-Hff3+CA6jmR0 zj!L~Vev0clI8~x(8b+oS^Z`Foo9MJHX?#!%N2+88!z4X^IVOF-rt^^%z;_22&-)gR zwC;Aafi`q%PC<7->!lH_5qXgyGupP26N05nx3Rp(F>SaX2$Q`(lY_w&LA(rHq2&?j z(4>Eqr`Q+58^XMCZ5f1;5R6M9R1)l|_-tyFDodTLk=UGi96@s1 o)U+it_QjQYOQwL_1~(G_0qrJ3Y23kQ+W-In07*qoM6N<$g2y+FsQ>@~ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..35d01513a1bcbf844d3b10114c090c1b8f44c83b GIT binary patch literal 765 zcmVWdKcYATc!{L3L*!GB7YTATcpIGch_bG$1Q5F)%RM{uz1z000McNliru z)&&<0F*xfQnY#c0010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00LD> zL_t(|+Kp06XcJKsJ@aWzv}BAe+FDZ)f0S<8+G+_Aq!O2+U~!{esY^E^bRoJC72G8t zq7WA%Dky><&`rRaklLzMOT|x<)>OgLT4LfPlbK}3`(9=wwWWCBHE;};tMlPU*4t;#t$1%oA>wh590vR( zTS*W^EK#I^NifP5^pc6-?lyR)M&R%Ey8MAHT|J_3owl_R+{{2=g6a|k0Rm?R6G=6J zO(#wv-@FrYE{9*R^0eGdSS|BA7WJiqKqP|)*(*rzis9CviZ!i$_|TrmS~pzY&?j9h(UXZuFG2f(B; zhT;5eG`brwk^F(tSQ=;h!brWy@X&-gf+jlxR)dKYBw0j#a~XHd3uy7J#bkOG@uAN+ zvTXo?4M99f-hdsy%&%Gf{*q|H>v7@TTog?{1v5W07=HB$!SzSc)36^}*;?@Ye+^8t z(gU_sTPtDvtb*v{H;4|sN9&5cIOsc$FVk6i+N!vA@hfQdD-=sCmw=lO6WG(zkIlUu zsCRG0SaP0^44aLA^pKsw;iGGbNPW*?M_?cFS_y{Qh~)fl%1L5cr