本文整理汇总了Python中pyjamas.ui.FlexTable.FlexTable.setSize方法的典型用法代码示例。如果您正苦于以下问题:Python FlexTable.setSize方法的具体用法?Python FlexTable.setSize怎么用?Python FlexTable.setSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.ui.FlexTable.FlexTable
的用法示例。
在下文中一共展示了FlexTable.setSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pyjamas.ui.FlexTable import FlexTable [as 别名]
# 或者: from pyjamas.ui.FlexTable.FlexTable import setSize [as 别名]
def __init__(self, chart):
""" DialogBox CSS Style self.settings used with this example for reference:
Note: These simplified CSS styles make the dialog's title bar behave a
little quirkily in IE6 when dragging. For more sophisticated CSS that
fixes this problem (and also provides a more professional look) see the
CSS tab of the DialogBox example in the GWT <a href="xxx"> Showcase of
Features</a> (I just didn't want to copy 5 pages of obscure DialogBox
CSS into what is after all a Client-side GChart example).
.gwt-DialogBox .Caption {
font-size: 18
color: #eef
background: #00f repeat-x 0px -2003px
padding: 4px 4px 4px 8px
cursor: default
border-bottom: 2px solid #008
border-top: 3px solid #448
.gwt-DialogBox .dialogContent {
border: 1px solid #008
background: #ddd
padding: 3px
"""
DialogBox.__init__(self, autoHide=True, modal=True)
self.chart = chart
self.isFirstTime = True
mainPanel = VerticalPanel()
propertyForm = FlexTable()
commandBar = DockPanel()
sliceSwitcher = HorizontalPanel()
self.prevSlice = Button("<Prev Slice", self)
self.nextSlice = Button("Next Slice>", self)
self.closeButton = Button("Close", self)
self.chart.colorSelector.addChangeListener(self)
self.chart.sliceSizeSelector.addChangeListener(self)
self.chart.shadingSelector.addChangeListener(self)
#self.prevSlice.addClickListener(self)
#self.nextSlice.addClickListener(self)
#self.closeButton.addClickListener(self)
# slice properties table (slice color, shading and size)
propertyForm.setSize(3, 2)
propertyForm.setText( 0, 0, "Color:")
propertyForm.setWidget(0, 1, self.chart.colorSelector)
propertyForm.setText( 1, 0, "Shading Pattern:")
propertyForm.setWidget(1, 1, self.chart.shadingSelector)
propertyForm.setText( 2, 0, "Slice Size:")
propertyForm.setWidget(2, 1, self.chart.sliceSizeSelector)
# add additional properties here, if desired
# buttons for changing the selected slice from the form
sliceSwitcher.add(self.prevSlice)
sliceSwitcher.add(self.nextSlice)
commandBar.add(sliceSwitcher, DockPanel.WEST)
commandBar.add(self.closeButton, DockPanel.EAST)
commandBar.setCellHorizontalAlignment(self.closeButton,
HasHorizontalAlignment.ALIGN_RIGHT)
commandBar.setWidth("100%"); # pushes close button to right edge
# create main form and place it in DialogBox
mainPanel.add(propertyForm)
mainPanel.add(commandBar)
self.setWidget(mainPanel); # add the DialogBox' single, defining, widget