Browse Source

Erstellung des Repositories

master
nobody 5 years ago
commit
1e8d3787cf

+ 52
- 0
src/autogui/Start.java View File

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

package autogui;

import controller.CommandController;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import model.AdressverwaltungModel;
import view.Adressverwaltung;

/**
* Builder Class
* @author nobody
*/
public class Start
{
public Start()
{
Adressverwaltung view = new Adressverwaltung();
AdressverwaltungModel model = new AdressverwaltungModel();
CommandController controller = new CommandController(view, model);
controller.registerEvents();
controller.registerCommands();
view.setVisible(true);
}

/**
* @param args the command line arguments
*/
public static void main(String[] args)
{
try
{
for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
UIManager.setLookAndFeel(info.getClassName());
}
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null, "SAU PREUSSE!!!");
}
new Start();
}
}

+ 64
- 0
src/controller/CommandController.java View File

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

package controller;

import controller.commands.CommandLoescheDaten;
import controller.commands.CommandNeueDaten;
import controller.commands.CommandOpen;
import controller.commands.CommandSave;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import model.AdressverwaltungModel;
import view.Adressverwaltung;

/**
*
* @author nobody
*/
public class CommandController implements ActionListener
{
private Adressverwaltung view;
private AdressverwaltungModel model;
private CommandInvoker invoker;
public CommandController(Adressverwaltung view,AdressverwaltungModel model)
{
this.view = view;
this.model = model;
invoker = new CommandInvoker();
}

public void registerEvents()
{
view.getMnuioeffnen().addActionListener(this);
view.getMnuispeichern().addActionListener(this);
view.getMnuineueadresse().addActionListener(this);
view.getMnuiloescheadresse().addActionListener(this);
view.getBtnoeffnen().addActionListener(this);
view.getBtnspeichern().addActionListener(this);
view.getBtnneueadresse().addActionListener(this);
view.getBtnloescheadresse().addActionListener(this);
}
public void registerCommands()
{
invoker.addCommand(view.getMnuioeffnen(), new CommandOpen(view, model));
invoker.addCommand(view.getMnuispeichern(), new CommandSave(view,model));
invoker.addCommand(view.getMnuineueadresse(),new CommandNeueDaten(view,model));
invoker.addCommand(view.getMnuiloescheadresse(),new CommandLoescheDaten(view,model));
}
@Override
public void actionPerformed(ActionEvent e)
{
Object key = e.getSource();
invoker.executeCommand(key);
}
}

+ 16
- 0
src/controller/CommandInterface.java View File

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package controller;
/**
*
* @author nobody
*/
public interface CommandInterface
{
public void execute();
public void undo();
}

+ 49
- 0
src/controller/CommandInvoker.java View File

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

package controller;

import java.util.HashMap;
import java.util.Stack;

/**
*
* @author nobody
*/
public class CommandInvoker
{
private HashMap<Object, CommandInterface> commands;
private Stack<CommandInterface> undoStack;
public CommandInvoker()
{
commands = new HashMap<>();
undoStack = new Stack<>();
}
public void addCommand(Object key,CommandInterface value)
{
commands.put(key,value);
}
public void executeCommand(Object key)
{
commands.get(key).execute();
if (false)
{
undoStack.push(commands.get(key));
}
}
public void undoCommand()
{
if(!undoStack.isEmpty())
{
undoStack.pop().undo();
}
}
}

+ 38
- 0
src/controller/commands/CommandLoescheDaten.java View File

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

package controller.commands;

import controller.CommandInterface;
import model.AdressverwaltungModel;
import view.Adressverwaltung;

/**
*
* @author nobody
*/
public class CommandLoescheDaten implements CommandInterface
{
private Adressverwaltung view;
private AdressverwaltungModel model;
public CommandLoescheDaten(Adressverwaltung view, AdressverwaltungModel model)
{
this.view = view;
this.model = model;
}

@Override
public void execute()
{
model.eintragLoeschen(0);
}

@Override
public void undo()
{
}
}

