本文整理汇总了Java中com.google.gwt.user.client.Window.addResizeHandler方法的典型用法代码示例。如果您正苦于以下问题:Java Window.addResizeHandler方法的具体用法?Java Window.addResizeHandler怎么用?Java Window.addResizeHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.Window
的用法示例。
在下文中一共展示了Window.addResizeHandler方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initWidget
import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
@PostConstruct
protected void initWidget() {
templateFetchable = new TenantTemplateFetchable(() -> getTenantId());
calendar = new Calendar.Builder<SpotId, ShiftData, ShiftDrawable>(container, tenantId, CONSTANTS)
.fetchingDataFrom(templateFetchable)
.fetchingGroupsFrom(new SpotNameFetchable(() -> getTenantId()))
.displayWeekAs(DateDisplay.WEEKS_FROM_EPOCH)
.withBeanManager(beanManager)
.creatingDataInstancesWith((c, name, start, end) -> {
Shift newShift = new Shift(tenantId,
name.getSpot(),
new TimeSlot(tenantId,
start,
end));
newShift.setId(templateFetchable.getFreshId());
c
.addShift(new ShiftData(new SpotData(newShift)));
})
.asTwoDayView((v, d, i) -> new ShiftDrawable(v, d, i));
calendar.setHardStartDateBound(LocalDateTime.ofEpochSecond(0, 0, ZoneOffset.UTC));
Window.addResizeHandler((e) -> calendar.setViewSize(e.getWidth() - container.getAbsoluteLeft(),
e.getHeight() - container.getAbsoluteTop() - saveButton.getOffsetHeight()));
}
示例2: onAttach
import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
@Override
protected void onAttach() {
super.onAttach();
resizeFilterIfNeeded();
iResizeHandler = Window.addResizeHandler(new ResizeHandler() {
@Override
public void onResize(ResizeEvent event) {
resizeFilterIfNeeded();
}
});
}
示例3: initTable
import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
private void initTable() {
calendar = new Calendar.Builder<EmployeeId, EmployeeData, EmployeeDrawable<EmployeeData>>(container, tenantId,
CONSTANTS)
.fetchingGroupsFrom(new EmployeeNameFetchable(() -> getTenantId()))
.withBeanManager(beanManager)
.asTwoDayView((v, d, i) -> new EmployeeDrawable<>(v, d, i));
calendar.setDataProvider(new EmployeeDataFetchable(calendar, () -> getTenantId()));
Window.addResizeHandler((e) -> calendar.setViewSize(e.getWidth() - container.getAbsoluteLeft(),
e.getHeight() - container.getAbsoluteTop()));
}
示例4: initTable
import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
private void initTable() {
calendar = new Calendar.Builder<SpotId, SpotData, SpotDrawable<SpotData>>(container, tenantId, CONSTANTS)
.fetchingGroupsFrom(new SpotNameFetchable(() -> getTenantId()))
.withBeanManager(beanManager)
.asTwoDayView((v, d, i) -> new SpotDrawable<>(v, d, i));
calendar.setDataProvider(new SpotDataFetchable(calendar, () -> getTenantId()));
Window.addResizeHandler((e) -> calendar.setViewSize(e.getWidth() - container.getAbsoluteLeft(),
e.getHeight() - container.getAbsoluteTop()));
}
示例5: addResizeHandler
import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
private void addResizeHandler() {
resizeHandler.setConnectionModuleViewImpl(connectionEventHandler);
Window.addResizeHandler(resizeHandler);
}
示例6: MultiPageView
import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
public MultiPageView() {
Window.addResizeHandler(this);
}
示例7: YaBlocksEditor
import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
YaBlocksEditor(YaProjectEditor projectEditor, YoungAndroidBlocksNode blocksNode) {
super(projectEditor, blocksNode);
this.blocksNode = blocksNode;
COMPONENT_DATABASE = SimpleComponentDatabase.getInstance(getProjectId());
fullFormName = blocksNode.getProjectId() + "_" + blocksNode.getFormName();
formToBlocksEditor.put(fullFormName, this);
blocksArea = new BlocklyPanel(this, fullFormName); // [lyn, 2014/10/28] pass in editor so can extract form json from it
blocksArea.setWidth("100%");
// This code seems to be using a rather old layout, so we cannot simply pass 100% for height.
// Instead, it needs to be calculated from the client's window, and a listener added to Window
// We use VIEWER_WINDOW_OFFSET as an approximation of the size of the top navigation bar
// New layouts don't need all this messing; see comments on selected answer at:
// http://stackoverflow.com/questions/86901/creating-a-fluid-panel-in-gwt-to-fill-the-page
blocksArea.setHeight(Window.getClientHeight() - VIEWER_WINDOW_OFFSET + "px");
Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
int height = event.getHeight();
blocksArea.setHeight(height - VIEWER_WINDOW_OFFSET + "px");
}
});
initWidget(blocksArea);
blocksArea.populateComponentTypes(COMPONENT_DATABASE.getComponentsJSONString());
// Get references to the source structure explorer
sourceStructureExplorer = BlockSelectorBox.getBlockSelectorBox().getSourceStructureExplorer();
// Listen for selection events for built-in drawers
BlockSelectorBox.getBlockSelectorBox().addBlockDrawerSelectionListener(this);
// Create palettePanel, which will be used as the content of the PaletteBox.
myFormEditor = projectEditor.getFormFileEditor(blocksNode.getFormName());
if (myFormEditor != null) {
palettePanel = new YoungAndroidPalettePanel(myFormEditor);
palettePanel.loadComponents(new DropTargetProvider() {
// TODO(sharon): make the tree in the BlockSelectorBox a drop target
@Override
public DropTarget[] getDropTargets() {
return new DropTarget[0];
}
});
palettePanel.setSize("100%", "100%");
} else {
palettePanel = null;
OdeLog.wlog("Can't get form editor for blocks: " + getFileId());
}
}