Home | Trees | Indices | Help |
|
---|
|
1 # Copyright 2006 James Tauber and contributors 2 # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 from pyjamas import DOM 16 from pyjamas import Factory 17 from pyjamas.ui import Applier 1820 21 _elem_props = [ 22 ("wordwrap", "Word Wrap", "WordWrap", None, True), 23 ("stylename", "Style Name", "StyleName", None, ""), 24 ("height", "Height", "Height", None, None), 25 ("width", "Width", "Width", None, None), 26 ("halign", "Horizontal Alignment", "HorizontalAlignment", str, ""), 27 ("valign", "Vertical Alignment", "VerticalAlignment", str, ""), 28 ] 2914331 return self._elem_props32 3638 self.outer.prepareCell(row, column) 39 self.outer.setStyleName(self.getElement(row, column), styleName, add)4042 self._setStyleName(row, column, styleName, True)4345 self.outer.checkCellBounds(row, column) 46 return DOM.getChild(self.outer.rowFormatter.getRow(self.outer.bodyElem, row), column)47 50 55 5961 self._setStyleName(row, column, styleName, False)6264 self.setHorizontalAlignment(row, column, hAlign) 65 self.setVerticalAlignment(row, column, vAlign)6668 self.outer.prepareCell(row, column) 69 element = self.getCellElement(self.outer.bodyElem, row, column) 70 DOM.setStyleAttribute(element, "height", height)7173 self.outer.prepareCell(row, column) 74 element = self.getCellElement(self.outer.bodyElem, row, column) 75 DOM.setAttribute(element, "align", align)7678 if add is None: 79 self.outer.prepareCell(row, column) 80 self.setAttr(row, column, "className", styleName) 81 else: 82 self._setStyleName(row, column, styleName, add)8385 self.outer.prepareCell(row, column) 86 DOM.setStyleAttribute(self.getCellElement(self.outer.bodyElem, 87 row, column), 88 "verticalAlign", align)89 9395 self.outer.prepareCell(row, column) 96 DOM.setStyleAttribute(self.getCellElement(self.outer.bodyElem, 97 row, column), 98 "width", width)99101 self.outer.prepareCell(row, column) 102 if wrap: 103 wrap_str = "" 104 else: 105 wrap_str = "nowrap" 106 107 DOM.setStyleAttribute(self.getElement(row, column), 108 "whiteSpace", wrap_str)109111 length = table.rows.length 112 if row >= length: 113 return None 114 cols = table.rows.item(row).cells 115 length = cols.length 116 if col >= length: 117 return None 118 item = cols.item(col) 119 return item120122 return self.getCellElement(self.outer.bodyElem, row, column)123125 self.outer.prepareCell(row, column) 126 return DOM.getChild(self.outer.rowFormatter.ensureElement(row), column)127 131 135 139
Home | Trees | Indices | Help |
|
---|
http://epydoc.sourceforge.net |