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


Java Overflow類代碼示例

本文整理匯總了Java中com.google.gwt.dom.client.Style.Overflow的典型用法代碼示例。如果您正苦於以下問題:Java Overflow類的具體用法?Java Overflow怎麽用?Java Overflow使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Overflow類屬於com.google.gwt.dom.client.Style包,在下文中一共展示了Overflow類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: VImageViewer

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
public VImageViewer() {
    /* Create widget's root panel */
    panelRoot = new FlowPanel();
    Style style = panelRoot.getElement().getStyle();
    style.setPosition(Position.RELATIVE);
    setStyleName(CLASSNAME);
    panelRoot.setStyleName(CLASSNAME + "-flow");
    style.setWidth(100, Unit.PCT);
    style.setHeight(100, Unit.PCT);

    /* Create image container */
    imageContainer = new FlowPanel();
    style = imageContainer.getElement().getStyle();
    style.setPosition(Position.ABSOLUTE);
    style.setOverflow(Overflow.HIDDEN);

    /* Add widgets */
    setWidget(panelRoot);
    panelRoot.add(imageContainer);

    /* Register handlers */
    addDomHandler(this, KeyDownEvent.getType());
    addDomHandler(this, ClickEvent.getType());
    addMouseWheelHandler(new MouseWheelHandler() {
        public void onMouseWheel(MouseWheelEvent event) {
            event.preventDefault();
            if (event.isNorth()) {
                moveImages(true);
            } else {
                moveImages(false);
            }
        }
    });
}
 
開發者ID:tepi,項目名稱:ImageViewer,代碼行數:35,代碼來源:VImageViewer.java

示例2: DatasetWidget

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
public DatasetWidget(Dataset dataset, String widget_uuid) {
	super(dataset.getName(), widget_uuid);
	outNodeShapes.add(new OutNodeShape(this, 0));
	label.setText("");
	nameLabel.setText(dataset.getName());
	label.setStyleName("filebackground");
	label.setPixelSize(30, 42);
	nameLabel.setWidth("100%");
	abspanel.add(nameLabel, 30, 0);
	abspanel.getElement().getStyle().setOverflow(Overflow.VISIBLE);
	canvas.setPixelWidth(30);
	canvas.setPixelHeight(45);
	canvas.setCoordSize(30, 45);
	this.dataset = dataset;
	ptable = new DatasetPropertyTable(dataset);
}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:17,代碼來源:DatasetWidget.java

示例3: showRequestDetail

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
public void showRequestDetail(Long id) {
	iAssignmentTable.clearTable(1);
	LoadingWidget.getInstance().show(MESSAGES.waitLoadTeachingRequestDetail());
	ToolBox.setMaxHeight(iScroll.getElement().getStyle(), Math.round(0.9 * Window.getClientHeight()) + "px");
	RPC.execute(new TeachingRequestDetailRequest(id), new AsyncCallback<TeachingRequestInfo>() {
		@Override
		public void onFailure(Throwable caught) {
			LoadingWidget.getInstance().hide();
			UniTimeNotifications.error(MESSAGES.failedToLoadTeachingRequestDetail(caught.getMessage()), caught);
			ToolBox.checkAccess(caught);
		}

		@Override
		public void onSuccess(TeachingRequestInfo result) {
			LoadingWidget.getInstance().hide();
			populate(result, null, null);
			GwtHint.hideHint();
			center();
			RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN);
		}
	});
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:23,代碼來源:TeachingRequestDetailPage.java

示例4: showInstructorDetail

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
public void showInstructorDetail(Long id) {
	iAssignmentTable.clearTable(1);
	LoadingWidget.getInstance().show(MESSAGES.waitLoadTeachingRequestDetail());
	ToolBox.setMaxHeight(iScroll.getElement().getStyle(), Math.round(0.9 * Window.getClientHeight()) + "px");
	RPC.execute(new TeachingAssignmentsDetailRequest(id), new AsyncCallback<InstructorInfo>() {
		@Override
		public void onFailure(Throwable caught) {
			LoadingWidget.getInstance().hide();
			UniTimeNotifications.error(MESSAGES.failedToLoadTeachingRequestDetail(caught.getMessage()), caught);
			ToolBox.checkAccess(caught);
		}

		@Override
		public void onSuccess(InstructorInfo result) {
			LoadingWidget.getInstance().hide();
			populate(null, null, result);
			GwtHint.hideHint();
			center();
			RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN);
		}
	});
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:23,代碼來源:TeachingRequestDetailPage.java

