java/rozsirene-atributy/src/cz/frantovo/rozsireneatributy/gui/Panel.java
branchv_0
changeset 29 8d42303538ed
parent 28 c2ffda907125
child 30 d511e4bf7d8f
     1.1 --- a/java/rozsirene-atributy/src/cz/frantovo/rozsireneatributy/gui/Panel.java	Mon Dec 11 00:28:30 2023 +0100
     1.2 +++ b/java/rozsirene-atributy/src/cz/frantovo/rozsireneatributy/gui/Panel.java	Mon Dec 11 00:49:59 2023 +0100
     1.3 @@ -34,8 +34,10 @@
     1.4  public class Panel extends javax.swing.JPanel {
     1.5  
     1.6  	private static final int SLOUPEC_NÁZVU = 0;
     1.7 -	private static final Logger log = Logger.getLogger(Panel.class.getSimpleName());
     1.8 -	private static final ResourceBundle překlady =  ResourceBundle.getBundle(Atribut.class.getPackageName() + ".Překlady");
     1.9 +	private static final Logger log = Logger
    1.10 +		.getLogger(Panel.class.getSimpleName());
    1.11 +	private static final ResourceBundle překlady = ResourceBundle
    1.12 +		.getBundle(Atribut.class.getPackageName() + ".Překlady");
    1.13  	private Model model;
    1.14  	private Atribut vybranýAtribut;
    1.15  	private JTable tabulka;
    1.16 @@ -50,7 +52,8 @@
    1.17  		posuvnýPanel.setViewportView(tabulka);
    1.18  
    1.19  		/** Výběr aktuálního atributu v tabulce */
    1.20 -		tabulka.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
    1.21 +		tabulka.getSelectionModel().addListSelectionListener(
    1.22 +			new ListSelectionListener() {
    1.23  
    1.24  			@Override
    1.25  			public void valueChanged(ListSelectionEvent e) {
    1.26 @@ -67,7 +70,8 @@
    1.27  	}
    1.28  
    1.29  	private void nastavEditor() {
    1.30 -		tabulka.getColumnModel().getColumn(SLOUPEC_NÁZVU).setCellEditor(new EditorNázvůAtributů());
    1.31 +		tabulka.getColumnModel().getColumn(SLOUPEC_NÁZVU)
    1.32 +			.setCellEditor(new EditorNázvůAtributů());
    1.33  	}
    1.34  
    1.35  	private Model getModel() {
    1.36 @@ -81,7 +85,8 @@
    1.37  	}
    1.38  
    1.39  	private void zobrazChybovouHlášku(String hláška, Throwable chyba) {
    1.40 -		JOptionPane.showMessageDialog(this, hláška, překlady.getString("chyba"), JOptionPane.ERROR_MESSAGE);
    1.41 +		JOptionPane.showMessageDialog(this, hláška,
    1.42 +			překlady.getString("chyba"), JOptionPane.ERROR_MESSAGE);
    1.43  		log.log(Level.WARNING, hláška, chyba);
    1.44  	}
    1.45  
    1.46 @@ -155,7 +160,8 @@
    1.47  		try {
    1.48  			model.odeberAtribut(vybranýAtribut);
    1.49  		} catch (IOException e) {
    1.50 -			zobrazChybovouHlášku(překlady.getString("chyba.nepodařiloSeSmazat"), e);
    1.51 +			zobrazChybovouHlášku(překlady
    1.52 +				.getString("chyba.nepodařiloSeSmazat"), e);
    1.53  		}
    1.54  	}//GEN-LAST:event_tlačítkoSmazatActionPerformed
    1.55  
    1.56 @@ -163,7 +169,8 @@
    1.57  		try {
    1.58  			model.načtiAtributy();
    1.59  		} catch (IOException e) {
    1.60 -			zobrazChybovouHlášku(překlady.getString("chyba.nepodařiloSeNačíst"), e);
    1.61 +			zobrazChybovouHlášku(překlady
    1.62 +				.getString("chyba.nepodařiloSeNačíst"), e);
    1.63  		}
    1.64  	}//GEN-LAST:event_tlačítkoZnovuNačístActionPerformed
    1.65      // Variables declaration - do not modify//GEN-BEGIN:variables