Exemplo n.º 1
0
  void printButton_actionPerformed(ActionEvent e) {
    if (objectTable.getSelectedRow() == -1) {
      JOptionPane.showMessageDialog(this.getTopLevelAncestor(), "No row selected!");
      return;
    }

    printCurrent();
  }
Exemplo n.º 2
0
 @Override
 public void valueChanged(final ListSelectionEvent e) {
   if (tblKassenzeichen.getSelectedRowCount() > 0) {
     btnLoadSelectedKassenzeichen.setEnabled(true);
   } else {
     btnLoadSelectedKassenzeichen.setEnabled(false);
   }
 }
Exemplo n.º 3
0
 /**
  * Creates new form VerdisCrossoverPanel.
  *
  * @param verdisCrossoverPort DOCUMENT ME!
  */
 public VerdisCrossoverPanel(final int verdisCrossoverPort) {
   initComponents();
   configurePopupMenue();
   panAll.setLayout(layout);
   panAll.removeAll();
   panAll.add(panContentProgress, PROGRESS_CARD_NAME);
   panAll.add(panContent, CONTENT_CARD_NAME);
   panAll.add(panContentMessage, MESSAGE_CARD_NAME);
   // TODO Jean
   tblKassenzeichen.setModel(tableModel);
   tblKassenzeichen.addMouseListener(this);
   tblKassenzeichen.addMouseListener(new PopupListener());
   tblKassenzeichen.getSelectionModel().addListSelectionListener(this);
   this.verdisCrossoverPort = verdisCrossoverPort;
   pgbProgress.setIndeterminate(true);
   //        this.add(panContentProgress, BorderLayout.CENTER);
   layout.show(panAll, PROGRESS_CARD_NAME);
 }
Exemplo n.º 4
0
  void removeButton_actionPerformed(ActionEvent e) {
    if (objectTable.getSelectedRow() == -1) {
      JOptionPane.showMessageDialog(this.getTopLevelAncestor(), "No row selected!");
      return;
    }

    int returnValue =
        JOptionPane.showConfirmDialog(
            this.getTopLevelAncestor(), "Are you sure?", "Deletion", JOptionPane.YES_NO_OPTION);

    if (returnValue == 1) {
      return;
    }

    removeCurrent();
  }
Exemplo n.º 5
0
 // TODO Jean
 private void loadSelectedKassenzeichen() {
   try {
     final int selectedRow = tblKassenzeichen.getSelectedRow();
     if (selectedRow != -1) {
       final int modelIndex = ((JXTable) tblKassenzeichen).convertRowIndexToModel(selectedRow);
       if (modelIndex != -1) {
         final CidsBean selectedKassenzeichen = tableModel.getKassenzeichenAtIndex(modelIndex);
         if (selectedKassenzeichen != null) {
           openKassenzeichenInVerdis(selectedKassenzeichen);
         } else {
           log.warn("Crossover: Kein Kassenzeichen zu angebenen Index.");
         }
       } else {
         log.warn("Crossover: Kein ModelIndex zu angebenen ViewIndex.");
       }
     } else {
       if (log.isDebugEnabled()) {
         log.debug("Crossover: Keine Tabellenzeile selektiert.");
       }
     }
   } catch (Exception ex) {
     log.error("Fehler beim laden des selektierten Kasssenzeichens", ex);
   }
 }
