001: /*
002: Copyright (c) 2003 eInnovation Inc. All rights reserved
003:
004: This library is free software; you can redistribute it and/or modify it under the terms
005: of the GNU Lesser General Public License as published by the Free Software Foundation;
006: either version 2.1 of the License, or (at your option) any later version.
007:
008: This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
009: without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
010: See the GNU Lesser General Public License for more details.
011: */
012:
013: package com.openedit.webui.list;
014:
015: import javax.swing.ListModel;
016:
017: /**
018: * This class represents a node in a <code>{@link ListModel}</code>. It has the attributes most
019: * people will need: name, URL, and icon URL.
020: *
021: * @author Eric and Matt
022: */
023: public class DefaultWebListNode {
024: protected String fieldIconURL;
025: protected String fieldName;
026: protected String fieldURL;
027:
028: /**
029: * Create a tree node with the given name, without an icon or link.
030: *
031: * @param inName DOCUMENT ME!
032: */
033: public DefaultWebListNode(String inName) {
034: this (inName, null, null);
035: }
036:
037: /**
038: * Create a tree node with the given name and link, without an icon.
039: *
040: * @param inName DOCUMENT ME!
041: * @param inURL DOCUMENT ME!
042: */
043: public DefaultWebListNode(String inName, String inURL) {
044: this (inName, inURL, null);
045: }
046:
047: /**
048: * Create a tree node with the given name, link, and icon.
049: *
050: * @param inName DOCUMENT ME!
051: * @param inURL DOCUMENT ME!
052: * @param inIconURL DOCUMENT ME!
053: */
054: public DefaultWebListNode(String inName, String inURL,
055: String inIconURL) {
056: fieldName = inName;
057: fieldURL = inURL;
058: fieldIconURL = inIconURL;
059: }
060:
061: /**
062: * Sets the icon URL.
063: *
064: * @param iconURL The icon URL to set
065: */
066: public void setIconURL(String iconURL) {
067: fieldIconURL = iconURL;
068: }
069:
070: /**
071: * Gets the icon URL.
072: *
073: * @return Returns a String
074: */
075: public String getIconURL() {
076: return fieldIconURL;
077: }
078:
079: /**
080: * Sets the name.
081: *
082: * @param name The name to set
083: */
084: public void setName(String name) {
085: fieldName = name;
086: }
087:
088: /**
089: * Gets the name.
090: *
091: * @return Returns a String
092: */
093: public String getName() {
094: return fieldName;
095: }
096:
097: /**
098: * Sets the URL.
099: *
100: * @param url The URL to set
101: */
102: public void setURL(String url) {
103: fieldURL = url;
104: }
105:
106: /**
107: * Gets the URL.
108: *
109: * @return Returns a String
110: */
111: public String getURL() {
112: return fieldURL;
113: }
114: }
|