001: /*
002: * SalomeTMF is a Test Management Framework
003: * Copyright (C) 2005 France Telecom R&D
004: *
005: * This library is free software; you can redistribute it and/or
006: * modify it under the terms of the GNU Lesser General Public
007: * License as published by the Free Software Foundation; either
008: * version 2 of the License, or (at your option) any later version.
009: *
010: * This library is distributed in the hope that it will be useful,
011: * but WITHOUT ANY WARRANTY; without even the implied warranty of
012: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
013: * Lesser General Public License for more details.
014: *
015: * You should have received a copy of the GNU Lesser General Public
016: * License along with this library; if not, write to the Free Software
017: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
018: *
019: * @author Fayçal SOUGRATI, Vincent Pautret, Marche Mikael
020: *
021: * Contact: mikael.marche@rd.francetelecom.com
022: */
023:
024: package org.objectweb.salome_tmf.ihm.models;
025:
026: import javax.swing.tree.DefaultMutableTreeNode;
027:
028: public class TestListFamilyCampaignTreeNode {
029:
030: DefaultMutableTreeNode campaignNode;
031:
032: DefaultMutableTreeNode familyNode;
033:
034: DefaultMutableTreeNode testListNode;
035:
036: /**
037: * @return
038: */
039: public DefaultMutableTreeNode getFamilyNode() {
040: return familyNode;
041: }
042:
043: /**
044: * @return
045: */
046: public DefaultMutableTreeNode getTestListNode() {
047: return testListNode;
048: }
049:
050: /**
051: * @param node
052: */
053: public void setFamilyNode(DefaultMutableTreeNode node) {
054: familyNode = node;
055: }
056:
057: /**
058: * @param node
059: */
060: public void setTestListNode(DefaultMutableTreeNode node) {
061: testListNode = node;
062: }
063:
064: public String toString() {
065: if (campaignNode == null) {
066: if (testListNode == null) {
067: return familyNode.toString();
068: } else {
069: return familyNode.toString() + " / "
070: + testListNode.toString();
071: }
072: } else if (testListNode == null) {
073: if (familyNode == null) {
074: return campaignNode.toString();
075: } else {
076: return campaignNode.toString() + " / "
077: + familyNode.toString();
078: }
079: } else {
080: return campaignNode.toString() + " / "
081: + familyNode.toString() + " / "
082: + testListNode.toString();
083: }
084:
085: }
086:
087: /**
088: * @return
089: */
090: public DefaultMutableTreeNode getCampaignNode() {
091: return campaignNode;
092: }
093:
094: /**
095: * @param node
096: */
097: public void setCampaignNode(DefaultMutableTreeNode node) {
098: campaignNode = node;
099: }
100:
101: } // Fin de la classe TestListFamilyTreeNode
|