本文整理汇总了Java中com.google.gwt.event.logical.shared.ResizeEvent类的典型用法代码示例。如果您正苦于以下问题:Java ResizeEvent类的具体用法?Java ResizeEvent怎么用?Java ResizeEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ResizeEvent类属于com.google.gwt.event.logical.shared包,在下文中一共展示了ResizeEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prev
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
public void prev() {
iPanel.remove(iAssignmentDock);
iPanel.insert(iCourseRequests, 0);
iRequests.setVisible(false); iRequests.setEnabled(false);
iReset.setVisible(false); iReset.setEnabled(false);
iQuickAdd.setVisible(false); iQuickAdd.setEnabled(false);
iEnroll.setVisible(false); iEnroll.setEnabled(false);
if (iCustomCheckbox != null) {
iCustomCheckbox.setVisible(false); iCustomCheckbox.setEnabled(false);
}
iPrint.setVisible(false); iPrint.setEnabled(false);
if (iExport != null) {
iExport.setVisible(false); iExport.setEnabled(false);
}
iSchedule.setVisible(iMode.isSectioning()); iSchedule.setEnabled(iMode.isSectioning());
iSave.setVisible(!iMode.isSectioning()); iSave.setEnabled(!iMode.isSectioning() && iEligibilityCheck != null && iEligibilityCheck.hasFlag(EligibilityFlag.CAN_REGISTER));
if (iEligibilityCheck != null && iEligibilityCheck.hasFlag(EligibilityFlag.DEGREE_PLANS)) {
iDegreePlan.setVisible(true); iDegreePlan.setEnabled(true);
}
clearMessage();
ResizeEvent.fire(this, getOffsetWidth(), getOffsetHeight());
AriaStatus.getInstance().setHTML(ARIA.courseRequests());
updateScheduleChangedNoteIfNeeded();
}
示例2: createView
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
public void createView() {
shell = new ResizeLayoutPanel();
shell.setSize("100%", "100%");
shell.addResizeHandler(new ResizeHandler() {
@Override
public void onResize(ResizeEvent event) {
forceLayout();
}
});
panel = new DockLayoutPanel(Style.Unit.PX);
panel.setSize("100%", "100%");
shell.add(panel);
Widget header = createNorth();
panel.addNorth(header, 128);
Widget footer = createSouth();
panel.addSouth(footer, 42);
}
示例3: createWidget
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
private void createWidget() {
widgetPanel = new ResizeLayoutPanel();
widgetPanel.addStyleName(style.widgetPanel());
widgetPanel.addResizeHandler(new ResizeHandler() {
@Override
public void onResize(ResizeEvent event) {
forceLayout();
}
});
panel = new FlowPanel();
panel.addStyleName(style.panel());
widgetPanel.add(panel);
label = new Label();
label.addStyleName(style.label());
panel.add(label);
textBox = new TextBox();
textBox.addStyleName(style.textBox());
panel.add(textBox);
initWidget(widgetPanel);
}
示例4: initWindow
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
public static void initWindow() {
// consoleContainer = new AbsolutePanel();
// consoleContainer.setWidth("3000px");
// consoleContainer.setHeight("3000px");
// RootPanel.get().add(consoleContainer, 0, 0);
// //consoleContainer.getElement().getStyle().setPosition(Position.FIXED);
updateWindowInfo();
if (isMobile) {
initMobile();
} else {
// Prevent scrollbars from being shown
Window.enableScrolling(false);
}
// Add window resize handler
Window.addResizeHandler(new ResizeHandler() {
@Override
public void onResize(ResizeEvent event) {
doResizeAndRotate();
}
});
}
示例5: setResizeCheckingEnabled
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
/**
* Set whether or not resize checking is enabled. If disabled, elements will
* still be resized on window events, but the timer will not check their
* dimensions periodically.
*
* @param enabled true to enable the resize checking timer
*/
public void setResizeCheckingEnabled(boolean enabled) {
if (enabled && !resizeCheckingEnabled) {
resizeCheckingEnabled = true;
if (windowHandler == null) {
windowHandler = Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
onWindowResized(event.getWidth(), event.getHeight());
}
});
}
resizeCheckTimer.schedule(resizeCheckDelay);
} else if (!enabled && resizeCheckingEnabled) {
resizeCheckingEnabled = false;
if (windowHandler != null) {
windowHandler.removeHandler();
windowHandler = null;
}
resizeCheckTimer.cancel();
}
}
示例6: onResize
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
/**
* Called when the window is resized.
* The algorithm uses is increase/decrease the chart size according with
* the new window size.
*/
public void onResize(ResizeEvent resize) {
if (!autoResize) {
return;
}
int nwheight = Window.getClientHeight();
int nwwidth = Window.getClientWidth();
double wfact = 1;
double hfact = 1;
if (nwheight != wheight) {
hfact = (double) nwheight / (double) wheight;
wheight = nwheight;
}
if (nwwidth != wwidth) {
wfact = (double) nwwidth / (double) wwidth;
wwidth = nwwidth;
}
if (wfact != 1 || hfact != 1) {
resize((int) (width * wfact), (int) (height * hfact));
}
}
示例7: BasicImageGrid
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
public BasicImageGrid(AbstractPreviewData previewData) {
super.setSize("100%", "100%");
_previewData = (PreviewImageGridCreator.ImageGridPreviewData)previewData;
mainPanel.setSize("100%", "100%");
super.add(mainPanel);
GwtUtil.setStyle(mainPanel, "backgroundColor", GRID_BACKGROUND_DEFAULT_COLOR);
GwtUtil.setStyle(this, "backgroundColor", GRID_BACKGROUND_DEFAULT_COLOR);
setPlotWidgetGroupValue(_previewData.getPlotWidgetGroup());
for (int i = 0; i < INIT_SIZE; i++) {
createAndAddMiniPlotWidget();
}
getPlotWidgetGroup().setImageGrid(this);
getPlotWidgetGroup().setGridPopoutColumns(_previewData.getGridPopoutCols());
getPlotWidgetGroup().setGridPopoutZoomType(_previewData.getGridPopoutZoomtype());
Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
resize();
}
});
plotError = new MiniPlotWidget.PlotError() {
public void onError(WebPlot wp, String briefDesc, String desc, String details, Exception e) {
}
};
}
示例8: addXYPlot
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
public static void addXYPlot(JscriptRequest jspr, String div) {
Map<String,String> paramMap= jspr.asMap();
WidgetFactory factory= Application.getInstance().getWidgetFactory();
TablePreview xyPrev= factory.createObserverUI(WidgetFactory.XYPLOT,paramMap);
xyPrev.bind(FFToolEnv.getHub());
SimplePanel panel= makeCenter();
panel.add(xyPrev.getDisplay());
FFToolEnv.addToPanel(div, panel, "XY Plot");
if (xyPrev.getDisplay() instanceof RequiresResize) {
final RequiresResize resizer= (RequiresResize)xyPrev.getDisplay();
Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
resizer.onResize();
}
});
}
}
示例9: resize
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
public void resize() {
if (getLayoutManager() != null) {
try {
getLayoutManager().resize();
WebEventManager.getAppEvManager().fireEvent(new WebEvent(this, Name.WINDOW_RESIZE,
new ResizeEvent(Window.getClientWidth(), Window.getClientHeight()) {
}));
} catch (Exception e) {
GWT.log("unexpected exception", e);
}
}
}
示例10: ResizableLayoutManager
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
public ResizableLayoutManager(int minWidth, int minHeight) {
super(minWidth, minHeight);
mainPanel = new DockPanel();
// resizer = new Resizer();
Window.addResizeHandler(new ResizeHandler(){
public void onResize(ResizeEvent event) {
Application.getInstance().resize();
}
});
// WebEventManager.getAppEvManager().addListener(Name.REGION_SHOW,
// new WebEventListener(){
// public void eventNotify(WebEvent ev) {
// resizer.setVisible(Application.getInstance().hasSearchResult());
// }
// });
setupStatusRegion(this);
}
示例11: show
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
@Override
public void show() {
if (recenter == null) {
recenter =
Window.addResizeHandler(
new ResizeHandler() {
@Override
public void onResize(ResizeEvent event) {
final int w = event.getWidth();
final int h = event.getHeight();
AutoCenterDialogBox.this.onResize(w, h);
}
});
}
super.show();
}
示例12: onShowView
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
@Override
public void onShowView() {
super.onShowView();
Window.enableScrolling(false);
if (prefs.hideTopMenu()) {
Gerrit.setHeaderVisible(false);
}
resizeHandler =
Window.addResizeHandler(
new ResizeHandler() {
@Override
public void onResize(ResizeEvent event) {
resizeCodeMirror();
}
});
}
示例13: resize
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
private void resize(ResizeEvent event) {
secondResizeRequested = false;
lastResizeEvent = event;
if (lastShownFrame != null) {
lastShownFrame.resize(event);
centerHeader.setHeader(lastShownFrame.getLongTitle());
if (secondResizeRequested) {
// lastShownFrame.resize(event);
frameSpace.fireEvent(event);
// Window.resizeBy(0, 0);
}
}
history.resize(event);
clipboard.resize(event);
}
示例14: setComponentResized
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
public void setComponentResized(JavaScriptObject aValue) {
if (componentResized != aValue) {
if (componentResizedReg != null) {
componentResizedReg.removeHandler();
componentResizedReg = null;
}
componentResized = aValue;
if (componentResized != null && component instanceof HasResizeHandlers)
componentResizedReg = ((HasResizeHandlers) component).addResizeHandler(new ResizeHandler() {
@Override
public void onResize(ResizeEvent event) {
if (componentResized != null) {
executeEvent(componentResized, EventsPublisher.publish(event));
}
}
});
}
}
示例15: AbstractView
import com.google.gwt.event.logical.shared.ResizeEvent; //导入依赖的package包/类
public AbstractView() {
super(Style.Unit.PX);
setWidth(Window.getClientWidth() + "px");
setHeight(Window.getClientHeight() + "px");
Window.addResizeHandler(new ResizeHandler() {
@Override
public void onResize(ResizeEvent event) {
int height = event.getHeight();
setHeight(height + "px");
int width = event.getWidth();
setWidth(width + "px");
parentResized(height, width, "px");
}
});
}