+ 38
- 0
src/controller/commands/CommandNeueDaten.java View File

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

package controller.commands;

import controller.CommandInterface;
import model.AdressverwaltungModel;
import view.Adressverwaltung;

/**
*
* @author nobody
*/
public class CommandNeueDaten implements CommandInterface
{
private Adressverwaltung view;
private AdressverwaltungModel model;
public CommandNeueDaten(Adressverwaltung view, AdressverwaltungModel model)
{
this.view = view;
this.model = model;
}

@Override
public void execute()
{
model.eintragHinzufuegen();
}

@Override
public void undo()
{
}
}

+ 38
- 0
src/controller/commands/CommandOpen.java View File

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

package controller.commands;

import controller.CommandInterface;
import model.AdressverwaltungModel;
import view.Adressverwaltung;

/**
*
* @author nobody
*/
public class CommandOpen implements CommandInterface
{
private Adressverwaltung view;
private AdressverwaltungModel model;
public CommandOpen(Adressverwaltung view, AdressverwaltungModel model)
{
this.view = view;
this.model = model;
}

@Override
public void execute()
{
}

@Override
public void undo()
{
}
}

+ 38
- 0
src/controller/commands/CommandSave.java View File

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

package controller.commands;

import controller.CommandInterface;
import model.AdressverwaltungModel;
import view.Adressverwaltung;

/**
*
* @author nobody
*/
public class CommandSave implements CommandInterface
{
private Adressverwaltung view;
private AdressverwaltungModel model;

public CommandSave(Adressverwaltung view, AdressverwaltungModel model)
{
this.view = view;
this.model = model;
}

@Override
public void execute()
{
}

@Override
public void undo()
{
}
}

+ 120
- 0
src/model/AdressverwaltungModel.java View File

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

package model;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import javax.swing.table.AbstractTableModel;

/**
*
* @author le
*/
public class AdressverwaltungModel extends AbstractTableModel
{
private ArrayList<ArrayList<String>> daten;
private ArrayList<String> adressEintraegeDaten;
private ArrayList<String> adressEintraegeNamen;
public AdressverwaltungModel()
{
adressEintraegeDaten = new ArrayList<>();
adressEintraegeNamen = new ArrayList<>();
daten = new ArrayList<>();
adressEintraegeNamen.add("Name");
adressEintraegeDaten.add("Lehner");
adressEintraegeNamen.add("Telefon");
adressEintraegeDaten.add("122345");
daten.add(adressEintraegeDaten);
}

@Override
public int getRowCount()
{
return daten.size();
}

@Override
public int getColumnCount()
{
return adressEintraegeDaten.size();
}

@Override
public Object getValueAt(int row, int col)
{
return daten.get(row).get(col);
}
@Override
public void setValueAt(Object value, int row, int col)
{
daten.get(row).set(col, (String)value);
}
@Override
public boolean isCellEditable(int row, int col)
{
return true;
}
@Override
public String getColumnName(int col)
{
return adressEintraegeNamen.get(col);
}
public void eintragHinzufuegen()
{
adressEintraegeDaten = new ArrayList<>();
adressEintraegeNamen.forEach(s -> adressEintraegeDaten.add(s));
daten.add(adressEintraegeDaten);
this.fireTableDataChanged();
}
public void eintragLoeschen(int row)
{
daten.remove(row);
this.fireTableDataChanged();
}
public void spalteHinzufuegen(String name)
{
adressEintraegeNamen.add(name);
}
public void datenSpeichern(File datei) throws FileNotFoundException, IOException
{
FileOutputStream fos = new FileOutputStream(datei);
BufferedOutputStream bos = new BufferedOutputStream(fos);
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(daten);
oos.writeObject(adressEintraegeNamen);
oos.flush();
oos.close();
}
public void datenLesen(File datei) throws FileNotFoundException, IOException, ClassNotFoundException
{
FileInputStream fis = new FileInputStream(datei);
BufferedInputStream bis = new BufferedInputStream(fis);
ObjectInputStream ois = new ObjectInputStream(bis);
daten = (ArrayList<ArrayList<String>>)ois.readObject();
adressEintraegeNamen = (ArrayList<String>)ois.readObject();
adressEintraegeDaten = daten.get(daten.size()-1);
ois.close();
this.fireTableDataChanged();
}
}

+ 203
- 0
src/view/Adressverwaltung.form View File

<?xml version="1.0" encoding="UTF-8" ?>

<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
<NonVisualComponents>
<Component class="javax.swing.JFileChooser" name="jFileChooser1">
</Component>
<Menu class="javax.swing.JMenuBar" name="jMenuBar1">
<SubComponents>
<Menu class="javax.swing.JMenu" name="mnuDatei">
<Properties>
<Property name="mnemonic" type="int" value="68"/>
<Property name="text" type="java.lang.String" value="Datei"/>
</Properties>
<SubComponents>
<MenuItem class="javax.swing.JMenuItem" name="mnuioeffnen">
<Properties>
<Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">
<KeyStroke key="Ctrl+O"/>
</Property>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/view/Icons/Open24.gif"/>
</Property>
<Property name="text" type="java.lang.String" value="&#xd6;ffnen"/>
</Properties>
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="mnuispeichern">
<Properties>
<Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">
<KeyStroke key="Ctrl+S"/>
</Property>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/view/Icons/Save24.gif"/>
</Property>
<Property name="text" type="java.lang.String" value="Speichern"/>
</Properties>
</MenuItem>
</SubComponents>
</Menu>
<Menu class="javax.swing.JMenu" name="mnuBearbeiten">
<Properties>
<Property name="mnemonic" type="int" value="66"/>
<Property name="text" type="java.lang.String" value="Bearbeiten"/>
</Properties>
<SubComponents>
<MenuItem class="javax.swing.JMenuItem" name="mnuineueadresse">
<Properties>
<Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">
<KeyStroke key="Ctrl+N"/>
</Property>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/view/Icons/New24.gif"/>
</Property>
<Property name="text" type="java.lang.String" value="Neue Adresse"/>
</Properties>
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="mnuiloescheadresse">
<Properties>
<Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">
<KeyStroke key="Ctrl+DELETE"/>
</Property>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/view/Icons/Delete24.gif"/>
</Property>
<Property name="text" type="java.lang.String" value="L&#xf6;sche Adresse"/>
</Properties>
</MenuItem>
</SubComponents>
</Menu>
</SubComponents>
</Menu>
</NonVisualComponents>
<Properties>
<Property name="defaultCloseOperation" type="int" value="3"/>
</Properties>
<SyntheticProperties>
<SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/>
<SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,68,0,0,3,-127"/>
<SyntheticProperty name="formSizePolicy" type="int" value="0"/>
<SyntheticProperty name="generateSize" type="boolean" value="true"/>
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
</SyntheticProperties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Container class="javax.swing.JToolBar" name="jToolBar1">
<Properties>
<Property name="rollover" type="boolean" value="true"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="First"/>
</Constraint>
</Constraints>

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
<SubComponents>
<Component class="javax.swing.JButton" name="btnoeffnen">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/view/Icons/Open24.gif"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="&#xd6;ffnen"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="btnspeichern">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/view/Icons/Save24.gif"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Speichern"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="btnneueadresse">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/view/Icons/New24.gif"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Neu"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="btnloescheadresse">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/view/Icons/Delete24.gif"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="L&#xf6;schen"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblsuesselupe">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/view/Icons/Find24.gif"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="txtsuchbegriff">
<Properties>
<Property name="text" type="java.lang.String" value="Suchbegriff"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="lblstatusanzeige">
<Properties>
<Property name="text" type="java.lang.String" value="Status:"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Last"/>
</Constraint>
</Constraints>
</Component>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Center"/>
</Constraint>
</Constraints>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTable" name="table">
<Properties>
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
<Table columnCount="4" rowCount="4">
<Column editable="true" title="Title 1" type="java.lang.Object"/>
<Column editable="true" title="Title 2" type="java.lang.Object"/>
<Column editable="true" title="Title 3" type="java.lang.Object"/>
<Column editable="true" title="Title 4" type="java.lang.Object"/>
</Table>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Form>

