@@ -0,0 +1,30 @@ | |||
/* | |||
* 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 kontakte; | |||
import kontakte.view.View; | |||
/** | |||
* Builder Class | |||
* @author nobody | |||
*/ | |||
public class Main | |||
{ | |||
public Main() | |||
{ | |||
View v = new View(); | |||
v.setVisible(true); | |||
} | |||
/** | |||
* @param args the command line arguments | |||
*/ | |||
public static void main(String[] args) | |||
{ | |||
new Main(); | |||
} | |||
} |
@@ -0,0 +1,17 @@ | |||
/* | |||
* 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 kontakte.controller; | |||
/** | |||
* | |||
* @author nobody | |||
*/ | |||
public interface CommandInterface | |||
{ | |||
public void execute(); | |||
public void undo(); | |||
} |
@@ -0,0 +1,34 @@ | |||
/* | |||
* 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 kontakte.controller; | |||
import java.awt.Component; | |||
import java.util.HashMap; | |||
/** | |||
* | |||
* @author nobody | |||
*/ | |||
public class CommandInvoker | |||
{ | |||
private HashMap<Component, CommandInterface> commands; | |||
public CommandInvoker() | |||
{ | |||
commands = new HashMap<>(); | |||
} | |||
public void addCommand(Component key, CommandInterface value) | |||
{ | |||
commands.put(key, value); | |||
} | |||
public void executeCommand(Component key) | |||
{ | |||
commands.get(key).execute(); | |||
} | |||
} |
@@ -0,0 +1,36 @@ | |||
/* | |||
* 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 kontakte.controller; | |||
import kontakte.model.Model; | |||
import kontakte.view.View; | |||
/** | |||
* | |||
* @author nobody | |||
*/ | |||
public class CommandOpen implements CommandInterface | |||
{ | |||
private View view; | |||
private Model model; | |||
public CommandOpen(View view, Model model) | |||
{ | |||
this.view = view; | |||
this.model = model; | |||
} | |||
@Override | |||
public void execute() | |||
{ | |||
} | |||
@Override | |||
public void undo() | |||
{ | |||
} | |||
} |
@@ -0,0 +1,52 @@ | |||
/* | |||
* 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 kontakte.controller ; | |||
import java.awt.Component; | |||
import java.awt.event.ActionEvent; | |||
import java.awt.event.ActionListener; | |||
import kontakte.model.Model; | |||
import kontakte.view.View; | |||
/** | |||
* | |||
* @author nobody | |||
*/ | |||
public class Controller implements ActionListener | |||
{ | |||
private View view; | |||
private Model model; | |||
private CommandInvoker invoker; | |||
public Controller(View view, Model model) | |||
{ | |||
this.view = view; | |||
this.model = model; | |||
invoker = new CommandInvoker(); | |||
} | |||
public void registerEvents() | |||
{ | |||
view.getBtnOpen().addActionListener(this); | |||
view.getMenuOpen().addActionListener(this); | |||
} | |||
public void registerCommands() | |||
{ | |||
CommandOpen cmdOpen = new CommandOpen(view, model); | |||
invoker.addCommand(view.getBtnOpen(), cmdOpen); | |||
invoker.addCommand(view.getMenuOpen(), cmdOpen); | |||
} | |||
@Override | |||
public void actionPerformed(ActionEvent e) | |||
{ | |||
Component key = (Component)e.getSource(); | |||
invoker.executeCommand(key); | |||
} | |||
} |
@@ -0,0 +1,19 @@ | |||
/* | |||
* 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 kontakte.model; | |||
/** | |||
* | |||
* @author nobody | |||
*/ | |||
public class Model | |||
{ | |||
public Model() | |||
{ | |||
} | |||
} |
@@ -0,0 +1,348 @@ | |||
<?xml version="1.0" encoding="UTF-8" ?> | |||
<Form version="1.9" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> | |||
<NonVisualComponents> | |||
<Component class="javax.swing.JFileChooser" name="fileChooser"> | |||
</Component> | |||
<Container class="javax.swing.JFrame" name="addEntryFrame"> | |||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"> | |||
<Property name="axis" type="int" value="1"/> | |||
</Layout> | |||
<SubComponents> | |||
<Container class="javax.swing.JLayeredPane" name="jLayeredPane7"> | |||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> | |||
<SubComponents> | |||
<Container class="javax.swing.JLayeredPane" name="jLayeredPane4"> | |||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"> | |||
<Property name="axis" type="int" value="1"/> | |||
</Layout> | |||
<SubComponents> | |||
<Component class="javax.swing.JTextField" name="jTextField1"> | |||
<Properties> | |||
<Property name="editable" type="boolean" value="false"/> | |||
<Property name="text" type="java.lang.String" value="Name"/> | |||
</Properties> | |||
</Component> | |||
<Component class="javax.swing.JTextField" name="textName"> | |||
<Properties> | |||
<Property name="toolTipText" type="java.lang.String" value="Name"/> | |||
</Properties> | |||
</Component> | |||
</SubComponents> | |||
</Container> | |||
<Container class="javax.swing.JLayeredPane" name="jLayeredPane5"> | |||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"> | |||
<Property name="axis" type="int" value="1"/> | |||
</Layout> | |||
<SubComponents> | |||
<Component class="javax.swing.JTextField" name="jTextField3"> | |||
<Properties> | |||
<Property name="editable" type="boolean" value="false"/> | |||
<Property name="text" type="java.lang.String" value="Wohnort"/> | |||
</Properties> | |||
</Component> | |||
<Component class="javax.swing.JTextField" name="textCity"> | |||
<Properties> | |||
<Property name="toolTipText" type="java.lang.String" value="Wohnort"/> | |||
</Properties> | |||
</Component> | |||
</SubComponents> | |||
</Container> | |||
<Container class="javax.swing.JLayeredPane" name="jLayeredPane6"> | |||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"> | |||
<Property name="axis" type="int" value="1"/> | |||
</Layout> | |||
<SubComponents> | |||
<Component class="javax.swing.JTextField" name="jTextField5"> | |||
<Properties> | |||
<Property name="editable" type="boolean" value="false"/> | |||
<Property name="text" type="java.lang.String" value="Straße"/> | |||
</Properties> | |||
</Component> | |||
<Component class="javax.swing.JTextField" name="textStreet"> | |||
<Properties> | |||
<Property name="toolTipText" type="java.lang.String" value="Straße"/> | |||
</Properties> | |||
</Component> | |||
</SubComponents> | |||
</Container> | |||
</SubComponents> | |||
</Container> | |||
<Container class="javax.swing.JLayeredPane" name="jLayeredPane8"> | |||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> | |||
<SubComponents> | |||
<Component class="javax.swing.JButton" name="btnOk"> | |||
<Properties> | |||
<Property name="text" type="java.lang.String" value="ok"/> | |||
</Properties> | |||
</Component> | |||
<Component class="javax.swing.JButton" name="btnCancel"> | |||
<Properties> | |||
<Property name="text" type="java.lang.String" value="Cancel"/> | |||
</Properties> | |||
</Component> | |||
</SubComponents> | |||
</Container> | |||
</SubComponents> | |||
</Container> | |||
<Menu class="javax.swing.JMenuBar" name="jMenuBar1"> | |||
<SubComponents> | |||
<Menu class="javax.swing.JMenu" name="menuFile"> | |||
<Properties> | |||
<Property name="mnemonic" type="int" value="70"/> | |||
<Property name="text" type="java.lang.String" value="File"/> | |||
</Properties> | |||
<SubComponents> | |||
<MenuItem class="javax.swing.JMenuItem" name="menuOpen"> | |||
<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="/kontakte/view/img/Open16.gif"/> | |||
</Property> | |||
<Property name="mnemonic" type="int" value="79"/> | |||
<Property name="text" type="java.lang.String" value="Open"/> | |||
<Property name="toolTipText" type="java.lang.String" value=""/> | |||
</Properties> | |||
</MenuItem> | |||
<MenuItem class="javax.swing.JMenuItem" name="menuSave"> | |||
<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="/kontakte/view/img/Save16.gif"/> | |||
</Property> | |||
<Property name="mnemonic" type="int" value="83"/> | |||
<Property name="text" type="java.lang.String" value="Save"/> | |||
</Properties> | |||
</MenuItem> | |||
<MenuItem class="javax.swing.JMenuItem" name="menuClose"> | |||
<Properties> | |||
<Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor"> | |||
<KeyStroke key="Ctrl+X"/> | |||
</Property> | |||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> | |||
<Image iconType="3" name="/kontakte/view/img/Export16.gif"/> | |||
</Property> | |||
<Property name="mnemonic" type="int" value="67"/> | |||
<Property name="text" type="java.lang.String" value="Close"/> | |||
</Properties> | |||
</MenuItem> | |||
</SubComponents> | |||
</Menu> | |||
<Menu class="javax.swing.JMenu" name="menuEdit"> | |||
<Properties> | |||
<Property name="text" type="java.lang.String" value="Edit"/> | |||
</Properties> | |||
<SubComponents> | |||
<MenuItem class="javax.swing.JMenuItem" name="menuAddEntry"> | |||
<Properties> | |||
<Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor"> | |||
<KeyStroke key="Ctrl+PLUS"/> | |||
</Property> | |||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> | |||
<Image iconType="3" name="/kontakte/view/img/Add16.gif"/> | |||
</Property> | |||
<Property name="mnemonic" type="int" value="65"/> | |||
<Property name="text" type="java.lang.String" value="Add Entry"/> | |||
<Property name="toolTipText" type="java.lang.String" value=""/> | |||
</Properties> | |||
</MenuItem> | |||
<MenuItem class="javax.swing.JMenuItem" name="menuDeleteEntry"> | |||
<Properties> | |||
<Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor"> | |||
<KeyStroke key="Ctrl+D"/> | |||
</Property> | |||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> | |||
<Image iconType="3" name="/kontakte/view/img/Delete16.gif"/> | |||
</Property> | |||
<Property name="mnemonic" type="int" value="68"/> | |||
<Property name="text" type="java.lang.String" value="Delete Entry"/> | |||
</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="formSizePolicy" type="int" value="1"/> | |||
<SyntheticProperty name="generateCenter" type="boolean" value="false"/> | |||
</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"/> | |||
<AuxValue name="designerSize" 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,1,-44,0,0,3,1"/> | |||
</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="btnOpen"> | |||
<Properties> | |||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> | |||
<Image iconType="3" name="/kontakte/view/img/Open24.gif"/> | |||
</Property> | |||
<Property name="toolTipText" type="java.lang.String" value="Open"/> | |||
<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="btnSave"> | |||
<Properties> | |||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> | |||
<Image iconType="3" name="/kontakte/view/img/Save24.gif"/> | |||
</Property> | |||
<Property name="toolTipText" type="java.lang.String" value="Save"/> | |||
<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="btnClose"> | |||
<Properties> | |||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> | |||
<Image iconType="3" name="/kontakte/view/img/Export24.gif"/> | |||
</Property> | |||
<Property name="toolTipText" type="java.lang.String" value="Close"/> | |||
<Property name="focusable" type="boolean" value="false"/> | |||
<Property name="horizontalTextPosition" type="int" value="0"/> | |||
<Property name="verticalTextPosition" type="int" value="3"/> | |||
</Properties> | |||
</Component> | |||
</SubComponents> | |||
</Container> | |||
<Component class="javax.swing.JTextField" name="textFileAdress"> | |||
<Properties> | |||
<Property name="editable" type="boolean" value="false"/> | |||
<Property name="text" type="java.lang.String" value="/"/> | |||
<Property name="toolTipText" type="java.lang.String" value="Path"/> | |||
</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.JLayeredPane" name="jLayeredPane1"> | |||
<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.DesignBorderLayout"/> | |||
<SubComponents> | |||
<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="tableContacts"> | |||
<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> | |||
<Container class="javax.swing.JLayeredPane" name="jLayeredPane2"> | |||
<Constraints> | |||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> | |||
<BorderConstraints direction="Before"/> | |||
</Constraint> | |||
</Constraints> | |||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> | |||
<SubComponents> | |||
<Component class="javax.swing.JButton" name="jButton1"> | |||
<Properties> | |||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> | |||
<Image iconType="3" name="/kontakte/view/img/Add24.gif"/> | |||
</Property> | |||
<Property name="toolTipText" type="java.lang.String" value="Add Entry"/> | |||
</Properties> | |||
</Component> | |||
<Component class="javax.swing.JButton" name="jButton2"> | |||
<Properties> | |||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> | |||
<Image iconType="3" name="/kontakte/view/img/Delete24.gif"/> | |||
</Property> | |||
<Property name="toolTipText" type="java.lang.String" value="Delete Entry"/> | |||
</Properties> | |||
</Component> | |||
</SubComponents> | |||
</Container> | |||
<Container class="javax.swing.JLayeredPane" name="jLayeredPane3"> | |||
<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.DesignGridLayout"> | |||
<Property name="columns" type="int" value="0"/> | |||
<Property name="rows" type="int" value="1"/> | |||
</Layout> | |||
<SubComponents> | |||
<Component class="javax.swing.JTextField" name="textFindTip"> | |||
<Properties> | |||
<Property name="editable" type="boolean" value="false"/> | |||
<Property name="text" type="java.lang.String" value="Find Entry:"/> | |||
</Properties> | |||
</Component> | |||
<Component class="javax.swing.JTextField" name="textFind"> | |||
<Properties> | |||
<Property name="toolTipText" type="java.lang.String" value="Find"/> | |||
</Properties> | |||
</Component> | |||
</SubComponents> | |||
</Container> | |||
</SubComponents> | |||
</Container> | |||
</SubComponents> | |||
</Form> |
@@ -0,0 +1,492 @@ | |||
package kontakte.view; | |||
import java.awt.EventQueue; | |||
/* | |||
* 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. | |||
*/ | |||
/** | |||
* | |||
* @author nobody | |||
*/ | |||
public class View extends javax.swing.JFrame | |||
{ | |||
/** | |||
* @return the btnClose | |||
*/ | |||
public javax.swing.JButton getBtnClose() | |||
{ | |||
return btnClose; | |||
} | |||
/** | |||
* @return the btnCancel | |||
*/ | |||
public javax.swing.JButton getBtnCancel() | |||
{ | |||
return btnCancel; | |||
} | |||
/** | |||
* @return the btnOk | |||
*/ | |||
public javax.swing.JButton getBtnOk() | |||
{ | |||
return btnOk; | |||
} | |||
/** | |||
* @return the btnOpen | |||
*/ | |||
public javax.swing.JButton getBtnOpen() | |||
{ | |||
return btnOpen; | |||
} | |||
/** | |||
* @return the btnSave | |||
*/ | |||
public javax.swing.JButton getBtnSave() | |||
{ | |||
return btnSave; | |||
} | |||
/** | |||
* @return the fileChooser | |||
*/ | |||
public javax.swing.JFileChooser getFileChooser() | |||
{ | |||
return fileChooser; | |||
} | |||
/** | |||
* @return the menuAddEntry | |||
*/ | |||
public javax.swing.JMenuItem getMenuAddEntry() | |||
{ | |||
return menuAddEntry; | |||
} | |||
/** | |||
* @return the menuClose | |||
*/ | |||
public javax.swing.JMenuItem getMenuClose() | |||
{ | |||
return menuClose; | |||
} | |||
/** | |||
* @return the menuDeleteEntry | |||
*/ | |||
public javax.swing.JMenuItem getMenuDeleteEntry() | |||
{ | |||
return menuDeleteEntry; | |||
} | |||
/** | |||
* @return the menuEdit | |||
*/ | |||
public javax.swing.JMenu getMenuEdit() | |||
{ | |||
return menuEdit; | |||
} | |||
/** | |||
* @return the menuFile | |||
*/ | |||
public javax.swing.JMenu getMenuFile() | |||
{ | |||
return menuFile; | |||
} | |||
/** | |||
* @return the menuOpen | |||
*/ | |||
public javax.swing.JMenuItem getMenuOpen() | |||
{ | |||
return menuOpen; | |||
} | |||
/** | |||
* @return the menuSave | |||
*/ | |||
public javax.swing.JMenuItem getMenuSave() | |||
{ | |||
return menuSave; | |||
} | |||
/** | |||
* @return the tableContacts | |||
*/ | |||
public javax.swing.JTable getTableContacts() | |||
{ | |||
return tableContacts; | |||
} | |||
/** | |||
* @return the textCity | |||
*/ | |||
public javax.swing.JTextField getTextCity() | |||
{ | |||
return textCity; | |||
} | |||
/** | |||
* @return the textFileAdress | |||
*/ | |||
public javax.swing.JTextField getTextFileAdress() | |||
{ | |||
return textFileAdress; | |||
} | |||
/** | |||
* @return the textFind | |||
*/ | |||
public javax.swing.JTextField getTextFind() | |||
{ | |||
return textFind; | |||
} | |||
/** | |||
* @return the textFindTip | |||
*/ | |||
public javax.swing.JTextField getTextFindTip() | |||
{ | |||
return textFindTip; | |||
} | |||
/** | |||
* @return the textName | |||
*/ | |||
public javax.swing.JTextField getTextName() | |||
{ | |||
return textName; | |||
} | |||
/** | |||
* @return the textStreet | |||
*/ | |||
public javax.swing.JTextField getTextStreet() | |||
{ | |||
return textStreet; | |||
} | |||
/** | |||
* Creates new form view | |||
*/ | |||
public View() | |||
{ | |||
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() | |||
{ | |||
fileChooser = new javax.swing.JFileChooser(); | |||
addEntryFrame = new javax.swing.JFrame(); | |||
jLayeredPane7 = new javax.swing.JLayeredPane(); | |||
jLayeredPane4 = new javax.swing.JLayeredPane(); | |||
jTextField1 = new javax.swing.JTextField(); | |||
textName = new javax.swing.JTextField(); | |||
jLayeredPane5 = new javax.swing.JLayeredPane(); | |||
jTextField3 = new javax.swing.JTextField(); | |||
textCity = new javax.swing.JTextField(); | |||
jLayeredPane6 = new javax.swing.JLayeredPane(); | |||
jTextField5 = new javax.swing.JTextField(); | |||
textStreet = new javax.swing.JTextField(); | |||
jLayeredPane8 = new javax.swing.JLayeredPane(); | |||
btnOk = new javax.swing.JButton(); | |||
btnCancel = new javax.swing.JButton(); | |||
jToolBar1 = new javax.swing.JToolBar(); | |||
btnOpen = new javax.swing.JButton(); | |||
btnSave = new javax.swing.JButton(); | |||
btnClose = new javax.swing.JButton(); | |||
textFileAdress = new javax.swing.JTextField(); | |||
jLayeredPane1 = new javax.swing.JLayeredPane(); | |||
jScrollPane1 = new javax.swing.JScrollPane(); | |||
tableContacts = new javax.swing.JTable(); | |||
jLayeredPane2 = new javax.swing.JLayeredPane(); | |||
jButton1 = new javax.swing.JButton(); | |||
jButton2 = new javax.swing.JButton(); | |||
jLayeredPane3 = new javax.swing.JLayeredPane(); | |||
textFindTip = new javax.swing.JTextField(); | |||
textFind = new javax.swing.JTextField(); | |||
jMenuBar1 = new javax.swing.JMenuBar(); | |||
menuFile = new javax.swing.JMenu(); | |||
menuOpen = new javax.swing.JMenuItem(); | |||
menuSave = new javax.swing.JMenuItem(); | |||
menuClose = new javax.swing.JMenuItem(); | |||
menuEdit = new javax.swing.JMenu(); | |||
menuAddEntry = new javax.swing.JMenuItem(); | |||
menuDeleteEntry = new javax.swing.JMenuItem(); | |||
addEntryFrame.getContentPane().setLayout(new javax.swing.BoxLayout(addEntryFrame.getContentPane(), javax.swing.BoxLayout.Y_AXIS)); | |||
jLayeredPane7.setLayout(new java.awt.FlowLayout()); | |||
jLayeredPane4.setLayout(new javax.swing.BoxLayout(jLayeredPane4, javax.swing.BoxLayout.Y_AXIS)); | |||
jTextField1.setEditable(false); | |||
jTextField1.setText("Name"); | |||
jLayeredPane4.add(jTextField1); | |||
textName.setToolTipText("Name"); | |||
jLayeredPane4.add(textName); | |||
jLayeredPane7.add(jLayeredPane4); | |||
jLayeredPane5.setLayout(new javax.swing.BoxLayout(jLayeredPane5, javax.swing.BoxLayout.Y_AXIS)); | |||
jTextField3.setEditable(false); | |||
jTextField3.setText("Wohnort"); | |||
jLayeredPane5.add(jTextField3); | |||
textCity.setToolTipText("Wohnort"); | |||
jLayeredPane5.add(textCity); | |||
jLayeredPane7.add(jLayeredPane5); | |||
jLayeredPane6.setLayout(new javax.swing.BoxLayout(jLayeredPane6, javax.swing.BoxLayout.Y_AXIS)); | |||
jTextField5.setEditable(false); | |||
jTextField5.setText("Straße"); | |||
jLayeredPane6.add(jTextField5); | |||
textStreet.setToolTipText("Straße"); | |||
jLayeredPane6.add(textStreet); | |||
jLayeredPane7.add(jLayeredPane6); | |||
addEntryFrame.getContentPane().add(jLayeredPane7); | |||
jLayeredPane8.setLayout(new java.awt.FlowLayout()); | |||
btnOk.setText("ok"); | |||
jLayeredPane8.add(btnOk); | |||
btnCancel.setText("Cancel"); | |||
jLayeredPane8.add(btnCancel); | |||
addEntryFrame.getContentPane().add(jLayeredPane8); | |||
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); | |||
jToolBar1.setRollover(true); | |||
btnOpen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kontakte/view/img/Open24.gif"))); // NOI18N | |||
btnOpen.setToolTipText("Open"); | |||
btnOpen.setFocusable(false); | |||
btnOpen.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); | |||
btnOpen.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); | |||
jToolBar1.add(btnOpen); | |||
btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kontakte/view/img/Save24.gif"))); // NOI18N | |||
btnSave.setToolTipText("Save"); | |||
btnSave.setFocusable(false); | |||
btnSave.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); | |||
btnSave.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); | |||
jToolBar1.add(btnSave); | |||
btnClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kontakte/view/img/Export24.gif"))); // NOI18N | |||
btnClose.setToolTipText("Close"); | |||
btnClose.setFocusable(false); | |||
btnClose.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); | |||
btnClose.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); | |||
jToolBar1.add(btnClose); | |||
getContentPane().add(jToolBar1, java.awt.BorderLayout.PAGE_START); | |||
textFileAdress.setEditable(false); | |||
textFileAdress.setText("/"); | |||
textFileAdress.setToolTipText("Path"); | |||
getContentPane().add(textFileAdress, java.awt.BorderLayout.PAGE_END); | |||
jLayeredPane1.setLayout(new java.awt.BorderLayout()); | |||
tableContacts.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(tableContacts); | |||
jLayeredPane1.add(jScrollPane1, java.awt.BorderLayout.CENTER); | |||
jLayeredPane2.setLayout(new java.awt.FlowLayout()); | |||
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kontakte/view/img/Add24.gif"))); // NOI18N | |||
jButton1.setToolTipText("Add Entry"); | |||
jLayeredPane2.add(jButton1); | |||
jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kontakte/view/img/Delete24.gif"))); // NOI18N | |||
jButton2.setToolTipText("Delete Entry"); | |||
jLayeredPane2.add(jButton2); | |||
jLayeredPane1.add(jLayeredPane2, java.awt.BorderLayout.LINE_START); | |||
jLayeredPane3.setLayout(new java.awt.GridLayout(1, 0)); | |||
textFindTip.setEditable(false); | |||
textFindTip.setText("Find Entry:"); | |||
jLayeredPane3.add(textFindTip); | |||
textFind.setToolTipText("Find"); | |||
jLayeredPane3.add(textFind); | |||
jLayeredPane1.add(jLayeredPane3, java.awt.BorderLayout.PAGE_START); | |||
getContentPane().add(jLayeredPane1, java.awt.BorderLayout.CENTER); | |||
menuFile.setMnemonic('F'); | |||
menuFile.setText("File"); | |||
menuOpen.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK)); | |||
menuOpen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kontakte/view/img/Open16.gif"))); // NOI18N | |||
menuOpen.setMnemonic('O'); | |||
menuOpen.setText("Open"); | |||
menuOpen.setToolTipText(""); | |||
menuFile.add(menuOpen); | |||
menuSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); | |||
menuSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kontakte/view/img/Save16.gif"))); // NOI18N | |||
menuSave.setMnemonic('S'); | |||
menuSave.setText("Save"); | |||
menuFile.add(menuSave); | |||
menuClose.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK)); | |||
menuClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kontakte/view/img/Export16.gif"))); // NOI18N | |||
menuClose.setMnemonic('C'); | |||
menuClose.setText("Close"); | |||
menuFile.add(menuClose); | |||
jMenuBar1.add(menuFile); | |||
menuEdit.setText("Edit"); | |||
menuAddEntry.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PLUS, java.awt.event.InputEvent.CTRL_MASK)); | |||
menuAddEntry.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kontakte/view/img/Add16.gif"))); // NOI18N | |||
menuAddEntry.setMnemonic('A'); | |||
menuAddEntry.setText("Add Entry"); | |||
menuAddEntry.setToolTipText(""); | |||
menuEdit.add(menuAddEntry); | |||
menuDeleteEntry.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK)); | |||
menuDeleteEntry.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kontakte/view/img/Delete16.gif"))); // NOI18N | |||
menuDeleteEntry.setMnemonic('D'); | |||
menuDeleteEntry.setText("Delete Entry"); | |||
menuEdit.add(menuDeleteEntry); | |||
jMenuBar1.add(menuEdit); | |||
setJMenuBar(jMenuBar1); | |||
pack(); | |||
}// </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(View.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); | |||
} | |||
catch (InstantiationException ex) | |||
{ | |||
java.util.logging.Logger.getLogger(View.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); | |||
} | |||
catch (IllegalAccessException ex) | |||
{ | |||
java.util.logging.Logger.getLogger(View.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); | |||
} | |||
catch (javax.swing.UnsupportedLookAndFeelException ex) | |||
{ | |||
java.util.logging.Logger.getLogger(View.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); | |||
} | |||
//</editor-fold> | |||
//</editor-fold> | |||
/* Create and display the form */ | |||
EventQueue.invokeLater(new Runnable() | |||
{ | |||
public void run() | |||
{ | |||
new View().setVisible(true); | |||
} | |||
}); | |||
} | |||
// Variables declaration - do not modify//GEN-BEGIN:variables | |||
private javax.swing.JFrame addEntryFrame; | |||
private javax.swing.JButton btnCancel; | |||
private javax.swing.JButton btnClose; | |||
private javax.swing.JButton btnOk; | |||
private javax.swing.JButton btnOpen; | |||
private javax.swing.JButton btnSave; | |||
private javax.swing.JFileChooser fileChooser; | |||
private javax.swing.JButton jButton1; | |||
private javax.swing.JButton jButton2; | |||
private javax.swing.JLayeredPane jLayeredPane1; | |||
private javax.swing.JLayeredPane jLayeredPane2; | |||
private javax.swing.JLayeredPane jLayeredPane3; | |||
private javax.swing.JLayeredPane jLayeredPane4; | |||
private javax.swing.JLayeredPane jLayeredPane5; | |||
private javax.swing.JLayeredPane jLayeredPane6; | |||
private javax.swing.JLayeredPane jLayeredPane7; | |||
private javax.swing.JLayeredPane jLayeredPane8; | |||
private javax.swing.JMenuBar jMenuBar1; | |||
private javax.swing.JScrollPane jScrollPane1; | |||
private javax.swing.JTextField jTextField1; | |||
private javax.swing.JTextField jTextField3; | |||
private javax.swing.JTextField jTextField5; | |||
private javax.swing.JToolBar jToolBar1; | |||
private javax.swing.JMenuItem menuAddEntry; | |||
private javax.swing.JMenuItem menuClose; | |||
private javax.swing.JMenuItem menuDeleteEntry; | |||
private javax.swing.JMenu menuEdit; | |||
private javax.swing.JMenu menuFile; | |||
private javax.swing.JMenuItem menuOpen; | |||
private javax.swing.JMenuItem menuSave; | |||
private javax.swing.JTable tableContacts; | |||
private javax.swing.JTextField textCity; | |||
private javax.swing.JTextField textFileAdress; | |||
private javax.swing.JTextField textFind; | |||
private javax.swing.JTextField textFindTip; | |||
private javax.swing.JTextField textName; | |||
private javax.swing.JTextField textStreet; | |||
// End of variables declaration//GEN-END:variables | |||
} |