001: /*
002: * $Header: /cvsroot/mvnforum/mvnforum/src/com/mvnforum/common/ForumIconLegend.java,v 1.4 2007/10/09 11:09:16 lexuanttkhtn Exp $
003: * $Author: lexuanttkhtn $
004: * $Revision: 1.4 $
005: * $Date: 2007/10/09 11:09:16 $
006: *
007: * ====================================================================
008: *
009: * Copyright (C) 2002-2007 by MyVietnam.net
010: *
011: * All copyright notices regarding mvnForum MUST remain
012: * intact in the scripts and in the outputted HTML.
013: * The "powered by" text/logo with a link back to
014: * http://www.mvnForum.com and http://www.MyVietnam.net in
015: * the footer of the pages MUST remain visible when the pages
016: * are viewed on the internet or intranet.
017: *
018: * This program is free software; you can redistribute it and/or modify
019: * it under the terms of the GNU General Public License as published by
020: * the Free Software Foundation; either version 2 of the License, or
021: * any later version.
022: *
023: * This program is distributed in the hope that it will be useful,
024: * but WITHOUT ANY WARRANTY; without even the implied warranty of
025: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
026: * GNU General Public License for more details.
027: *
028: * You should have received a copy of the GNU General Public License
029: * along with this program; if not, write to the Free Software
030: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
031: *
032: * Support can be obtained from support forums at:
033: * http://www.mvnForum.com/mvnforum/index
034: *
035: * Correspondence and Marketing Questions can be sent to:
036: * info at MyVietnam net
037: *
038: * @author: Dung Bui
039: */
040:
041: package com.mvnforum.common;
042:
043: public class ForumIconLegend {
044:
045: public static final String FORUM_ICON_READ_ACTIVE = "f_read_active.gif";
046: public static final String FORUM_ICON_READ_CLOSED = "f_read_closed.gif";
047: public static final String FORUM_ICON_READ_LOCKED = "f_read_locked.gif";
048: public static final String FORUM_ICON_READ_DISABLED = "f_read_disabled.gif";
049: public static final String FORUM_ICON_UNREAD_ACTIVE = "f_unread_active.gif";
050: public static final String FORUM_ICON_UNREAD_CLOSED = "f_unread_closed.gif";
051: public static final String FORUM_ICON_UNREAD_LOCKED = "f_unread_locked.gif";
052: public static final String FORUM_ICON_UNREAD_DISABLED = "f_unread_disabled.gif";
053:
054: private boolean hasReadActiveForum = false;
055: private boolean hasUnreadActiveForum = false;
056: private boolean hasReadClosedForum = false;
057: private boolean hasUnreadClosedForum = false;
058: private boolean hasReadLockedForum = false;
059: private boolean hasUnreadLockedForum = false;
060: private boolean hasReadDisabledForum = false;
061: private boolean hasUnreadDisabledForum = false;
062:
063: public void updateIconLegend(String forumIcon) {
064: if (forumIcon.equals(FORUM_ICON_READ_ACTIVE)) {
065: hasReadActiveForum = true;
066: } else if (forumIcon.equals(FORUM_ICON_READ_CLOSED)) {
067: hasReadClosedForum = true;
068: } else if (forumIcon.equals(FORUM_ICON_READ_LOCKED)) {
069: hasReadLockedForum = true;
070: } else if (forumIcon.equals(FORUM_ICON_READ_DISABLED)) {
071: hasReadDisabledForum = true;
072: } else if (forumIcon.equals(FORUM_ICON_UNREAD_ACTIVE)) {
073: hasUnreadActiveForum = true;
074: } else if (forumIcon.equals(FORUM_ICON_UNREAD_CLOSED)) {
075: hasUnreadClosedForum = true;
076: } else if (forumIcon.equals(FORUM_ICON_UNREAD_LOCKED)) {
077: hasUnreadLockedForum = true;
078: } else if (forumIcon.equals(FORUM_ICON_UNREAD_DISABLED)) {
079: hasUnreadDisabledForum = true;
080: }
081: }
082:
083: public boolean isHasReadActiveForum() {
084: return hasReadActiveForum;
085: }
086:
087: public boolean isHasReadClosedForum() {
088: return hasReadClosedForum;
089: }
090:
091: public boolean isHasReadLockedForum() {
092: return hasReadLockedForum;
093: }
094:
095: public boolean isHasReadDisabledForum() {
096: return hasReadDisabledForum;
097: }
098:
099: public boolean isHasUnreadActiveForum() {
100: return hasUnreadActiveForum;
101: }
102:
103: public boolean isHasUnreadClosedForum() {
104: return hasUnreadClosedForum;
105: }
106:
107: public boolean isHasUnreadLockedForum() {
108: return hasUnreadLockedForum;
109: }
110:
111: public boolean isHasUnreadDisabledForum() {
112: return hasUnreadDisabledForum;
113: }
114:
115: }
|