+ 281
- 0
src/view/Adressverwaltung.java View File

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package view;

/**
*
* @author nobody
*/
public class Adressverwaltung extends javax.swing.JFrame
{
/**
* @return the btnloescheadresse
*/
public javax.swing.JButton getBtnloescheadresse()
{
return btnloescheadresse;
}

/**
* @return the btnneueadresse
*/
public javax.swing.JButton getBtnneueadresse()
{
return btnneueadresse;
}

/**
* @return the btnoeffnen
*/
public javax.swing.JButton getBtnoeffnen()
{
return btnoeffnen;
}

/**
* @return the btnspeichern
*/
public javax.swing.JButton getBtnspeichern()
{
return btnspeichern;
}

/**
* @return the mnuiloescheadresse
*/
public javax.swing.JMenuItem getMnuiloescheadresse()
{
return mnuiloescheadresse;
}

/**
* @return the mnuineueadresse
*/
public javax.swing.JMenuItem getMnuineueadresse()
{
return mnuineueadresse;
}

/**
* @return the mnuioeffnen
*/
public javax.swing.JMenuItem getMnuioeffnen()
{
return mnuioeffnen;
}

/**
* @return the mnuispeichern
*/
public javax.swing.JMenuItem getMnuispeichern()
{
return mnuispeichern;
}

/**
* Creates new form Hauptfenster
*/
public Adressverwaltung()
{
initComponents();
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents()
{

jFileChooser1 = new javax.swing.JFileChooser();
jToolBar1 = new javax.swing.JToolBar();
btnoeffnen = new javax.swing.JButton();
btnspeichern = new javax.swing.JButton();
btnneueadresse = new javax.swing.JButton();
btnloescheadresse = new javax.swing.JButton();
lblsuesselupe = new javax.swing.JLabel();
txtsuchbegriff = new javax.swing.JTextField();
lblstatusanzeige = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
table = new javax.swing.JTable();
jMenuBar1 = new javax.swing.JMenuBar();
mnuDatei = new javax.swing.JMenu();
mnuioeffnen = new javax.swing.JMenuItem();
mnuispeichern = new javax.swing.JMenuItem();
mnuBearbeiten = new javax.swing.JMenu();
mnuineueadresse = new javax.swing.JMenuItem();
mnuiloescheadresse = new javax.swing.JMenuItem();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jToolBar1.setRollover(true);

btnoeffnen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/Icons/Open24.gif"))); // NOI18N
btnoeffnen.setToolTipText("Öffnen");
btnoeffnen.setFocusable(false);
btnoeffnen.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnoeffnen.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jToolBar1.add(btnoeffnen);

btnspeichern.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/Icons/Save24.gif"))); // NOI18N
btnspeichern.setToolTipText("Speichern");
btnspeichern.setFocusable(false);
btnspeichern.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnspeichern.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jToolBar1.add(btnspeichern);

btnneueadresse.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/Icons/New24.gif"))); // NOI18N
btnneueadresse.setToolTipText("Neu");
btnneueadresse.setFocusable(false);
btnneueadresse.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnneueadresse.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jToolBar1.add(btnneueadresse);

btnloescheadresse.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/Icons/Delete24.gif"))); // NOI18N
btnloescheadresse.setToolTipText("Löschen");
btnloescheadresse.setFocusable(false);
btnloescheadresse.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnloescheadresse.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jToolBar1.add(btnloescheadresse);

lblsuesselupe.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/Icons/Find24.gif"))); // NOI18N
jToolBar1.add(lblsuesselupe);

txtsuchbegriff.setText("Suchbegriff");
jToolBar1.add(txtsuchbegriff);

getContentPane().add(jToolBar1, java.awt.BorderLayout.PAGE_START);

lblstatusanzeige.setText("Status:");
getContentPane().add(lblstatusanzeige, java.awt.BorderLayout.PAGE_END);

table.setModel(new javax.swing.table.DefaultTableModel(
new Object [][]
{
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String []
{
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane1.setViewportView(table);

getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);

mnuDatei.setMnemonic('D');
mnuDatei.setText("Datei");

mnuioeffnen.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));
mnuioeffnen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/Icons/Open24.gif"))); // NOI18N
mnuioeffnen.setText("Öffnen");
mnuDatei.add(mnuioeffnen);

mnuispeichern.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
mnuispeichern.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/Icons/Save24.gif"))); // NOI18N
mnuispeichern.setText("Speichern");
mnuDatei.add(mnuispeichern);

jMenuBar1.add(mnuDatei);

mnuBearbeiten.setMnemonic('B');
mnuBearbeiten.setText("Bearbeiten");

mnuineueadresse.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));
mnuineueadresse.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/Icons/New24.gif"))); // NOI18N
mnuineueadresse.setText("Neue Adresse");
mnuBearbeiten.add(mnuineueadresse);

mnuiloescheadresse.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_DELETE, java.awt.event.InputEvent.CTRL_MASK));
mnuiloescheadresse.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/Icons/Delete24.gif"))); // NOI18N
mnuiloescheadresse.setText("Lösche Adresse");
mnuBearbeiten.add(mnuiloescheadresse);

