Skip to content

Commit

Permalink
support person "endedatum"
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Oct 15, 2014
1 parent a471e74 commit fd578a1
Show file tree
Hide file tree
Showing 5 changed files with 517 additions and 308 deletions.
83 changes: 83 additions & 0 deletions src/de/mpg/molgen/buczek/portifix/GridBagTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
* 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 de.mpg.molgen.buczek.portifix;

import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Graphics;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.border.Border;

/**
*
* @author buczek
*/
public class GridBagTest extends javax.swing.JFrame {

Container pane;


public GridBagTest() {
pane=getContentPane();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
pane.setLayout(new GridBagLayout());
addComponent(0,0,false,new JLabel("Bla:"));
addComponent(0,1,true, new JLabel("lalaalallaala"));
addComponent(1,0,false,new JLabel("Label:"));
addComponent(1,1,true, new JLabel("lalallaala"));
addComponent(2,0,false,new JLabel("Label:"));
addComponent(2,1,true, new JTextField());

addComponent(0,2,false,new JLabel(" "));

addComponent(0,3,false,new JLabel("Bla:"));
addComponent(0,4,true, new JLabel("lalaalallaala"));
addComponent(1,3,false,new JLabel("Label:"));
addComponent(1,4,true, new JLabel("lalallaala"));
addComponent(2,3,false,new JLabel("Label:"));
addComponent(2,4,true, new JTextField());




pack();
setVisible(true);
}

public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new GridBagTest();
}
});
}


GridBagConstraints constraints=new GridBagConstraints();

private void addComponent(int row,int col,boolean fill,Component component) {
constraints.gridx=col;
constraints.gridy=row;
constraints.fill=fill ? GridBagConstraints.HORIZONTAL : GridBagConstraints.NONE;
// constraints.fill=GridBagConstraints.HORIZONTAL;
constraints.weightx=fill ? 1 : 0;
constraints.weighty=0;
constraints.anchor=GridBagConstraints.LINE_START;
//constraints.ipadx=10;
//constraints.ipady=10;
constraints.insets=new Insets(5,10,5,10);
pane.add(component,constraints);
}


}
191 changes: 112 additions & 79 deletions src/de/mpg/molgen/buczek/portifix/Gui.form
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,21 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="jButton_saveall" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jButton_savethis" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jButton_cancel" min="-2" pref="78" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="jButton_refresh" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="jPanel3" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="38" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="button_ok" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jTextField_datum" min="-2" pref="122" max="-2" attributes="0"/>
<Component id="button_cancel" min="-2" pref="78" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="button_refresh" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
Expand All @@ -79,24 +76,17 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<EmptySpace min="-2" pref="99" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jTextField_datum" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="jPanel2" max="32767" attributes="0"/>
<Component id="jPanel3" max="32767" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jButton_saveall" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jButton_savethis" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jButton_cancel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jButton_refresh" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="button_ok" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="button_cancel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="button_refresh" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand All @@ -108,39 +98,40 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="jLabel3" linkSize="1" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jLabel_abteilung" max="32767" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="jLabel5" linkSize="1" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jLabel_schluessel" max="32767" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="jLabel1" linkSize="1" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jLabel_name" pref="292" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel1" linkSize="1" min="-2" max="-2" attributes="0"/>
<Component id="jLabel3" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="textField_endedatum" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="label_name" pref="162" max="32767" attributes="0"/>
<Component id="label_abteilung" alignment="0" max="32767" attributes="0"/>
</Group>
<EmptySpace pref="56" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel_name" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="label_name" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" alignment="3" min="-2" pref="16" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel_abteilung" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="label_abteilung" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel_schluessel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="textField_endedatum" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand All @@ -156,65 +147,107 @@
<Property name="text" type="java.lang.String" value="Abteilung:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel5">
<Properties>
<Property name="text" type="java.lang.String" value="Schl&#xfc;ssel:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel_schluessel">
<Component class="javax.swing.JLabel" name="jLabel2">
<Properties>
<Property name="text" type="java.lang.String" value="Schl&#xfc;ssel"/>
<Property name="text" type="java.lang.String" value="Ende Datum:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel_name">
<Component class="javax.swing.JLabel" name="label_name">
<Properties>
<Property name="text" type="java.lang.String" value="Donald Buczek"/>
<Property name="toolTipText" type="java.lang.String" value=""/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel_abteilung">
<Component class="javax.swing.JLabel" name="label_abteilung">
<Properties>
<Property name="text" type="java.lang.String" value="Allgemein"/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="textField_endedatum">
<Properties>
<Property name="columns" type="int" value="10"/>
<Property name="text" type="java.lang.String" value="01.01.1988"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JButton" name="jButton_saveall">
<Properties>
<Property name="text" type="java.lang.String" value="&lt;html&gt;Speichern&lt;br&gt;(alle Schl&#xfc;ssel dieser Person)"/>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton_saveallActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="jButton_cancel">
<Component class="javax.swing.JButton" name="button_cancel">
<Properties>
<Property name="text" type="java.lang.String" value="Cancel"/>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="jButton_refresh">
<Component class="javax.swing.JButton" name="button_refresh">
<Properties>
<Property name="text" type="java.lang.String" value="Refresh"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton_refreshActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="jButton_savethis">
<Component class="javax.swing.JButton" name="button_ok">
<Properties>
<Property name="text" type="java.lang.String" value="&lt;html&gt;Speichern&lt;br&gt;(nur diese Schl&#xfc;ssel)"/>
<Property name="text" type="java.lang.String" value="OK"/>
<Property name="actionCommand" type="java.lang.String" value="OK"/>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel7">
<Properties>
<Property name="text" type="java.lang.String" value="R&#xfc;ckgabe bis:"/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="jTextField_datum">
</Component>
<Container class="javax.swing.JPanel" name="jPanel3">

<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel7" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="textField_datum" min="-2" max="-2" attributes="0"/>
<Component id="label_schluessel" pref="159" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="label_schluessel" alignment="3" max="32767" attributes="0"/>
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="textField_datum" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="34" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="label_schluessel">
<Properties>
<Property name="text" type="java.lang.String" value="Schl&#xfc;ssel"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel5">
<Properties>
<Property name="text" type="java.lang.String" value="Schl&#xfc;ssel:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel7">
<Properties>
<Property name="text" type="java.lang.String" value="R&#xfc;ckgabe bis:"/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="textField_datum">
<Properties>
<Property name="columns" type="int" value="10"/>
<Property name="text" type="java.lang.String" value="01.01.1988"/>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Container>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
Expand Down
Loading

0 comments on commit fd578a1

Please sign in to comment.