Exemplo n.º 6
0
  /**
   * 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() {
    panControl = new javax.swing.JPanel();
    btnClose = new javax.swing.JButton();
    btnLoadSelectedKassenzeichen = new javax.swing.JButton();
    panAll = new javax.swing.JPanel();
    panContentProgress = new javax.swing.JPanel();
    pgbProgress = new javax.swing.JProgressBar();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    panContentMessage = new javax.swing.JPanel();
    lblMessage = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    panContent = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    tblKassenzeichen = new JXTable();

    setPreferredSize(new java.awt.Dimension(500, 200));

    panControl.setMinimumSize(new java.awt.Dimension(50, 50));
    panControl.setPreferredSize(new java.awt.Dimension(300, 50));

    btnClose.setText(
        org.openide.util.NbBundle.getMessage(
            VerdisCrossoverPanel.class, "VerdisCrossoverPanel.btnClose.text")); // NOI18N
    btnClose.addActionListener(
        new java.awt.event.ActionListener() {

          @Override
          public void actionPerformed(final java.awt.event.ActionEvent evt) {
            btnCloseActionPerformed(evt);
          }
        });

    btnLoadSelectedKassenzeichen.setIcon(
        new javax.swing.ImageIcon(
            getClass()
                .getResource("/de/cismet/lagis/ressource/icons/buttons/postion.png"))); // NOI18N
    btnLoadSelectedKassenzeichen.setText(
        org.openide.util.NbBundle.getMessage(
            VerdisCrossoverPanel.class,
            "VerdisCrossoverPanel.btnLoadSelectedKassenzeichen.text")); // NOI18N
    btnLoadSelectedKassenzeichen.setToolTipText(
        org.openide.util.NbBundle.getMessage(
            VerdisCrossoverPanel.class,
            "VerdisCrossoverPanel.btnLoadSelectedKassenzeichen.toolTipText")); // NOI18N
    btnLoadSelectedKassenzeichen.setEnabled(false);
    btnLoadSelectedKassenzeichen.addActionListener(
        new java.awt.event.ActionListener() {

          @Override
          public void actionPerformed(final java.awt.event.ActionEvent evt) {
            btnLoadSelectedKassenzeichenActionPerformed(evt);
          }
        });

    final javax.swing.GroupLayout panControlLayout = new javax.swing.GroupLayout(panControl);
    panControl.setLayout(panControlLayout);
    panControlLayout.setHorizontalGroup(
        panControlLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                panControlLayout
                    .createSequentialGroup()
                    .addContainerGap(378, Short.MAX_VALUE)
                    .addComponent(btnLoadSelectedKassenzeichen)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(btnClose)
                    .addContainerGap()));
    panControlLayout.setVerticalGroup(
        panControlLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                panControlLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        panControlLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnClose)
                            .addComponent(btnLoadSelectedKassenzeichen))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    panControlLayout.linkSize(
        javax.swing.SwingConstants.VERTICAL,
        new java.awt.Component[] {btnClose, btnLoadSelectedKassenzeichen});

    panAll.setPreferredSize(new java.awt.Dimension(400, 251));
    panAll.setLayout(new java.awt.CardLayout());

    panContentProgress.setPreferredSize(new java.awt.Dimension(250, 140));

    jLabel1.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/cismet/lagis/ressource/icons/searching.png"))); // NOI18N

    jLabel2.setText(
        org.openide.util.NbBundle.getMessage(
            VerdisCrossoverPanel.class, "VerdisCrossoverPanel.jLabel2.text")); // NOI18N

    final javax.swing.GroupLayout panContentProgressLayout =
        new javax.swing.GroupLayout(panContentProgress);
    panContentProgress.setLayout(panContentProgressLayout);
    panContentProgressLayout.setHorizontalGroup(
        panContentProgressLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                panContentProgressLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        panContentProgressLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                pgbProgress,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                400,
                                Short.MAX_VALUE)
                            .addComponent(jLabel2))
                    .addContainerGap()));
    panContentProgressLayout.setVerticalGroup(
        panContentProgressLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                panContentProgressLayout
                    .createSequentialGroup()
                    .addContainerGap(49, Short.MAX_VALUE)
                    .addGroup(
                        panContentProgressLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(
                                panContentProgressLayout
                                    .createSequentialGroup()
                                    .addComponent(jLabel2)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        pgbProgress,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(12, 12, 12))
                            .addComponent(
                                jLabel1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                67,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));

    panAll.add(panContentProgress, "card3");

    panContentMessage.setPreferredSize(new java.awt.Dimension(250, 140));

    lblMessage.setText(
        org.openide.util.NbBundle.getMessage(
            VerdisCrossoverPanel.class, "VerdisCrossoverPanel.lblMessage.text")); // NOI18N

    jLabel3.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/cismet/lagis/ressource/icons/warn.png"))); // NOI18N
    jLabel3.setText(
        org.openide.util.NbBundle.getMessage(
            VerdisCrossoverPanel.class, "VerdisCrossoverPanel.jLabel3.text")); // NOI18N

    final javax.swing.GroupLayout panContentMessageLayout =
        new javax.swing.GroupLayout(panContentMessage);
    panContentMessage.setLayout(panContentMessageLayout);
    panContentMessageLayout.setHorizontalGroup(
        panContentMessageLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                panContentMessageLayout
                    .createSequentialGroup()
                    .addContainerGap(28, Short.MAX_VALUE)
                    .addComponent(
                        jLabel3,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        54,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        lblMessage,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        388,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));
    panContentMessageLayout.setVerticalGroup(
        panContentMessageLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                panContentMessageLayout
                    .createSequentialGroup()
                    .addContainerGap(49, Short.MAX_VALUE)
                    .addGroup(
                        panContentMessageLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(
                                jLabel3,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                67,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                lblMessage,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                59,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));

    panAll.add(panContentMessage, "card2");

    tblKassenzeichen.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(tblKassenzeichen);

    final javax.swing.GroupLayout panContentLayout = new javax.swing.GroupLayout(panContent);
    panContent.setLayout(panContentLayout);
    panContentLayout.setHorizontalGroup(
        panContentLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                panContentLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 476, Short.MAX_VALUE)
                    .addContainerGap()));
    panContentLayout.setVerticalGroup(
        panContentLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                panContentLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)
                    .addContainerGap()));

    panAll.add(panContent, "card4");

    final javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panAll, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
            .addComponent(
                panControl,
                javax.swing.GroupLayout.Alignment.TRAILING,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                500,
                Short.MAX_VALUE));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addComponent(
                        panAll, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        panControl,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        54,
                        javax.swing.GroupLayout.PREFERRED_SIZE)));
  } // </editor-fold>//GEN-END:initComponents