jMenuBar1.add(mnuBearbeiten);

setJMenuBar(jMenuBar1);

setSize(new java.awt.Dimension(897, 580));
setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents

/**
* @param args the command line arguments
*/
public static void main(String args[])
{
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try
{
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
{
if ("Nimbus".equals(info.getName()))
{
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
}
catch (ClassNotFoundException ex)
{
java.util.logging.Logger.getLogger(Adressverwaltung.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
catch (InstantiationException ex)
{
java.util.logging.Logger.getLogger(Adressverwaltung.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
catch (IllegalAccessException ex)
{
java.util.logging.Logger.getLogger(Adressverwaltung.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
catch (javax.swing.UnsupportedLookAndFeelException ex)
{
java.util.logging.Logger.getLogger(Adressverwaltung.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
//</editor-fold>

/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable()
{
public void run()
{
new Adressverwaltung().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btnloescheadresse;
private javax.swing.JButton btnneueadresse;
private javax.swing.JButton btnoeffnen;
private javax.swing.JButton btnspeichern;
private javax.swing.JFileChooser jFileChooser1;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JToolBar jToolBar1;
private javax.swing.JLabel lblstatusanzeige;
private javax.swing.JLabel lblsuesselupe;
private javax.swing.JMenu mnuBearbeiten;
private javax.swing.JMenu mnuDatei;
private javax.swing.JMenuItem mnuiloescheadresse;
private javax.swing.JMenuItem mnuineueadresse;
private javax.swing.JMenuItem mnuioeffnen;
private javax.swing.JMenuItem mnuispeichern;
private javax.swing.JTable table;
private javax.swing.JTextField txtsuchbegriff;
// End of variables declaration//GEN-END:variables
}

BIN
src/view/Icons/Delete24.gif View File


BIN
src/view/Icons/Find24.gif View File


BIN
src/view/Icons/New24.gif View File


BIN
src/view/Icons/Open24.gif View File


BIN
src/view/Icons/Save24.gif View File


BIN
src/view/Icons/Search24.gif View File


Loading…
Cancel
Save