示例5: show

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
public void show(List<EventMeetingRow> meetings, ApproveEventRpcRequest.Operation operation) {
	iTable.setValue(meetings);
	switch (operation) {
	case APPROVE: setText(MESSAGES.dialogApprove()); break;
	case REJECT: setText(MESSAGES.dialogReject()); break;
	case INQUIRE: setText(MESSAGES.dialogInquire()); break;
	case CANCEL: setText(MESSAGES.dialogCancel()); break;
	}
	iFooter.setEnabled("approve", operation == ApproveEventRpcRequest.Operation.APPROVE);
	iFooter.setEnabled("reject", operation == ApproveEventRpcRequest.Operation.REJECT);
	iFooter.setEnabled("inquire", operation == ApproveEventRpcRequest.Operation.INQUIRE);
	iFooter.setEnabled("cancel", operation == ApproveEventRpcRequest.Operation.CANCEL);
	iFileUpload.check();
	center();
	if (iStandardNotes.getItemCount() == 0)
		iNotes.setFocus(true);
	else
		iStandardNotes.setFocus(true);
	RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:21,代碼來源:ApproveDialog.java

示例6: showDialog

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
public void showDialog(Long eventId, List<MeetingConflictInterface> conflicts) {
	iStep = Math.max(1, (Window.getClientWidth() - 100) / 105);
	ToolBox.setMaxHeight(iScrollRooms.getElement().getStyle(), (Window.getClientHeight() - 100) + "px");
	ToolBox.setMaxHeight(iScrollDates.getElement().getStyle(), (Window.getClientHeight() - 100) + "px");
	int nrMonths = Math.max(1, Math.min(5, (Window.getClientWidth() - 100) / 225));
	iDates.setWidth((225 * nrMonths) + "px");
	iConflicts = conflicts;
	
	iResponse = null;
	iEventId = eventId;
	setWidget(iDatesForm);

	center();
	RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN);
	iDates.setFocus(true);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:17,代碼來源:AddMeetingsDialog.java

示例7: setupDom

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
/**
 * Sets up the PasteBuffer DOM.
 *
 * Implementations should call positionPasteBuffer
 */
protected void setupDom() {
  element = Document.get().createDivElement();
  // For some reason setting display to none prevents this trick from working
  // instead, we move it away from view, so it's still "visible"
  // NOTE(user): We setwhitespace pre-wrap prevents the browser from
  // collapsing sequences of whitespace. This is important to ensure that the
  // spaces after a start tag, or before an end tag are preserved through copy/paste.
  // Also, we can't use DomHelper.setContentEditable as setting -webkit-user-modify
  // to read-write-plaintext-only will force the pasted content to plain text and
  // kill all formatting and semantic paste.
  // This trick doesn't work in Firefox, because the pre-wrap attribute is not
  // preserved through copy, to fix this in Firefox, we'll need to manually
  // replace spaces with &nbsp;
  element.setAttribute("contentEditable", "true");
  JsoView.as(element.getStyle()).setString("white-space", "pre-wrap");
  // DomHelper.setContentEditable(element, true, false);
  element.getStyle().setOverflow(Overflow.HIDDEN);

  positionPasteBuffer(element);
  Document.get().getBody().appendChild(element);
}
 
開發者ID:jorkey,項目名稱:Wiab.pro,代碼行數:27,代碼來源:PasteBufferImpl.java

示例8: createAdditionalInfoWidget

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
private Widget createAdditionalInfoWidget() {
  String documentation = completionItem.getItem().getDocumentation();
  if (documentation == null || documentation.trim().isEmpty()) {
    documentation = "No documentation found.";
  }

  HTML widget = new HTML(documentation);
  widget.setWordWrap(true);
  widget.getElement().getStyle().setColor(theme.completionPopupItemTextColor());
  widget.getElement().getStyle().setFontSize(13, Style.Unit.PX);
  widget.getElement().getStyle().setMarginLeft(4, Style.Unit.PX);
  widget.getElement().getStyle().setOverflow(Overflow.AUTO);
  widget.getElement().getStyle().setProperty("userSelect", "text");
  widget.setHeight("100%");
  return widget;
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:17,代碼來源:CompletionItemBasedCompletionProposal.java

示例9: ArchiveEntryImagePanel

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
public ArchiveEntryImagePanel(ArchiveEntryCollectionRef arc,
        ArchiveEntry entry) {

    _arc = arc;
    _entry = entry;

    _ap = new AbsolutePanel();
    _ap.fitToParent();
    _ap.setOverflow(Overflow.HIDDEN);
    initWidget(_ap);

    addAttachHandler(new Handler() {

        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if (event.isAttached()) {
                loadImage();
            }
        }
    });

}
 
開發者ID:uom-daris,項目名稱:daris,代碼行數:23,代碼來源:ArchiveEntryImagePanel.java

示例10: SimpleTabPanel

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
public SimpleTabPanel() {

        _hp = new HorizontalPanel();
        _hp.setHeight100();
        _hp.setPosition(Position.ABSOLUTE);
        _hp.setLeft(0);

        AbsolutePanel ap = new AbsolutePanel();
        ap.setOverflow(Overflow.HIDDEN);
        ap.setPreferredHeight(TAB_BAR_HEIGHT);
        ap.add(_hp);
        add(ap);

        _sp = new SimplePanel();
        _sp.fitToParent();
        _sp.setBorderTop(2, BorderStyle.SOLID, TAB_COLOR);
        _sp.setBorderLeft(1, BorderStyle.SOLID, TAB_COLOR);
        _sp.setBorderRight(1, BorderStyle.SOLID, TAB_COLOR);
        _sp.setBorderBottom(1, BorderStyle.SOLID, TAB_COLOR);
        add(_sp);
        _buttons = new HashMap<String, TabButton>();
        _widgets = new HashMap<String, Widget>();
        _listeners = new HashMap<String, TabListener>();
    }
 
開發者ID:uom-daris,項目名稱:daris,代碼行數:25,代碼來源:SimpleTabPanel.java

示例11: TabBar

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
public TabBar(CTabPanel tabPanel) {

            _tabPanel = tabPanel;

            _tabsArea = new HorizontalPanel();
            _tabsArea.setHeight100();
            _tabsArea.setPosition(Position.ABSOLUTE);
            _tabsArea.setLeft(0);
            _tabsArea.setZIndex(Z_INDEX_TABS);
            add(_tabsArea);

            initControlsAreaLeft();

            initControlsAreaRight();

            setOverflow(Overflow.HIDDEN);
            setBorderBottom(3, Style.BorderStyle.SOLID, TAB_COLOUR_SELECTED);
            setWidth100();
            setPreferredHeight(DEFAULT_TAB_BAR_HEIGHT);
        }
 
開發者ID:uom-daris,項目名稱:daris,代碼行數:21,代碼來源:CTabPanel.java

示例12: TankMovingAnimation

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
public TankMovingAnimation(HTML mapContainer, int startX, int startY, int endX, int endY,
    ImageResource resource, Audio sfx, int tankSize) {
  piece = resource;
  this.startX = startX;
  this.startY = startY;
  this.endX = endX;
  this.endY = endY;
  this.startWidth = tankSize;
  this.startHeight = tankSize;
  sound = sfx;
  cancelled = false;

  panel = new AbsolutePanel();
  moving = new Image(resource);
  moving.setPixelSize(startWidth, startHeight);
  panel.add(moving, startX, startY);
  panel.getElement().getStyle().setOverflow(Overflow.VISIBLE);
  panel.getElement().getStyle().setPosition(Position.RELATIVE);
  mapContainer.getElement().insertFirst(panel.getElement());
}
 
開發者ID:spk83,項目名稱:risk,代碼行數:21,代碼來源:TankMovingAnimation.java

示例13: init

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
public void init() {
        taskScrollPanel.getElement().getStyle().setPosition(Position.ABSOLUTE);
        taskScrollPanel.getElement().getStyle().setOverflow(Overflow.SCROLL);

        //initialize the SVG panel
        initSVG();

        //add scroll handler
        taskScrollPanel.addScrollHandler(new ScrollHandler() {

            @Override
            public void onScroll(ScrollEvent event) {
                int hscroll = taskScrollPanel.getHorizontalScrollPosition() * -1;

                firstHeaderRow.getElement().getStyle().setLeft(hscroll, Unit.PX);
                secondHeaderRow.getElement().getStyle().setLeft(hscroll, Unit.PX);
                taskBackgroundPanel.getElement().getStyle().setLeft(hscroll, Unit.PX);
                display.fireEvent(event);
//                view.onScroll(taskScrollPanel.getHorizontalScrollPosition(),
//                        taskScrollPanel.getScrollPosition());
            }
        });
    }
 
開發者ID:waynedyck,項目名稱:gwt-gantt,代碼行數:24,代碼來源:GanttChartView.java

示例14: initSVG

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
public void initSVG() {
    svgPanel = new SVGPanel();
    svgPanel.setPointerEvents("none");
    svgPanel.setShapeRendering("crispEdges");
    svgPanel.getElement().getStyle().setOverflow(Overflow.HIDDEN);
    svgPanel.getElement().getStyle().setPosition(Position.ABSOLUTE);
    svgPanel.getElement().getStyle().setTop(0, Unit.PX);
    svgPanel.getElement().getStyle().setLeft(0, Unit.PX);

    // add the arrow marker to the svg panel
    svgArrowMarker = new SVGMarker("Triangle", .5, "black", "black");
    svgArrowMarker.setViewBox("0 0 8 8");
    svgArrowMarker.setRefX(0);
    svgArrowMarker.setRefY(4);
    svgArrowMarker.setMarkerWidth(8);
    svgArrowMarker.setMarkerHeight(8);
    svgArrowMarker.add(new SVGPath("M 0 0 L 8 4 L 0 8 z"));
    svgArrowMarker.setOrient("auto");
    svgArrowMarker.setMarkerUnits("strokeWidth");

    svgDefs = new SVGDefs();
    svgDefs.add(svgArrowMarker);
    svgPanel.add(svgDefs);
}
 
開發者ID:waynedyck,項目名稱:gwt-gantt,代碼行數:25,代碼來源:GanttChartView.java

示例15: createMapboxLogo

import com.google.gwt.dom.client.Style.Overflow; //導入依賴的package包/類
/**
 * Create a MapBox logo.
 *
 * @return MapBox logo
 */
public static Control createMapboxLogo() {

    ControlOptions controlOptions = new ControlOptions();

    LinkElement mapboxLogo = Document.get().createLinkElement();
    mapboxLogo.setHref("https://mapbox.com/about/maps");
    mapboxLogo.setTarget("_blank");

    mapboxLogo.getStyle().setPosition(Position.ABSOLUTE);
    mapboxLogo.getStyle().setLeft(2, Unit.PX);
    mapboxLogo.getStyle().setBottom(5, Unit.PX);
    mapboxLogo.getStyle().setWidth(126, Unit.PX);
    mapboxLogo.getStyle().setHeight(40, Unit.PX);
    mapboxLogo.getStyle().setDisplay(Display.BLOCK);
    mapboxLogo.getStyle().setOverflow(Overflow.HIDDEN);

    mapboxLogo.getStyle().setBackgroundImage("url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIIAAAAoCAMAAAAFWtJHAAAAwFBMVEUAAAAAAAAAAABtbW0AAAAAAAAAAAAAAAAAAAAAAAClpaUAAADp6ekAAAD5+fna2toAAAAMDAzv7+/Nzc0AAAA2Njb8/Pz9/f3T09MAAAAAAAD7+/sAAAArKyuxsbH39/fs7OwbGxuIiIjz8/N8fHyenp7u7u74+PgAAAC8vLxWVlbx8fF1dXXl5eVcXFyUlJTQ0NDFxcVCQkLAwMC4uLj19fXo6OjW1tarq6ve3t77+/vi4uL6+vrKysrNzc3///8w7gSSAAAAP3RSTlMAOQNdPSYBPywKexLLGPCxNEHXnzFL+v2nGwf1IEiE6dBFad9jd9PuLo1V2mDDV3Cjl06SiuXIq4C3973ym6BQMVUPAAAEXElEQVR4Ae2WCVP6OBiH05L0l1IqrVbkKHJ54I0oHn+PfP9vtUle0z/YdhbH2XVnd58ZnRJIeHiPJOx//mH4vQSAN+8FjAhFxgHIaPvJeZ99hxwEElon5iAQbj85Y98g8ODwjEOMAvGFyeE3FEKgodTBqj0BJGN9DhyNd5Ta3ean9QEopfaA+LsKhnEKRExqg4FSP6Og7oEkAjBWnxSCgBX4xF+kcLoPcOBQrSv0e5kH7s1j37jECQieCTPiFGxL5VHw2zQWCeeJiPt6kjRQw0XSkIdVChf67xGa4alSnZlT6HEQ8CK9ANbhvXUF9xlDkBfTuHDWScgC9+z5FQpPI12TlwC6+sV7ixR8CUMKiwjm2GQeOQWHMGuHGdbnObJAwCEqFJpNU5H6uaPUaEIKiQfg+PHk1+u4OwW9PlWW2ctbA4BHCtp+cNK+H8Jos4gDmC5ar4Nx9waaG/2B13NgDqS7+vm2RgEtEws82P+kwIHhs/pgkQKcFIhfd7CogtGNjYMHTLpurD0ERbYFw4JaD3GlQuNAL/JEsSAF4HqlCnaHACk4WhOn4OgCkMD5hSpYNYDJTD8Y46n+jsE1kPhVCuR6QBXhFK7MUOu9O6b1SWF3b+/9ZVWMGOlu93E8UDaAhgc7bfH+0DHqKXCkHzoNDFfU+zxiVQrUC9QXTuHYtKpN59OA3IxCG4b7jh6ZFuVockaNTW09mkJzOaPU49a6mE9cAchZpQJNpUWcwgV9r6FJswsFKrITp2B5pMBMdnS0z2HZNy2+BNKxSZxZfglkrFYBJxQnpzA5sN/HheR2aFQoZBLAi149dQoyAYYjW0hHlHguBAdMcR0DuDZ5omevX6+AI8qcU7ikKT3GBHCnXwydgmCC0tRwCnGQ2Wp6Be71yNIWfQSkOl9vAI1SBCNWrwC01RROgX7BuT2HI4r7tFAw086p/NwZEdOEa7R1uAFuNmQPuKAEAjYNQ0CyeoUEWHYBnpQVQgpvc0Ph+gsKlAnKg1+vEHsw5LKciLKCAJobiWBzYFGbCKpHqkZZrxBFHEASyFI59vJPCskcwNVGOWZAOqsrR+pKbaNeAMT1CixMEtlnsqopNxUMzVJT3tY35aXZm6a6Y9QhwMN6BUJWbE1lhbMO1WehkO7poO0sK7em9MJGxp1XSbC1gtugzzSLQmGsX7VntJGSwsPZ2d2z3bIPKzdoOp3Wzqt8G4XyMVUoFIxLx1S7+piaHtCvR3FeRVsq0GFdp9C5TbGpcNqsPqyHKxcfd14h21KhuLKUFU4f3osrC7F6uV3WXFnadL7wyAPeKDXw2RoJCO5GY4DouYvb/gepVXheLoewzPseQG9N/vzilrMIjoStE3++zvle4eSurw7XEe76ynI4aq+v7lEyt1x5awiFlFLQbHKIpabnM3eJLym4Szzzc/du7SU+zOXv9UNpECH7IoH/gecURPlN9vdQpeD47yhIFNX0U0QgvID9nENm+yxk/xb+AGAjNfRZuk9qAAAAAElFTkSuQmCC)");

    controlOptions.setElement(mapboxLogo);

    return new Control(controlOptions);
}
 
開發者ID:TDesjardins,項目名稱:gwt-ol3,代碼行數:28,代碼來源:DemoUtils.java


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