當前位置: 首頁>>代碼示例>>Java>>正文


Java ResizeEvent類代碼示例

本文整理匯總了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();
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:25,代碼來源:StudentSectioningWidget.java

示例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);
}
 
開發者ID:mvp4g,項目名稱:mvp4g2-examples,代碼行數:21,代碼來源:ShellView.java

示例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);
}
 
開發者ID:mvp4g,項目名稱:mvp4g2-examples,代碼行數:25,代碼來源:TextField.java

示例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();
				}
			});
		}
 
開發者ID:openremote,項目名稱:WebConsole,代碼行數:24,代碼來源:BrowserUtils.java

示例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();
  }
}
 
開發者ID:jiakuan,項目名稱:gwt-uploader,代碼行數:28,代碼來源:ResizableWidgetCollection.java

示例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));
  }
}
 
開發者ID:codeaudit,項目名稱:gwt-chronoscope,代碼行數:26,代碼來源:ChartPanel.java

示例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) {

        }
    };
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:30,代碼來源:BasicImageGrid.java

示例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();
            }
        });
    }
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:20,代碼來源:XYPlotJSInterface.java

示例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);
        }
    }
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:13,代碼來源:Application.java

示例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);

    }
 
開發者ID:lsst,項目名稱:firefly,代碼行數:21,代碼來源:ResizableLayoutManager.java

示例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();
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:17,代碼來源:AutoCenterDialogBox.java

示例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();
            }
          });
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:18,代碼來源:DiffScreen.java

示例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);
}
 
開發者ID:fhcampuswien,項目名稱:atom,代碼行數:19,代碼來源:App.java

示例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));
					}
				}
			});
	}
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:19,代碼來源:EventsExecutor.java

示例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");
        }
    });
}
 
開發者ID:languageininteraction,項目名稱:GraphemeColourSynaesthesiaApp,代碼行數:17,代碼來源:AbstractView.java


注:本文中的com.google.gwt.event.logical.shared.ResizeEvent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。