⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gridrenderer.js

📁 javascript 很酷的类库
💻 JS
📖 第 1 页 / 共 5 页
字号:
/*
 * Isomorphic SmartClient
 * Version 6.5 (2008-04-30)
 * Copyright(c) 1998-2007 Isomorphic Software, Inc. All rights reserved.
 * "SmartClient" is a trademark of Isomorphic Software, Inc.
 *
 * licensing@smartclient.com
 *
 * http://smartclient.com/license
 */
 //>	@class	GridRenderer//// A flexible, high-speed table that offers consistent cross-platform sizing, clipping, and events.////  @treeLocation Client Reference/Foundation//  @visibility external//<isc.ClassFactory.defineClass("GridRenderer", "Canvas");isc.GridRenderer.addClassProperties({	//>	@type	CellState		// Appearance of the cell -- used to set to different visual states.	// Also used as a suffix to gridRenderer.baseStyle to set CSS styles.	// @group appearance	// @see	gridRenderer.getCellStyle()	SELECTED:"Selected",		//	@value	isc.gridRenderer.SELECTED		Cell is selected.	DISABLED:"Disabled",		//	@value	isc.gridRenderer.DISABLED		Cell is disabled.	OVER:"Over",				//	@value	isc.gridRenderer.OVER			Mouse is over the cell.	//<    //>	@attr	gridRenderer.standardStyleSuffixes    (array : array of strings : IR)	//		Array of the 12 standard cell style suffix strings ("Over", "SelectedOver", etc.)    //      to allow quicker calculation of cell styles.	//		@see	gridRenderer.getCellStyle()    //<    standardStyleSuffixes:[                 "",                 "Over",                 "Selected",                 "SelectedOver",                 "Disabled",                 "DisabledOver",                 "DisabledSelected",                 "DisabledSelectedOver",                 "Dark",                 "OverDark",                 "SelectedDark",                 "SelectedOverDark",                 "DisabledDark"      ]});isc.GridRenderer.addProperties({    //>	@attr	gridRenderer.totalRows (number : 0 : [IRW])// Total number of rows in the grid.<br><br>//// NOTE: in order to create a valid grid, you must either provide a totalRows value or implement// getTotalRows()//// @see method:getTotalRows// @visibility external//<totalRows : 0, //>	@attr	gridRenderer.showAllRows (boolean : false : [IRA])// Whether all rows should be drawn all at once, or only rows visible in the viewport.<br><br>//// Drawing all rows causes longer initial rendering time, but allows smoother vertical scrolling.// With a very large number of rows, showAllRows will become too slow.//// @group performance// @visibility external//<//showAllRows : false,//>	@attr	gridRenderer.showAllColumns (boolean : false : [IRA])// Whether all columns should be drawn all at once, or only columns visible in the viewport.<br><br>//// Drawing all columns causes longer initial rendering time, but allows smoother horizontal// scrolling.  With a very large number of columns, showAllColumns will become too slow.//// @group performance// @visibility external//<//showAllColumns : false, //>@attr    gridRenderer.isSeparatorProperty (string : "isSeparator" : [IRA])// If this property is defined on some record, render the record as a separator row.//<// Documented at the ListGrid level only. ListGrids will pass the isSeparatorProperty through// to their body.isSeparatorProperty:"isSeparator",//>@attr    gridRenderer.singleCellValueProperty (string : "singleCellValue" : [IRA])// If this property is defined on some record, render the record as a single cell (spanning all// columns).//<// Documented at the ListGrid level only. ListGrids also implement getCellValue() which// will display record.singleCellValue as the value of the cell.// ListGrids will pass the singleCellValueProperty through to their body.singleCellValueProperty:"singleCellValue",//> @attr gridRenderer.scrollRedrawDelay (integer : 75 : IRW)// While drag scrolling in an incrementally rendered grid, time in milliseconds to wait// before redrawing, after the last mouse movement by the user.//// @group performance// @visibility external//<scrollRedrawDelay:75,//>	@attr	gridRenderer.drawAheadRatio (float : 1.3 : [IRWA])// How far should we render rows ahead of the currently visible area?  This is expressed as a// ratio from viewport size to rendered area size.<br><br>// // Tweaking drawAheadRatio allows you to make tradeoffs between continuous scrolling speed vs// initial render time and render time when scrolling by large amounts.<br><br>//// NOTE: Only applies when showAllRows is false.// @group performance// @visibility external//<drawAheadRatio : 1.3,//>	@attr	gridRenderer.quickDrawAheadRatio (float : 1.3 : [IRWA])// Alternative to +link{drawAheadRatio}, to be used when the user// is rapidly changing the grids viewport (for example drag scrolling through the grid).// If unspecified +link{drawAheadRatio} will be used in all cases// @group performance// @visibility external//<quickDrawAheadRatio:1.3,   //>	@attr	gridRenderer.cellHeight		(number : 20 : [IRW])// The default height of each row in pixels.//// @see gridRenderer.getRowHeight()// @visibility external// @group cellStyling//<cellHeight:20,							//>	@attr	gridRenderer.fixedRowHeights (boolean : true : IRWA)// Should we vertically clip cell contents, or allow rows to expand vertically to show all// contents?// <P>// If we allow rows to expand, the row height as derived from// +link{gridRenderer.getRowHeight(),getRowHeight()} or the// default +link{cellHeight} is treated as a minimum.// // @group cellStyling// @visibility external//<fixedRowHeights:true,//enforceVClipping:null,//>	@attr	gridRenderer.fixedColumnWidths		(boolean : true : IRWA)// Should we horizontally clip cell contents, or allow columns to expand horizontally to// show all contents?<br><br>//// If we allow columns to expand, the column width is treated as a minimum.//// @group	sizing// @visibility external//<fixedColumnWidths:true,//>	@attr	gridRenderer.autoFit              (boolean : false : IRWA)// If true, make columns only wide enough to fit content, ignoring any widths specified.// Overrides fixedFieldWidths.// // @group	sizing// @visibility external//<//autoFit:false,//>	@attr	gridRenderer.wrapCells		(boolean : false : IRWA)// Should content within cells be allowed to wrap?// @group cellStyling// @visibility external//<//wrapCells:false,//>	@attr	gridRenderer.cellSpacing		(number : 0 : [IRW])// The amount of empty space, in pixels, between each cell.// @group cellStyling// @visibility internal//<cellSpacing:0,//>	@attr	gridRenderer.cellPadding		(number : 2 : [IRW])// The amount of empty space, in pixels, surrounding each value in its cell.// @group cellStyling// @visibility external//<cellPadding:2,//>	@attr	gridRenderer.canSelectOnRightMouse  (boolean : true : [RW])//  If true, rightMouseDown events will fire 'selectOnRightMouseDown()' for the appropriate cells.// @group	events// @visibility external//<canSelectOnRightMouse:true,// Hover// ---------------------------------------------------------------------------------------//>	@attr	gridRenderer.canHover   (boolean : null : [RW])// If true, cellHover and rowHover events will fire when the user leaves the mouse over a // row / cell.// @group	events// @visibility external// @see cellHover()// @see rowHover()// @see showHover//<//>	@attr	gridRenderer.showHover  (boolean : null : [RW])// If true, and canHover is also true, when the user hovers over a cell, hover text will pop up// next to the mouse.  The contents of the hover is determined by +link{cellHoverHTML()}.// @group	events// @visibility external// @see canHover// @see cellHoverHTML()//<// can be set to false to cause Hover to be per-row instead of per-cellhoverByCell:true,// CSS styles// --------------------------------------------------------------------------------------------backgroundColor:"white",// style applied to the table element.  NOTE: don't expose: styling of a grid should be// accomplish by styling the surrounding DIV, where we can use the standard methodology to// detect borders, margins, etc (eg getInnerHeight())tableStyle:"listTable",	//>	@attr	gridRenderer.baseStyle		(CSSStyleName : "cell" : [IR])// The base name for the CSS class applied to cells. This style will have "Dark", // "Over", "Selected", or "Disabled" appended to it according to the state of the cell.// @visibility external// @group cellStyling// @see method:getCellStyle()// @see method:getBaseStyle()//<baseStyle:"cell",//>	@attr	gridRenderer.alternateRowStyles		(boolean : false : [IRW])// Whether alternating rows should be drawn in alternating styles, in order to create a "ledger"// effect for easier reading.  If enabled, the cell style for alternate rows will have "Dark"// appended to it.// @visibility external// @group cellStyling//<//alternateRowStyles:false,//>	@attr	gridRenderer.alternateRowFrequency		(number : 1 : [IRW])// The number of consecutive rows to draw in the same style before alternating, when// alternateRowStyles is true.// @visibility external// @group cellStyling//<alternateRowFrequency:1,//>	@attr	gridRenderer.emptyCellValue		(string : "&nbsp;" : IRW)// Value to show in empty cells (when getCellValue returns null)// @group cellStyling// @visibility external//<emptyCellValue:"&nbsp;",// Empty messages (what to do if no data is present)// --------------------------------------------------------------------------------------------//>	@attr	gridRenderer.showEmptyMessage		(boolean : true : [IRW])// Indicates whether the text of the emptyMessage property should be displayed if no data is// available.//      @visibility external//      @group  emptyMessage//      @see	emptyMessage//<//>	@attr	gridRenderer.emptyMessage		(string : null : IRW)// The string to display in the body of a listGrid with an empty data array, if// showEmptyMessage is true.// @group emptyMessage, i18nMessages// @visibility external//      @see	showEmptyMessage//      @see    emptyMessageStyle//<//>	@attr	gridRenderer.emptyMessageTableStyle (CSSStyleName : null : IRW)// CSS styleName for the table as a whole if we're showing the empty message// @group emptyMessage// @visibility external//<//>	@attr	gridRenderer.emptyMessageStyle  (CSSStyleName : null : IRW)// The CSS style name applied to the emptyMessage string if displayed.// @group emptyMessage// @visibility external//<//> @attr gridRenderer.fastCellUpdates (boolean: false : I)// Whether to speed up dynamic styling at the expense of slightly slower drawing.// <P>// <code>fastCellUpdates</code> speeds up the dynamic styling system used by rollovers,// selections, and custom styling that calls +link{gridRenderer.refreshCellStyle()}, at// the cost of slightly slower draw() and redraw() times.//// @visibility external//<//fastCellUpdates:false,// Standard Canvas settings// --------------------------------------------------------------------------------------------overflow:"auto",_avoidRedrawFlash:true,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -