Addestratore cani: come trovare addestratori cinofili
Come Scegliere un Addestratore per Cani Cinofilo.
Come Selezionare un Allenatore per Cani da Competizione Cinofila.
Scopri come scegliere il miglior addestratore per cani, un passo fondamentale per garantire un'educazione adeguata al tuo amico a quattro zampe. Analizziamo i criteri da considerare, le competenze richieste e le domande da porre per assicurarti di trovare un professionista qualificato e affidabile.
Trova professionisti vicino a te
Trova professionisti
/*
* Copyright (c) 2004-2013 The YAWL Foundation. All rights reserved.
* The YAWL Foundation is a collaboration of individuals and
* organisations who are committed to improving workflow technology.
*
* This file is part of YAWL. YAWL is free software: you can
* redistribute it and/or modify it under the terms of the GNU Lesser
* General Public License as published by the Free Software Foundation.
*
* YAWL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
* Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with YAWL. If not, see .
*/
package org.yawlfoundation.yawl.editor.ui.properties;
import org.yawlfoundation.yawl.editor.ui.properties.dialog.component.ResourcingParticipant;
import org.yawlfoundation.yawl.editor.ui.properties.dialog.component.ResourcingParticipantTable;
import org.yawlfoundation.yawl.editor.ui.swing.AbstractDoneListener;
import org.yawlfoundation.yawl.editor.ui.swing.MessageDialog;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* @author Michael Adams
* @date 16/07/13
*/
public class ResourcingParticipantEditor extends JPanel {
private ResourcingParticipantTable participantTable;
private List participants;
private List originalParticipants;
public ResourcingParticipantEditor(final ResourcingParticipantTable table,
List participants) {
this.participantTable = table;
this.participants = new ArrayList(participants);
this.originalParticipants = new ArrayList(participants);
setLayout(new BorderLayout());
add(buildButtonPanel(), BorderLayout.SOUTH);
add(table, BorderLayout.CENTER);
}
public boolean dataChanged() {
return ! participants.equals(originalParticipants);
}
public List getParticipants() {
return new ArrayList(participants);
}
private JPanel buildButtonPanel() {
JPanel panel = new JPanel(new FlowLayout());
panel.add(buildAddButton());
panel.add(buildRemoveButton());
panel.add(buildEditButton());
panel.add(buildDoneButton());
return panel;
}
private JButton buildAddButton() {
JButton btn = new JButton("Add");
btn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
ResourcingParticipant participant = participantTable.addParticipant();
if (participant != null) participants.add(participant);
}
});
return btn;
}
private JButton buildEditButton() {
JButton btn = new JButton("Edit");
btn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
ResourcingParticipant participant =
participantTable.editSelectedParticipant();
if (participant != null) {
int row = participantTable.getSelectedRow();
if (row > -1) participants.set(row, participant);
}
}
});
return btn;
}
private JButton buildRemoveButton() {
JButton btn = new JButton("Remove");
btn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
int row = participantTable.getSelectedRow();
if (row > -1) {
participants.remove(row);
participantTable.removeParticipant(row);
}
}
});
return btn;
}
private JButton buildDoneButton() {
JButton btn = new JButton("Done");
btn.addActionListener(new AbstractDoneListener() {
public void doApply() {
if (participants.isEmpty()) {
MessageDialog.warning("At least one participant must be specified",
"Edit Participants");
return;
}
Collections.sort(participants);
participantTable.refreshTable(participants);
}
});
return btn;
}
}