001: //** Copyright Statement ***************************************************
002: //The Salmon Open Framework for Internet Applications (SOFIA)
003: // Copyright (C) 1999 - 2002, Salmon LLC
004: //
005: // This program is free software; you can redistribute it and/or
006: // modify it under the terms of the GNU General Public License version 2
007: // as published by the Free Software Foundation;
008: //
009: // This program is distributed in the hope that it will be useful,
010: // but WITHOUT ANY WARRANTY; without even the implied warranty of
011: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012: // GNU General Public License for more details.
013: //
014: // You should have received a copy of the GNU General Public License
015: // along with this program; if not, write to the Free Software
016: // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
017: //
018: // For more information please visit http://www.salmonllc.com
019: //** End Copyright Statement ***************************************************
020: package com.salmonllc.gui;
021:
022: /**
023: * An interface of methods used to communicate to a group of items in a NavigationMenu
024: * Creation date: (8/23/01 10:03:52 AM)
025: * @author: Fred Cahill
026: */
027:
028: public interface NavigationGroupInterface {
029: /**
030: * Adds an item to a group in a navigation menu
031: * @param submenu String The name of a submenu if item is a submenu otherwise pass null
032: * @param title String The text to appear for the item.
033: * @param href String The href link of an item.
034: * @param target String The target window for the href link of an item.
035: * @param horizPadding int The number of pixels to pad the item by in the menu.
036: * @return NavigationItemInterface The item which was added.
037: */
038: public NavigationItemInterface addItem(String submenu,
039: String title, String href, String target, int horizPadding);
040:
041: /**
042: * Collapses an expanded group.
043: */
044: public void collapse();
045:
046: /**
047: * Contracts an expanded group.
048: */
049: public void contract();
050:
051: /**
052: * Expands a collapsed group.
053: */
054: public void expand();
055:
056: /**
057: * Returns the HRef Link Associated with this Group.
058: * @return String The Href of this group.
059: */
060: public String getHRef();
061:
062: /**
063: * Returns the Image Associated with this Group.
064: * @return String The Image of this group.
065: */
066: public String getImage();
067:
068: /**
069: * Returns the items within this Group.
070: * @return NavigationItemInterface[] Array of items within this group.
071: */
072: public NavigationItemInterface[] getItems();
073:
074: /**
075: * Returns the number of pixels of vertical padding for this Group in the menu.
076: * @return int The number of pixels of vertical padding.
077: */
078: public int getVertPadding();
079:
080: /**
081: * Returns whether this Group is visible or not.
082: * @return boolean Indicates if group is visible or not.
083: */
084: public boolean getVisible();
085:
086: /**
087: * Inserts an item to a group in a navigation menu at specified location
088: * @param submenu String The name of a submenu if item is a submenu otherwise pass null
089: * @param title String The text to appear for the item.
090: * @param href String The href link of an item.
091: * @param target String The target window for the href link of an item.
092: * @param horizPadding int The number of pixels to pad the item by in the menu.
093: * @param iLocation int The index of the Item to insert before.
094: * @return NavigationItemInterface The item which was inserted.
095: */
096: public NavigationItemInterface insertItemAt(String submenu,
097: String title, String href, String target, int horizPadding,
098: int iLocation);
099:
100: /**
101: * Inserts an item to a group in a navigation menu at specified location
102: * @param submenu String The name of a submenu if item is a submenu otherwise pass null
103: * @param title String The text to appear for the item.
104: * @param href String The href link of an item.
105: * @param target String The target window for the href link of an item.
106: * @param horizPadding int The number of pixels to pad the item by in the menu.
107: * @param niiInsertBefore com.salmonllc.gui.NavigationItemInterface The Item to insert before.
108: * @return NavigationItemInterface The item which was inserted.
109: */
110: public NavigationItemInterface insertItemAt(String submenu,
111: String title, String href, String target, int horizPadding,
112: NavigationItemInterface niiInsertBefore);
113:
114: /**
115: * Sets the href link for this group
116: * @param href String The href link of the group.
117: */
118: public void setHRef(String sHRef);
119:
120: /**
121: * Sets the image for this group
122: * @param sImage String The Image of the group.
123: */
124: public void setImage(String sImage);
125:
126: /**
127: * Sets the number of pixels of vertical padding for this group
128: * @param iVertPadding int The number of pixels of vertical padding.
129: */
130: public void setVertPadding(int iVertPadding);
131:
132: /**
133: * Sets whether this group is visible or not
134: * @param bVisible boolean Indicates if group is visible or not.
135: */
136: public void setVisible(boolean bVisible);
137: }
|