예제 #1
0
  private UIFSplitPane grundSplit() {
    jSplitLR =
        UIFSplitPane.createStrippedSplitPane(JSplitPane.HORIZONTAL_SPLIT, neuLayout(), panelRadio);
    jSplitLR.setOpaque(false);
    jSplitLR.setBackground(Color.WHITE);
    jSplitLR.setDividerSize(7);
    jSplitLR.addPropertyChangeListener(
        new PropertyChangeListener() {

          public void propertyChange(PropertyChangeEvent arg0) {
            dividerLocLR = jSplitLR.getDividerLocation();
            int letzte = ((UIFSplitPane) arg0.getSource()).getLastDividerLocation();
            for (int i = 0; i < 1; i++) {
              if ((letzte == 290) && (dividerLocLR == 279)) {
                jSplitLR.setDividerLocation(0);
                break;
              }
              if ((letzte == 0) && (dividerLocLR == 279)) {
                jSplitLR.setDividerLocation(290);
                break;
              }
              if ((letzte == 0) && (dividerLocLR == 0)) {
                jSplitLR.setDividerLocation(290);
                break;
              }
              if ((letzte == 290) && (dividerLocLR == 290)) {
                jSplitLR.setDividerLocation(0);
                break;
              }
            }
          }
        });

    jSplitLR.setDividerBorderVisible(false);
    jSplitLR.setName("GrundSplitLinksRechts");
    jSplitLR.setOneTouchExpandable(true);
    dividerLocLR = 400;
    jSplitLR.setDividerLocation(400);
    return jSplitLR;
  }
예제 #2
0
  /**
   * This method initializes jContentPane
   *
   * @return javax.swing.JPanel
   */
  private JXPanel getJContentPane() {
    if (jContentPane == null) {

      jContentPane = new JXPanel();
      jContentPane.setBackground(Color.WHITE);
      jContentPane.setBackgroundPainter(Reha.thisClass.compoundPainter.get("Zeitfenster"));
      jContentPane.setBorder(BorderFactory.createLineBorder(Color.BLUE));
      jContentPane.setOpaque(true);
      jContentPane.setLayout(new BorderLayout());

      jContentPane.setPreferredSize(new Dimension(480, 80));

      panelRadio = new JXPanel(new BorderLayout());
      panelRadio.setBorder(BorderFactory.createEmptyBorder(5, 20, 5, 20));
      panelRadio.setBackgroundPainter(Reha.thisClass.compoundPainter.get("Zeitfenster"));
      panelRadio.setPreferredSize(new Dimension(480, 80));
      panelRadio.add(radioPan(), BorderLayout.CENTER);

      jContentPane.add(grundSplit(), BorderLayout.CENTER);
      jContentPane.addKeyListener(this);
    }
    jSplitLR.setDividerLocation(399);
    return jContentPane;
  }
예제 #3
0
  public void actionPerformed(ActionEvent arg0) {
    // TODO Auto-generated method stub
    if (((JComponent) arg0.getSource()).getName().equals("Ok")) {
      int dauer1 = Integer.parseInt((String) ((JRtaTextField) Dauer).getText());
      int dauer2 =
          (int)
              ZeitFunk.MinutenSeitMitternacht(
                  BeginnStunde.getText() + ":" + BeginnMinute.getText() + ":00");
      int dauer3 =
          (int)
              ZeitFunk.MinutenSeitMitternacht(
                  EndeStunde.getText() + ":" + EndeMinute.getText() + ":00");

      if (dauer3 <= dauer2) {
        WerteSetzen(false);
        Dauer.requestFocus();
        return;
      }
      if ((dauer3 - dauer2) != dauer1) {
        String sEnde;
        sEnde = ZeitFunk.MinutenZuZeit(dauer2 + dauer1);
        EndeStunde.setText(sEnde.split(":")[0]);
        EndeMinute.setText(sEnde.split(":")[1]);
      }

      dauer2 =
          (int)
              ZeitFunk.MinutenSeitMitternacht(
                  BeginnStunde.getText() + ":" + BeginnMinute.getText() + ":00");
      dauer3 =
          (int)
              ZeitFunk.MinutenSeitMitternacht(
                  EndeStunde.getText() + ":" + EndeMinute.getText() + ":00");
      dauer1 = dauer3 - dauer2;
      if (dauer1 != Integer.parseInt(Dauer.getText().trim())) {
        WerteSetzen(false);
        Dauer.requestFocus();
        return;
      }
      if (dauer1 <= 0) {
        WerteSetzen(false);
        Dauer.requestFocus();
        return;
      }

      Beenden(1);
    }
    if (((JComponent) arg0.getSource()).getName().equals("Abbruch")) {
      Beenden(0);
    }
    if (((JComponent) arg0.getSource()).getName().equals("radio1")) {
      //// System.out.println("Rechenart = 0");
      rechenart = 0;
      jSplitLR.setDividerLocation(399);
      Dauer.requestFocus();
    }
    if (((JComponent) arg0.getSource()).getName().equals("radio2")) {
      //// System.out.println("Rechenart = 1");
      rechenart = 1;
      jSplitLR.setDividerLocation(399);
      Dauer.requestFocus();
    }
    if (((JComponent) arg0.getSource()).getName().equals("radio3")) {
      //// System.out.println("Rechenart = 2");
      rechenart = 2;
      jSplitLR.setDividerLocation(399);
      BeginnStunde.requestFocus();
    }
  }