public class Legend extends GenericChartObject implements ChartObject, ChartConstants
| Modifier and Type | Field and Description |
|---|---|
static int |
BOTTOM |
static int |
CORNER |
protected int |
dx_defunct |
protected int |
dy_defunct |
protected boolean |
fAutoPosition |
protected boolean |
fAutoPosX |
protected boolean |
fAutoPosY |
protected boolean |
fAutoSeries |
protected boolean |
fVert |
protected boolean |
fWasDataTable |
protected short |
grbit |
static int |
LEFT |
static int |
NOT_DOCKED |
static int |
RIGHT |
static int |
TOP |
protected byte |
wSpacing |
protected int |
x_defunct |
protected int |
y_defunct |
chartArr, chartType, parentChartcol, continues, DEBUGLEVEL, hyperlink, idx, isBlank, isBoolean, isContinueMerged, isString, lastidx, myxf, offset, rw, streamer, wkbook, worksheetAREACHART, BARCHART, BUBBLECHART, COLCHART, CONEBARCHART, CONECHART, CYLINDERBARCHART, CYLINDERCHART, DOUGHNUTCHART, LINECHART, OFPIECHART, PIECHART, PYRAMIDBARCHART, PYRAMIDCHART, RADARAREACHART, RADARCHART, SCATTERCHART, SHAPECOLUMN, SHAPECONE, SHAPECONETOMAX, SHAPECYLINDER, SHAPEDEFAULT, SHAPEPYRAMID, SHAPEPYRAMIDTOMAX, STOCKCHART, SURFACECHART, XAXIS, XVALAXIS, YAXIS, ZAXISAI, ALLOWDUPES, ALRUNS, AREA, AREAFORMAT, ARRAY, ATTACHEDLABEL, AUTOFILTER, AXCENT, AXESUSED, AXIS, AXISLINEFORMAT, AXISPARENT, BACKUP, BAR, BEGIN, BLANK, BOF, BOOKBOOL, BOOLERR, BOPPOP, BOPPOPCUSTOM, BOTTOM_MARGIN, BOTTOMMARGIN, BOUNDSHEET, CALC_MODE_PROP, CALCCOUNT, CALCMODE, CALCULATE_ALWAYS, CALCULATE_AUTO, CALCULATE_EXPLICIT, CATLAB, CATSERRANGE, CF, CF12, CHART, CHART3DBARSHAPE, CHARTFORMAT, CHARTFORMATLINK, CHARTFRTINFO, CHARTLINE, CODENAME, COLINFO, CONDFMT, CONDFMT12, CONTINUE, COUNTRY, CRN, CRTLAYOUT12, CRTLAYOUT12A, DAT, DATAFORMAT, DATALABEXT, DATALABEXTCONTENTS, DATE1904, DBCELL, DCON, DCONBIN, DCONNAME, DCONREF, DEBUG_HIGH, DEBUG_LOW, DEBUG_MEDIUM, DEFAULTENCODING, DEFAULTROWHEIGHT, DEFAULTTEXT, DEFCOLWIDTH, DELTA, DIMENSIONS, DROPBAR, DSF, DV, DVAL, END, ENDBLOCK, ENDEXTSST, ENDOBJECT, EOF, EXCEL2K, EXTERNCOUNT, EXTERNNAME, EXTERNSHEET, EXTSST, FBI, FEATHEADR, FILE_LOCK, FILEPASS, FONT, FONTBASIS, FONTX, FOOTERREC, FORMAT, FORMULA, FRAME, FRTFONTLIST, FRTWRAPPER, GARBAGE, GELFRAME, GUTS, HCENTER, HEADERREC, HLINK, HORIZONTAL_PAGE_BREAKS, IFMT, INDEX, INTERFACE_HDR, ITERATION, LABEL, LABELSST, LEFT_MARGIN, LEFTMARGIN, LEGEND, LEGENDXN, LINE, LINEFORMAT, MARKERFORMAT, MAXCOLS, MAXCOLS_BIFF8, MAXRECLEN, MAXROWS, MAXROWS_BIFF8, MERGEDCELLS, MSODRAWING, MSODRAWINGGROUP, MSODRAWINGSELECTION, MULBLANK, MULRK, NAME, NOTE, NUMBER, OBJ, OBJECTLINK, OBJPROTECT, OBPROJ, PALETTE, PANE, PASSWORD, PHONETIC, PICF, PIE, PIEFORMAT, PIVOTCHARTBITS, PIVOTCHARTLINK, PLOTAREA, PLOTGROWTH, PLS, PLV, POS, PRECISION, PRINT_GRIDLINES, PRINT_ROW_HEADERS, PRINTGRID, PRINTROWCOL, PROT4REV, PROTECT, QSISXTAG, RADAR, RADARAREA, RANGEPROTECTION, REFMODE, REFTRACK_PROP, RIGHT_MARGIN, RIGHTMARGIN, RK, ROW, RRD_HEAD, RRD_INFO, RSTRING, RTENTEXU, RTMERGECELLS, SBASEREF, SCATTER, SCENPROTECT, SCL, SELECTION, SERAUXERRBAR, SERAUXTREND, SERFMT, SERIES, SERIESLIST, SERIESTEXT, SERPARENT, SERTOCRT, SETUP, SHAREDUPES, SHEETLAYOUT, SHEETPROTECTION, SHRFMLA, SHTPROPS, SIIINDEX, SST, STARTBLOCK, STARTOBJECT, STRING_ENCODING_AUTO, STRING_ENCODING_COMPRESSED, STRING_ENCODING_UNICODE, STRINGREC, STYLE, SUPBOOK, SURFACE, SXADDL, SXBOOL, SXDB, SXDBB, SXDBEX, SXDI, SXEX, SXFDB, SXFDBTYPE, SXFORMAT, SXIVD, SXLI, SXNUM, SXPI, SXSTREAMID, SXSTRING, SXVD, SXVDEX, SXVI, SXVIEW, SXVIEWEX9, SXVIEWLINK, SXVS, TABID, TABLE, TABLESTYLES, TEXTDISP, THREED, TICK, TOP_MARGIN, TOPMARGIN, TXO, TYPE_BLANK, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_FORMULA, TYPE_FP, TYPE_INT, TYPE_STRING, UNICODEENCODING, UNITS, USERBVIEW, USERSVIEWBEGIN, USERSVIEWEND, USETEMPFILE_PROP, USR_EXCL, VALIDATEWORKBOOK, VALUERANGE, VB_MODULE, VCENTER, VERTICAL_PAGE_BREAKS, WINDOW_PROTECT, WINDOW1, WINDOW2, WK_CHART, WK_FILE, WK_GLOBALS, WK_MACROSHEET, WK_WORKSHEET, WSBOOL, XCT, XF, XLS_MAX_COLS, YMULT| Constructor and Description |
|---|
Legend() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBox() |
void |
adjustWidth(HashMap<String,Double> chartMetrics,
int chartType,
String[] legends)
called up change of legend text to adjust width of the legend bounding box
|
static Legend |
createDefaultLegend(WorkBook book) |
int[] |
getCoords()
return the coordinates of the legend box, relative to the chart
|
int[] |
getCoords(int charttype,
HashMap<String,Double> chartMetrics,
String[] legends,
Font f)
return the coordinates of the legend box in pixels
An approximation at this point |
Font |
getFnt()
tries to get the best match
|
short |
getLegendPosition()
legend position:
controlled by CrtLayout12
0= bottom, 1= corner, 2= top, 3= right, 4= left
|
String |
getLegendPositionString()
return the legend position in string (OOXML) form
|
void |
getMetrics(HashMap<String,Double> chartMetrics,
int chartType,
ChartSeries s) |
static XLSRecord |
getPrototype() |
String |
getSVG(HashMap<String,Double> chartMetrics,
ChartType chartobj,
ChartSeries s) |
boolean |
hasBox()
returns true if this legend is surrounded by a box (the default)
|
void |
incrementHeight(float h)
a rough estimate of expanding legend dimensions of
1 normal entry
|
void |
init()
perform record initialization
|
protected void |
parseGrbit()
The following records and rules define the significant parts of a legend:
The Legend record specifies the layout of the legend and specifies if the legend is automatically positioned.
|
void |
resetPos(double y,
double h,
double ch,
int nLines)
reset initial position of legend to accommodate nLines of legend text
|
void |
setAutoPosition(boolean auto)
sets or turns off auto positioning
[BugTracker 2844]
|
void |
setIsDataTable(boolean isDataTable) |
void |
setLegendPosition(short pos)
set Legend Positon: one of:
0= bottom, 1= corner, 2= top, 3= right, 4= left, 7= not docked
|
void |
setVertical(boolean isVertical) |
addChartRecord, close, getChartOption, getChartRecords, getOptionsXML, getParentChart, getRecordArray, getScript, hasShadow, is100Percent, isStacked, setChartOption, setIs100Percent, setIsStacked, setParentChartaddContinue, clone, copyFormat, getBooleanVal, getByteAt, getByteReader, getBytes, getBytesAt, getCellAddress, getCellAddressWithSheet, getCellType, getColNumber, getColorTable, getContinueVect, getData, getDataType, getDblVal, getDefaultVal, getEncryptedByteReader, getFirstBlock, getFloatVal, getFont, getFormatPattern, getFormulaRec, getHyperlink, getInternalVal, getIntLocation, getIntVal, getIxfe, getLastBlock, getLength, getMergeRange, getOffset, getOpcode, getRealRecordIndex, getRecDesc, getRecordIndex, getRow, getRowNumber, getSheet, getStreamer, getStringVal, getStringVal, getWorkBook, getXfRec, hasContinues, initRowCol, isFormula, isNumber, isReadOnly, isValueForCell, mergeContinues, postStream, preStream, remove, removeContinues, resetCacheBytes, setBooleanVal, setByteReader, setCol, setData, setDebugLevel, setDoubleVal, setEncryptedByteReader, setFirstBlock, setFloatVal, setHyperlink, setIndex, setIntVal, setIsValueForCell, setIxfe, setLastBlock, setLength, setMergeRange, setOffset, setOpcode, setRow, setRowCol, setRowNumber, setSheet, setStreamer, setStringVal, setValueForCell, setWorkBook, setXFRecord, setXFRecord, shouldEncrypt, toHexDump, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddChartRecord, getChartRecords, getParentChart, getRecordArray, setParentChartprotected int x_defunct
protected int y_defunct
protected int dx_defunct
protected int dy_defunct
protected byte wSpacing
protected short grbit
protected boolean fAutoPosition
protected boolean fAutoSeries
protected boolean fAutoPosX
protected boolean fAutoPosY
protected boolean fVert
protected boolean fWasDataTable
public static final int BOTTOM
public static final int CORNER
public static final int TOP
public static final int RIGHT
public static final int LEFT
public static final int NOT_DOCKED
public void init()
XLSRecordprotected void parseGrbit()
public void setIsDataTable(boolean isDataTable)
public void setVertical(boolean isVertical)
public static XLSRecord getPrototype()
public short getLegendPosition()
public String getLegendPositionString()
public void setLegendPosition(short pos)
pos - public boolean hasBox()
public void addBox()
public void setAutoPosition(boolean auto)
auto - public void incrementHeight(float h)
public void adjustWidth(HashMap<String,Double> chartMetrics, int chartType, String[] legends)
chartMetrics - chartType - legends - String[] text of legends (containing new legend text)public void resetPos(double y,
double h,
double ch,
int nLines)
public int[] getCoords(int charttype,
HashMap<String,Double> chartMetrics,
String[] legends,
Font f)
chartMetrics - maps chart coords in pixels x, y, w, h, canvasw, canvash, min, maxfh - -- font height in pointspublic Font getFnt()
public void getMetrics(HashMap<String,Double> chartMetrics, int chartType, ChartSeries s)
public int[] getCoords()
Copyright © 2002–2019 Starter Inc.. All rights reserved.