Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.AbsolutePanel


  public Widget getContentWidget() {
    // Define the left layout:
    VerticalPanel leftLayout = new VerticalPanel();
    leftLayout.setSize("200px", "100%");
    leftLayout.add(new HTML("<h3>Layers:</h3>"));
    AbsolutePanel dndBoundary = new AbsolutePanel();
    dndBoundary.setSize("200px", "100%");
    leftLayout.add(dndBoundary);
    layerPanel = new VerticalPanel();
    dndBoundary.add(layerPanel);

    layerDragController = new PickupDragController(dndBoundary, false);
    layerDragController.setBehaviorMultipleSelection(false);
    layerDragController.registerDropController(new VerticalPanelDropController(layerPanel));
    layerDragController.addDragHandler(new LayerDragHandler());
View Full Code Here


*
*/
public class SldEditorEntryPoint implements EntryPoint {

  public void onModuleLoad() {
    AbsolutePanel panel = new AbsolutePanel();
    panel.setSize("100%", "100%");
    // list of sld's
    final ListBox sldList = new ListBox();
    sldList.setVisibleItemCount(5);

    // label
    final Label nameLabel = new Label("<name of layer>");

    panel.add(sldList, 100, 100);
    panel.add(nameLabel, 100, 300);

    // Add it to the root panel.
    RootPanel.get().add(panel);

    final SldGwtServiceAsync service = GWT.create(SldGwtService.class);
View Full Code Here

    return true;
  }

  protected void onAttach() {
    super.onAttach();
    AbsolutePanel parent;
    try {
      parent = (AbsolutePanel) getParent();
    } catch (RuntimeException e) {
      throw new IllegalStateException(
          "Parent widget must be an instance of AbsolutePanel");
View Full Code Here

   */
  public PinnedPanel(int width, final ToggleButton pinnedToggle,
      Widget contents, Widget hoverBar) {

    // Create the composite widget.
    master = new AbsolutePanel() {
      {
        sinkEvents(Event.ONMOUSEOUT | Event.ONMOUSEOVER);
      }

      public void onBrowserEvent(Event event) {
View Full Code Here

   */

  public CollapsiblePanel() {

    // Create the composite widget.
    master = new AbsolutePanel() {
      {
        sinkEvents(Event.ONMOUSEOUT | Event.ONMOUSEOVER);
      }

      @Override
View Full Code Here

  public void onModuleLoad2() {
    RootPanel.get().add(
        new HTML("<code>$doc.compatMode = <b>" + getCompatMode()
            + "</b></code>"));

    redAbsolutePanel = new AbsolutePanel();
    redAbsolutePanel.setPixelSize(130, 130);
    RootPanel.get().add(redAbsolutePanel, 500, 150);
    redAbsolutePanel.add(new HTML("This red GlassPanel was created<br>"
        + "with <code>autoHide</code> set to <code>false</code>."));
View Full Code Here

      movablePanel = newDragProxy(context);
      context.boundaryPanel.add(movablePanel, currentDraggableLocation.getLeft(),
          currentDraggableLocation.getTop());
    } else {
      saveSelectedWidgetsLocationAndStyle();
      AbsolutePanel container = new AbsolutePanel();
      DOM.setStyleAttribute(container.getElement(), "overflow", "visible");

      container.setPixelSize(context.draggable.getOffsetWidth(),
          context.draggable.getOffsetHeight());
      context.boundaryPanel.add(container, currentDraggableLocation.getLeft(),
          currentDraggableLocation.getTop());

      int draggableAbsoluteLeft = context.draggable.getAbsoluteLeft();
      int draggableAbsoluteTop = context.draggable.getAbsoluteTop();
      for (Iterator iterator = context.selectedWidgets.iterator(); iterator.hasNext();) {
        Widget widget = (Widget) iterator.next();
        if (widget != context.draggable) {
          int relativeX = widget.getAbsoluteLeft() - draggableAbsoluteLeft;
          int relativeY = widget.getAbsoluteTop() - draggableAbsoluteTop;
          container.add(widget, relativeX, relativeY);
        }
      }
      container.add(context.draggable, 0, 0);
      movablePanel = container;
    }
    movablePanel.addStyleName(PRIVATE_CSS_MOVABLE_PANEL);

    // one time calculation of boundary panel location for efficiency during dragging
View Full Code Here

   *
   * @param context the current drag context
   * @return a new drag proxy
   */
  protected Widget newDragProxy(DragContext context) {
    AbsolutePanel container = new AbsolutePanel();
    DOM.setStyleAttribute(container.getElement(), "overflow", "visible");

    WidgetArea draggableArea = new WidgetArea(context.draggable, null);
    for (Iterator iterator = context.selectedWidgets.iterator(); iterator.hasNext();) {
      Widget widget = (Widget) iterator.next();
      WidgetArea widgetArea = new WidgetArea(widget, null);
      Widget proxy = new SimplePanel();
      proxy.setPixelSize(widget.getOffsetWidth(), widget.getOffsetHeight());
      proxy.addStyleName(PRIVATE_CSS_PROXY);
      container.add(proxy, widgetArea.getLeft() - draggableArea.getLeft(), widgetArea.getTop()
          - draggableArea.getTop());
    }

    return container;
  }
View Full Code Here

    RootPanel.get().add(
        new Label("Hit ESC or click anywhere on the glass panel to remove it."));
    RootPanel.get().add(new GlassPanel(true), 0, 0);

    // Create a small AbsolutePanel
    AbsolutePanel absolutePanel = new AbsolutePanel();
    absolutePanel.setPixelSize(100, 100);
    DOM.setStyleAttribute(absolutePanel.getElement(), "border",
        "1px solid black");
    absolutePanel.add(new Label(
        "This AbsolutePanel is covered with a semi-transparent green glass panel"));

    // Attach the AbsolutePanel
    RootPanel.get().add(absolutePanel, 50, 50);

    // Attach an absolute panel and style it green using this !important CSS
    // rule:
    // .green { background-color: green !important; }
    GlassPanel greenGlassPanel = new GlassPanel(false);
    greenGlassPanel.addStyleName("green");
    absolutePanel.add(greenGlassPanel, 0, 0);
  }
View Full Code Here

        highercross = new HTML();
        highercross.setPixelSize(width / 2, height / 2);
        highercross.setStyleName(CLASSNAME_HIGHERBOX);

        container = new AbsolutePanel();
        container.setStyleName(CLASSNAME_CONTAINER);
        container.setPixelSize(width, height);
        container.add(background, 0, 0);
        container.add(foreground, 0, 0);
        container.add(lowercross, 0, height / 2);
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.AbsolutePanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.