当前位置: 首页>>代码示例>>Java>>正文


Java ResizeHandler类代码示例

本文整理汇总了Java中com.google.gwt.event.logical.shared.ResizeHandler的典型用法代码示例。如果您正苦于以下问题:Java ResizeHandler类的具体用法?Java ResizeHandler怎么用?Java ResizeHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ResizeHandler类属于com.google.gwt.event.logical.shared包,在下文中一共展示了ResizeHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createView

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的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);
}
 
开发者ID:mvp4g,项目名称:mvp4g2-examples,代码行数:21,代码来源:ShellView.java

示例2: createWidget

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的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);
}
 
开发者ID:mvp4g,项目名称:mvp4g2-examples,代码行数:25,代码来源:TextField.java

示例3: initWindow

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的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();
				}
			});
		}
 
开发者ID:openremote,项目名称:WebConsole,代码行数:24,代码来源:BrowserUtils.java

示例4: setResizeCheckingEnabled

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的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();
  }
}
 
开发者ID:jiakuan,项目名称:gwt-uploader,代码行数:28,代码来源:ResizableWidgetCollection.java

示例5: BasicImageGrid

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的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) {

        }
    };
}
 
开发者ID:lsst,项目名称:firefly,代码行数:30,代码来源:BasicImageGrid.java

示例6: addXYPlot

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的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();
            }
        });
    }
}
 
开发者ID:lsst,项目名称:firefly,代码行数:20,代码来源:XYPlotJSInterface.java

示例7: ResizableLayoutManager

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的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);

    }
 
开发者ID:lsst,项目名称:firefly,代码行数:21,代码来源:ResizableLayoutManager.java

示例8: show

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的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();
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:17,代码来源:AutoCenterDialogBox.java

示例9: onShowView

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的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();
            }
          });
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:18,代码来源:DiffScreen.java

示例10: setComponentResized

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的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));
					}
				}
			});
	}
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:19,代码来源:EventsExecutor.java

示例11: AbstractView

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的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");
        }
    });
}
 
开发者ID:languageininteraction,项目名称:GraphemeColourSynaesthesiaApp,代码行数:17,代码来源:AbstractView.java

示例12: TwitterTimelineWindow

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的package包/类
public TwitterTimelineWindow(String title, String href, String dataWidgetId) {
	this.href = href;
	this.dataWidgetId = dataWidgetId;

	fireHideEvent = true;

	window = new Window();
	window.setHeadingText(title);
	window.setWidth(450);
	window.setHeight(490);
	window.setCollapsible(false);
	window.setResizable(true);
	window.addResizeHandler(new ResizeHandler() {
		public void onResize(ResizeEvent event) {
			if (timelineWidget != null) {
				timelineWidget.setSize(event.getWidth(), event.getHeight());
			}
		}
	});

	window.show();
	window.center();
	loadTimeline();
}
 
开发者ID:Stratehm,项目名称:multipool-stats-backend,代码行数:25,代码来源:TwitterTimelineWindow.java

示例13: initialize

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的package包/类
@Override
public void initialize() {
  contactHistoryGrid = new Grid<ContactHistory>(new ListStore<ContactHistory>(), buildColumnModel());
  contactHistoryGrid.getView().setForceFit(true);
  contactHistoryGrid.setAutoHeight(true);
  contactHistoryGrid.addListener(Events.ViewReady, new Listener<BaseEvent>() {
    @Override
    public void handleEvent(BaseEvent be) {
      resizeGrid(contactHistoryGrid, container, true);
    }
  });
  Window.addResizeHandler(new ResizeHandler() {
    @Override
    public void onResize(ResizeEvent event) {
      resizeGrid(contactHistoryGrid, container, true);
    }
  });

  container = Panels.content(null, false, Layouts.vBoxLayout(VBoxLayout.VBoxLayoutAlign.STRETCH, new Layouts.LayoutOptions(new Padding(10))), "x-border-layout-ct");
  container.setScrollMode(Style.Scroll.AUTOY);
  container.add(contactHistoryGrid);
  add(container);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:24,代码来源:ContactHistoryView.java

示例14: addTab

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的package包/类
@Override
public void addTab(String tabTitle, final Widget tabView) {
  final TabItem tabItem = new TabItem(tabTitle);
  tabItem.addListener(Events.Select, new Listener<ComponentEvent>() {
    @Override
    public void handleEvent(ComponentEvent be) {
      fixTabViewHeight(tabView, tabItem);
    }
  });
  tabItem.add(tabView);

  Window.addResizeHandler(new ResizeHandler() {
    @Override
    public void onResize(ResizeEvent event) {
      fixTabViewHeight(tabView, tabItem);
    }
  });
  fixTabViewHeight(tabView, tabItem);

  tabPanel.add(tabItem);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:22,代码来源:ContactView.java

示例15: show

import com.google.gwt.event.logical.shared.ResizeHandler; //导入依赖的package包/类
@Override
public void show() {
    if (resizeHandlerRegistration == null) {
        resizeHandlerRegistration = Window
                .addResizeHandler(new ResizeHandler() {
                    public void onResize(ResizeEvent event) {
                        windowWidth = event.getWidth();
                    }
                });
    }
    Timer timer = new Timer() {
        public void run() {
            getElement().getStyle().setProperty("clip", "auto");
        }
    };
    timer.schedule(300);

    super.show();
}
 
开发者ID:kaaproject,项目名称:avro-ui,代码行数:20,代码来源:FormPopup.java


注:本文中的com.google.gwt.event.logical.shared.ResizeHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。