JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.legend
Interface JCLegendRenderer

All Known Implementing Classes:
DefaultLegendPopulatorRenderer, JCChart3dLegendManager, JCChartLegendManager

public interface JCLegendRenderer

JCLegendRenderer is an interface implemented by a class that wishes to help render the legend.


Method Summary
 void drawLegendItem(Graphics gc, Font useFont, com.klg.jclass.util.legend.JCLegendItem thisItem)
          Used for implementing custom legend item draws.
 void drawLegendItemSymbol(Graphics gc, Font useFont, com.klg.jclass.util.legend.JCLegendItem thisItem)
          Used for implementing custom symbol draws for a legend item.
 void drawLegendItemText(Graphics gc, Font useFont, com.klg.jclass.util.legend.JCLegendItem thisItem)
          Used for implementing custom text draws for a legend item.
 Color getOutlineColor(com.klg.jclass.util.legend.JCLegendItem thisItem)
          Retrieves the outline color to use when drawing the legend item's symbol.
 void setFillGraphics(Graphics gc, com.klg.jclass.util.legend.JCLegendItem thisItem)
          Called to set the provided Graphics object with the appropriate paint settings for use in drawing this legend item's symbol.
 

Method Detail

drawLegendItem

public void drawLegendItem(Graphics gc,
                           Font useFont,
                           com.klg.jclass.util.legend.JCLegendItem thisItem)
Used for implementing custom legend item draws. This method is called when a legend item's draw type has been specified as JCLegend.CUSTOM_ALL. If implemented, the method should draw both the symbol and text portions of the specified legend item. If CUSTOM_ALL is not used by this legend implementation, simply return out of the method.

Parameters:
gc - graphics object used to draw the legend
useFont - the font being used in this legend
thisItem - the JCLegendItem object representing the legend item to draw

drawLegendItemSymbol

public void drawLegendItemSymbol(Graphics gc,
                                 Font useFont,
                                 com.klg.jclass.util.legend.JCLegendItem thisItem)
Used for implementing custom symbol draws for a legend item. This method is called when a legend item's draw type has been specified as JCLegend.CUSTOM_SYMBOL. If CUSTOM_SYMBOL is not used by this legend implementation, simply return out of the method.

Parameters:
gc - graphics object used to draw the legend
useFont - the font being used in this legend
thisItem - the JCLegendItem object representing the legend item to draw

drawLegendItemText

public void drawLegendItemText(Graphics gc,
                               Font useFont,
                               com.klg.jclass.util.legend.JCLegendItem thisItem)
Used for implementing custom text draws for a legend item. This method is called when a legend item's contents field contains an object other than a String object.

Parameters:
gc - graphics object used to draw the legend
useFont - the font being used in this legend
thisItem - the JCLegendItem object representing the legend item to draw

getOutlineColor

public Color getOutlineColor(com.klg.jclass.util.legend.JCLegendItem thisItem)
Retrieves the outline color to use when drawing the legend item's symbol. If it returns null, the legend will use its own foreground color.

Parameters:
thisItem - the JCLegendItem object representing the legend item in question
Returns:
The current outline color

setFillGraphics

public void setFillGraphics(Graphics gc,
                            com.klg.jclass.util.legend.JCLegendItem thisItem)
Called to set the provided Graphics object with the appropriate paint settings for use in drawing this legend item's symbol.

Parameters:
gc - the Graphics object to change
thisItem - the JCLegendItem object representing the legend item in question

Copyright © 2004 Quest Software Inc..
All rights reserved.