minor bug fix cleanup to give the SIG menu links the same style as other

left menu links
This commit is contained in:
Eric J. Bowersox 2001-11-01 22:30:09 +00:00
parent 7bc0584cfd
commit bf040973ba

View File

@ -25,12 +25,22 @@ import com.silverwrist.venice.core.*;
public class MenuSIG implements ComponentRender, ColorSelectors public class MenuSIG implements ComponentRender, ColorSelectors
{ {
private String image_url; /*--------------------------------------------------------------------------------
private boolean image_url_needs_fixup = false; * Attributes
private String title; *--------------------------------------------------------------------------------
private List items_list; */
private int sigid;
private boolean show_unjoin; private String image_url; // path to actual image
private boolean image_url_needs_fixup = false; // do we need to fix image path up?
private String title; // title for menu
private List items_list; // list of menu items
private int sigid; // SIG ID
private boolean show_unjoin; // show the "Unjoin" menu choice?
/*--------------------------------------------------------------------------------
* Constructor
*--------------------------------------------------------------------------------
*/
public MenuSIG(SIGContext ctxt) public MenuSIG(SIGContext ctxt)
{ {
@ -59,15 +69,14 @@ public class MenuSIG implements ComponentRender, ColorSelectors
} // end constructor } // end constructor
public int getID() /*--------------------------------------------------------------------------------
{ * Implementations from interface ComponentRender
return sigid; *--------------------------------------------------------------------------------
*/
} // end getID
public void renderHere(Writer out, RenderData rdat) throws IOException public void renderHere(Writer out, RenderData rdat) throws IOException
{ {
String hilite = "<FONT COLOR=\"" + rdat.getStdColor(LEFT_LINK) + "\">"; String hilite = rdat.getStdFontTag(LEFT_LINK,2);
if (image_url!=null) if (image_url!=null)
{ // display the image by URL { // display the image by URL
if (image_url_needs_fixup) if (image_url_needs_fixup)
@ -86,21 +95,34 @@ public class MenuSIG implements ComponentRender, ColorSelectors
// display the menu items // display the menu items
Iterator it = items_list.iterator(); Iterator it = items_list.iterator();
String sigparm = "sig=" + sigid;
while (it.hasNext()) while (it.hasNext())
{ // display each menu item in turn { // display each menu item in turn
SIGFeature ftr = (SIGFeature)(it.next()); SIGFeature ftr = (SIGFeature)(it.next());
out.write("<BR>\n<A HREF=\"" + rdat.getEncodedServletPath(ftr.getApplet() + "?sig=" out.write("<BR>\n<A CLASS=\"lbar\" HREF=\""
+ String.valueOf(sigid))); + rdat.getEncodedServletPath(ftr.getApplet() + "?" + sigparm) + "\">" + hilite
out.write("\">" + hilite + StringUtil.encodeHTML(ftr.getName()) + "</FONT></A>\n"); + StringUtil.encodeHTML(ftr.getName()) + "</FONT></A>\n");
} // end while } // end while
if (show_unjoin) if (show_unjoin)
out.write("<P>\n<A HREF=\"" + rdat.getEncodedServletPath("sigops?cmd=U&sig=" + String.valueOf(sigid)) out.write("<P>\n<A CLASS=\"lbar\" HREF=\""
+ "\">" + hilite + "Unjoin</FONT></A>\n"); + rdat.getEncodedServletPath("sigops?cmd=U&" + sigparm) + "\">"
+ hilite + "Unjoin</FONT></A>\n");
out.write("\n"); // all done... out.write("\n"); // all done...
} // end renderHere } // end renderHere
/*--------------------------------------------------------------------------------
* External operations
*--------------------------------------------------------------------------------
*/
public int getID()
{
return sigid;
} // end getID
} // end class MenuTop } // end class MenuTop