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


Java AbsolutePanel.add方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.AbsolutePanel.add方法的典型用法代碼示例。如果您正苦於以下問題:Java AbsolutePanel.add方法的具體用法?Java AbsolutePanel.add怎麽用?Java AbsolutePanel.add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.AbsolutePanel的用法示例。


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

示例1: TabPane

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
public TabPane() {
        tabs = new ArrayList<Tab<T>>();
//        visibleTabs = new ArrayList<Tab<T>>();
        tabPanel = new TabLayoutPanelPlus(20, Style.Unit.PX);
        tabPanel.setStyleName("firefly-TabPane");

        wrapper = new AbsolutePanel();
        wrapper.add(tabPanel);
        tabPanel.setSize("100%", "100%");
        initWidget(wrapper);

        SelHandler selHandler = new SelHandler();

        tabPanel.addBeforeSelectionHandler(selHandler);
        tabPanel.addSelectionHandler(selHandler);

        WebEventManager.getAppEvManager().addListener(Name.WINDOW_RESIZE,
                new WebEventListener(){
                    public void eventNotify(WebEvent ev) {
                        ensureHelpPos();
                    }
                });

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

示例2: ShadowedPanel

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
public ShadowedPanel(Widget w) {
    p = new AbsolutePanel();
    initWidget(p);
    p.add(_panel);
    _panel.setStyleName("shadow");
    setSize("100%", "100%");
    GwtUtil.setStyles(_panel, "position", "absolute", "top", "0px", "bottom", "0px", "left", "0px", "right", "0px");
    if (w!=null) setContent(w);
    WebEventManager.getAppEvManager().addListener(Name.WINDOW_RESIZE,
            new WebEventListener(){
                public void eventNotify(WebEvent ev) {
                    if (helpIcon != null) {
                        p.setWidgetPosition(helpIcon, p.getOffsetWidth()-23, 7);
                    }
                }
            });

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

示例3: newDragProxy

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
@Override
protected Widget newDragProxy(DragContext context) {
    final AbsolutePanel container = new AbsolutePanel();
    container.getElement().getStyle().setProperty("overflow",
                                                  "visible");
    container.getElement().getStyle().setOpacity(0.5);
    container.getElement().getStyle().setZIndex(Integer.MAX_VALUE);

    //Offset to centre of dragProxy
    int offsetX = 0 - ((int) (dragProxy.getWidth() * 0.5));
    int offsetY = 0 - ((int) (dragProxy.getHeight() * 2));
    container.add(dragProxy,
                  offsetX,
                  offsetY);
    return container;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:17,代碼來源:WorkbenchPickupDragController.java

示例4: onBootstrap

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
@Override
public void onBootstrap() {
    dndManager.unregisterDropControllers();

    AbsolutePanel dragBoundary = dragController.getBoundaryPanel();
    dragBoundary.add(perspectiveRootContainer);

    setupDocksContainer();
    rootContainer.add(dragBoundary);

    Layouts.setToFillParent(perspectiveRootContainer);
    Layouts.setToFillParent(dragBoundary);
    Layouts.setToFillParent(rootContainer);

    root.setContentWidget(rootContainer);
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:17,代碼來源:WorkbenchLayoutImpl.java

示例5: addChecksum

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
private void addChecksum(UIObject panel) {
	QHidden qafeChecksum = new QHidden();
	DOM.setElementAttribute(qafeChecksum.getElement(), "fn", DataContainerGVO.QAFE_CHECKSUM);
	if (panel instanceof FlexTable) {
		FlexTable flexTable = (FlexTable)panel;
		int rowCount = flexTable.getRowCount();
		flexTable.setWidget(rowCount, 0, qafeChecksum);
	} else if (panel instanceof AbsolutePanel) {
		AbsolutePanel absolutePanel = (AbsolutePanel)panel;
		absolutePanel.add(qafeChecksum, 0, 0);
	} else if (panel instanceof DockPanel) {
		DockPanel dockPanel = (DockPanel)panel;
		//dockPanel.add(qafeChecksum);
	} else if (panel instanceof CellPanel) {
		CellPanel cellPanel = (CellPanel)panel;
		cellPanel.add(qafeChecksum);
	}
}
 
開發者ID:qafedev,項目名稱:qafe-platform,代碼行數:19,代碼來源:PanelRenderer.java

示例6: TankMovingAnimation

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的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

示例7: createWidget

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
@Override
public Widget createWidget() {
	panel = new AbsolutePanel();
	panel.add(new Label("Swipe"));
	CheckBox checkBox = new CheckBox("unregister handler");
	checkBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
		@Override
		public void onValueChange(ValueChangeEvent<Boolean> event) {
			if (event.getValue()) {
				unregisterHandler(EventType.SWIPE);
			} else {
				registerSwipeHandler(swipeHandler);
			}
		}
	});

	panel.add(checkBox);
	panel.getElement().getStyle().setPosition(Style.Position.ABSOLUTE);
	panel.setSize("150px", "200px");
	panel.getElement().setId("hammerWidget");
	panel.getElement().getStyle().setBackgroundColor("green");
	panel.getElement().getStyle().setRight(0, Style.Unit.PX);
	panel.getElement().getStyle().setTop(0, Style.Unit.PX);

	return panel;
}
 
開發者ID:geomajas,項目名稱:geomajas-project-hammer-gwt,代碼行數:27,代碼來源:PanelsSample.java

示例8: addWidget

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
public static void addWidget(AbsolutePanel parent, Widget widget, int left, int top) {
    if (parent != null) {
      parent.add(widget, left, top); 
    } else {
      LOG.severe("Unable to add widget, parent is null");
    }
//    WidgetLocation location = new WidgetLocation(widget, parent);
//    if (location.getLeft() != left || location.getTop() != top) {
//      parent.setWidgetPosition(widget, left + (left - location.getLeft()), top + (top - location.getTop()));
//      location = new WidgetLocation(widget, parent);
//      if (location.getLeft() != left || location.getTop() != top) {
//        if (location.getLeft() != left) {
//          LOG.warning("Added widget to wrong LEFT location (current: " + location.getLeft() + 
//              " should be: " + left + ")");
//        }
//        if (location.getTop() != top) {
//          LOG.warning("Added widget to wrong TOP location (current: " + location.getTop() + 
//              " should be: " + top + ")");
//        }
//      }
//    }
  }
 
開發者ID:robertwaszkowski,項目名稱:gwt-connectors,代碼行數:23,代碼來源:WidgetUtils.java

示例9: initWidgetPanel

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
/**
 * Initialize the widget panel according to the canvas.
 * 
 * @param canvas
 */
protected void initWidgetPanel(final DiagramCanvas canvas) {
	widgetPanel = new AbsolutePanel();
	widgetPanel.getElement().getStyle().setWidth(canvas.getWidth(), Unit.PX);
	widgetPanel.getElement().getStyle().setHeight(canvas.getHeight(), Unit.PX);
	widgetPanel.add(canvas.asWidget());

	this.svgPanel = new SVGPanel();
	widgetPanel.add(svgPanel);
	focusPanel.add(widgetPanel);
	scrollPanel = new ScrollPanel(widgetPanel);

}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:18,代碼來源:DiagramController.java

示例10: MockCanvas

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
/**
 * Creates a new MockCanvas component.
 *
 * @param editor editor of source file the component belongs to
 */
public MockCanvas(SimpleEditor editor) {
  super(editor, TYPE, images.canvas(), new MockCanvasLayout());

  rootPanel.setHeight("100%");

  canvasWidget = new AbsolutePanel();
  canvasWidget.setStylePrimaryName("ode-SimpleMockContainer");
  canvasWidget.add(rootPanel);

  initComponent(canvasWidget);
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:17,代碼來源:MockCanvas.java

示例11: MockTableArrangement

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
/**
 * Creates a new MockTableArrangement component.
 *
 * @param editor  editor of source file the component belongs to
 */
public MockTableArrangement(SimpleEditor editor) {
  super(editor, TYPE, images.table(), new MockTableLayout());

  rootPanel.setHeight("100%");

  layoutWidget = new AbsolutePanel();
  layoutWidget.setStylePrimaryName("ode-SimpleMockContainer");
  layoutWidget.add(rootPanel);

  initComponent(layoutWidget);
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:17,代碼來源:MockTableArrangement.java

示例12: TitleBar

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
TitleBar() {
  title = new Label();
  title.setStylePrimaryName("ode-SimpleMockFormTitle");
  title.setHorizontalAlignment(Label.ALIGN_LEFT);

  bar = new AbsolutePanel();
  bar.add(title, 12, 4);

  initWidget(bar);

  setStylePrimaryName("ode-SimpleMockFormTitleBar");
  setSize("100%", HEIGHT + "px");
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:14,代碼來源:MockForm.java

示例13: buildPanel

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
@Override
public void buildPanel() {
    viewerPanel = new ViewerPanel();
    showCartographicPositionOnMouseOver();

    _showPosOnMouseOverTBtn = new ToggleButton("Show Cartographic Position on Mouse Over");
    _showPosOnMouseOverTBtn.setValue(true);
    _showPosOnMouseOverTBtn.addValueChangeHandler(new MValueChangeHandler());

    _pickEntityTBtn = new ToggleButton("Pick Entity");
    _pickEntityTBtn.addValueChangeHandler(new MValueChangeHandler());

    _drillDownPickingTBtn = new ToggleButton("Drill-Down Picking");
    _drillDownPickingTBtn.addValueChangeHandler(new MValueChangeHandler());

    _pickPositionTBtn = new ToggleButton("Pick position");
    _pickPositionTBtn.addValueChangeHandler(new MValueChangeHandler());

    HorizontalPanel hPanel = new HorizontalPanel();
    hPanel.add(_showPosOnMouseOverTBtn);
    hPanel.add(_pickEntityTBtn);
    hPanel.add(_drillDownPickingTBtn);
    hPanel.add(_pickPositionTBtn);

    AbsolutePanel aPanel = new AbsolutePanel();
    aPanel.add(viewerPanel);
    aPanel.add(hPanel, 20, 20);

    contentPanel.add(new HTML("<p>Use the mouse to select and manipulate objects in the scene.</p>"));
    contentPanel.add(aPanel);

    initWidget(contentPanel);
}
 
開發者ID:iSergio,項目名稱:gwt-cs,代碼行數:34,代碼來源:Picking.java

示例14: buildPanel

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
@Override
public void buildPanel() {
    csVPanel = new ViewerPanel();
    addLabel();

    ListBox labelsLBox = new ListBox();
    labelsLBox.addItem("Add label", "0");
    labelsLBox.addItem("Set font", "1");
    labelsLBox.addItem("Set properties", "2");
    labelsLBox.addItem("Offset label by distance", "3");
    labelsLBox.addItem("Fade label by distance", "4");
    labelsLBox.addChangeHandler(new ChangeHandler() {
        @Override
        public void onChange(ChangeEvent event) {
            ListBox source = (ListBox) event.getSource();
            reset();
            switch (source.getSelectedValue()) {
                case "0": addLabel(); break;
                case "1": setFont(); break;
                case "2": setProperties(); break;
                case "3": offsetByDistance(); break;
                case "4": fadeByDistance(); break;
                default: break;
            }
        }
    });

    AbsolutePanel aPanel = new AbsolutePanel();
    aPanel.add(csVPanel);
    aPanel.add(labelsLBox, 20, 20);

    contentPanel.add(new HTML("<p>Create Labels</p>"));
    contentPanel.add(aPanel);

    initWidget(contentPanel);
}
 
開發者ID:iSergio,項目名稱:gwt-cs,代碼行數:37,代碼來源:Labels.java

示例15: BoxView

import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
@Inject
public BoxView(Resources resources){
    AbsolutePanel main = new AbsolutePanel();
    
    number.setStyleName(resources.css().number());
    letter.setStyleName(resources.css().letter());
    main.add(number, 0,0);
    main.add(letter, 0,0);

    super.initWidget(main);
    this.setStyleName(resources.css().boxPanel());
}
 
開發者ID:kebernet,項目名稱:shortyz,代碼行數:13,代碼來源:BoxView.java


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