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

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


        super.onBrowserEvent( event );
      }
    };
    filesList.setCellPadding( 1 );
    filesList.setWidth( "100%" );
    AbsolutePanel bounderyPanel = new AbsolutePanel();
    bounderyPanel.add( fp );

    fp.sinkEvents( Event.KEYEVENTS );

    filesListWrapper.add( bounderyPanel );
    fp.getElement().getStyle().setProperty( "margin", "29px 0px 10px 0px" ); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here


    assertNotNull("Widget exists", w);
    assertEquals("Panel contains widget", w, p.getContent());
  }

  public void testAbsolutePanel() {
    AbsolutePanel p = widgetUi.myAbsolutePanel;
    assertNotNull("Panel exists", p);

    assertEquals("Panel contains exactly 3 widgets", 3, p.getWidgetCount());
    assertEquals("Panel contains expected itemA",
        widgetUi.myAbsolutePanelItemA, p.getWidget(0));
    assertEquals("Panel contains expected itemB",
        widgetUi.myAbsolutePanelItemB, p.getWidget(1));
    assertEquals("Panel contains expected itemC",
        widgetUi.myAbsolutePanelItemC, p.getWidget(2));

    /*
     * The following fails on Safari 3, off by a few pixels. The coverage in
     * AbsolutePanelParserTest and AbsolutePanelTest are enough to make up for
     * the lack. Leaving this here as a warning to the next guy.
View Full Code Here

            panel.setHeight( tn.getHeight() + "px" );

            if ( node instanceof ElementContainerNode ) {

                // Add nodes that are in for each node
                AbsolutePanel ap = new AbsolutePanel();

                ElementContainerNode fen = (ElementContainerNode) node;

                for ( RuleFlowBaseNode baseNode : fen.getNodes().values() ) {
                    ap.add( baseNode,
                            baseNode.getX(),
                            baseNode.getY() );
                }

                // Add connections that are in for each node
                for ( Connection c : fen.getConnections() ) {
                    c.appendTo( ap );
                }

                ap.add( panel );

                node.add( ap );

            } else {
                node.add( panel );
View Full Code Here

    }

    public void showEmptyTree() {

        if ( this.emptyCategories == null ) {
            AbsolutePanel p = new AbsolutePanel();
            p.add( new HTML( constants.NoCategoriesCreatedYetTip() ) );
            Button b = new Button( constants.Refresh() );
            b.addClickHandler( new ClickHandler() {
                public void onClick(ClickEvent event) {
                    refresh();
                }
            } );
            p.add( b );
            p.setStyleName( "small-Text" ); //NON-NLS
            this.emptyCategories = p;
            this.panel.add( this.emptyCategories );
        }
        this.navTreeWidget.setVisible( false );
        emptyCategories.setVisible( true );
View Full Code Here

        //Each Action is a row in a vertical panel
        final VerticalPanel actionsPanel = new VerticalPanel();

        //Wire-up DnD for Actions. All DnD related widgets must be contained in the AbsolutePanel
        AbsolutePanel actionsBoundaryPanel = new AbsolutePanel();
        PickupDragController actionsDragController = new PickupDragController( actionsBoundaryPanel,
                                                                               false );
        actionsDragController.setBehaviorConstrainedToBoundaryPanel( false );
        VerticalPanelDropController actionsDropController = new VerticalPanelDropController( actionsPanel );
        actionsDragController.registerDropController( actionsDropController );

        //Add DnD container to main Conditions container
        actionsBoundaryPanel.add( actionsPanel );
        this.actionsConfigWidget.add( actionsBoundaryPanel );

        //Add a DragHandler to handle the actions resulting from the drag operation
        actionsDragController.addDragHandler( new ActionDragHandler( actionsPanel,
                                                                     model,
View Full Code Here

        //Each Pattern is a row in a vertical panel
        final VerticalPanel patternsPanel = new VerticalPanel();

        //Wire-up DnD for Patterns. All DnD related widgets must be contained in the AbsolutePanel
        AbsolutePanel patternsBoundaryPanel = new AbsolutePanel();
        PickupDragController patternsDragController = new PickupDragController( patternsBoundaryPanel,
                                                                                false );
        patternsDragController.setBehaviorConstrainedToBoundaryPanel( false );
        VerticalPanelDropController widgetDropController = new VerticalPanelDropController( patternsPanel );
        patternsDragController.registerDropController( widgetDropController );

        //Add DnD container to main Conditions container
        conditionsConfigWidget.add( patternsBoundaryPanel );
        patternsBoundaryPanel.add( patternsPanel );

        //Add a DragHandler to handle the actions resulting from the drag operation
        patternsDragController.addDragHandler( new PatternDragHandler( patternsPanel,
                                                                       model,
                                                                       dtable ) );

        List<CompositeColumn<? extends BaseColumn>> columns = model.getConditions();
        boolean arePatternsDraggable = columns.size() > 1 && !isReadOnly;
        for ( CompositeColumn<?> column : columns ) {
            if ( column instanceof Pattern52 ) {
                Pattern52 p = (Pattern52) column;
                VerticalPanel patternPanel = new VerticalPanel();
                VerticalPanel conditionsPanel = new VerticalPanel();
                HorizontalPanel patternHeaderPanel = new HorizontalPanel();
                patternHeaderPanel.setStylePrimaryName( GuidedDecisionTableResources.INSTANCE.css().patternSectionHeader() );
                Label patternLabel = makePatternLabel( p );
                patternHeaderPanel.add( patternLabel );
                patternPanel.add( patternHeaderPanel );
                patternsPanel.add( patternPanel );

                //Wire-up DnD for Conditions. All DnD related widgets must be contained in the AbsolutePanel
                AbsolutePanel conditionsBoundaryPanel = new AbsolutePanel();
                PickupDragController conditionsDragController = new PickupDragController( conditionsBoundaryPanel,
                                                                                          false );
                conditionsDragController.setBehaviorConstrainedToBoundaryPanel( false );
                VerticalPanelDropController conditionsDropController = new VerticalPanelDropController( conditionsPanel );
                conditionsDragController.registerDropController( conditionsDropController );

                //Add DnD container to main Conditions container
                conditionsBoundaryPanel.add( conditionsPanel );
                patternPanel.add( conditionsBoundaryPanel );

                //Add a DragHandler to handle the actions resulting from the drag operation
                conditionsDragController.addDragHandler( new ConditionDragHandler( conditionsPanel,
                                                                                   p,
View Full Code Here

public class PTAbsolutePanel extends PTComplexPanel<AbsolutePanel> {

    @Override
    public void create(final PTInstruction create, final UIService uiService) {
        init(create, uiService, new AbsolutePanel());
    }
View Full Code Here

    }

    public void showEmptyTree() {

        if ( this.emptyCategories == null ) {
            AbsolutePanel p = new AbsolutePanel();
            p.add( new HTML( constants.NoCategoriesCreatedYetTip() ) );
            Button b = new Button( constants.Refresh() );
            b.addClickHandler( new ClickHandler() {
                public void onClick(ClickEvent event) {
                    refresh();
                }
            } );
            p.add( b );
            p.setStyleName( "small-Text" ); //NON-NLS
            this.emptyCategories = p;
            this.panel.add( this.emptyCategories );
        }
        this.navTreeWidget.setVisible( false );
        emptyCategories.setVisible( true );
View Full Code Here

   *
   * @param cssName the style name added to the base name
   * @return a new wrapper element
   */
  private AbsolutePanel createWrapper(String cssName) {
    final AbsolutePanel wrapper = new AbsolutePanel() {
      @Override
      public void onBrowserEvent(Event event) {
        ColumnWidget.this.onBrowserEvent(event);
      }
    };
    final Element wrapperElem = wrapper.getElement();
    DOM.setIntStyleAttribute(wrapperElem, "margin", 0);
    DOM.setIntStyleAttribute(wrapperElem, "border", 0);
    DOM.setIntStyleAttribute(wrapperElem, "padding", 0);
    wrapper.setStyleName(cssName);
    return wrapper;
  }
View Full Code Here

            panel.setHeight( tn.getHeight() + "px" );

            if ( node instanceof ElementContainerNode ) {

                // Add nodes that are in for each node
                AbsolutePanel ap = new AbsolutePanel();

                ElementContainerNode fen = (ElementContainerNode) node;

                for ( RuleFlowBaseNode baseNode : fen.getNodes().values() ) {
                    ap.add( baseNode,
                            baseNode.getX(),
                            baseNode.getY() );
                }

                // Add connections that are in for each node
                for ( Connection c : fen.getConnections() ) {
                    c.appendTo( ap );
                }

                ap.add( panel );

                node.add( ap );

            } else {
                node.add( panel );
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.