Package org.eclipse.wb.core.gef.policy.layout.generic

Examples of org.eclipse.wb.core.gef.policy.layout.generic.AbstractPopupFigure


      @Override
      protected Figure createAlignmentFigure(final W widget, final boolean horizontal) {
        IEditPartViewer viewer = getHost().getViewer();
        final Anchor anchor = m_panel.getAnchor(widget, horizontal);
        if (horizontal) {
          return new AbstractPopupFigure(viewer, 16, 8) {
            @Override
            protected Image getImage() {
              return anchor != null ? anchor.getSmallImage(horizontal) : null;
            }

            @Override
            protected void fillMenu(IMenuManager manager) {
              addAlignmentActions(manager, widget, horizontal);
            }
          };
        } else {
          return new AbstractPopupFigure(viewer, 8, 16) {
            @Override
            protected Image getImage() {
              return anchor != null ? anchor.getSmallImage(horizontal) : null;
            }
View Full Code Here


  @Override
  protected Figure createAlignmentFigure(IAbstractComponentInfo component, boolean horizontal) {
    IEditPartViewer viewer = getHost().getViewer();
    final CellConstraintsSupport constraints = HTMLTableInfo.getConstraints((WidgetInfo) component);
    if (horizontal) {
      return new AbstractPopupFigure(viewer, 9, 5) {
        @Override
        protected Image getImage() {
          return constraints.getHorizontalAlignment().getSmallImage();
        }

        @Override
        protected void fillMenu(IMenuManager manager) {
          constraints.fillHorizontalAlignmentMenu(manager);
        }
      };
    } else {
      return new AbstractPopupFigure(viewer, 5, 9) {
        @Override
        protected Image getImage() {
          return constraints.getVerticalAlignment().getSmallImage();
        }
View Full Code Here

        "}");
    WidgetInfo button = getJavaInfoByName("button");
    //
    canvas.select(button);
    // prepare figure
    AbstractPopupFigure alignFigure = getAlignFigure(16, 8);
    assertNotNull(alignFigure);
    assertNotNull(getAlignFigureImage(alignFigure));
    // test menu
    IMenuManager menu = getAlignFigureMenu(alignFigure);
    assertNotNull(findChildAction(menu, "none"));
View Full Code Here

        "}");
    WidgetInfo button = getJavaInfoByName("button");
    //
    canvas.select(button);
    // prepare figure
    AbstractPopupFigure alignFigure = getAlignFigure(8, 16);
    assertNotNull(alignFigure);
    assertNotNull(getAlignFigureImage(alignFigure));
    // test menu
    IMenuManager menu = getAlignFigureMenu(alignFigure);
    assertNotNull(findChildAction(menu, "none"));
View Full Code Here

        "</ui:UiBinder>");
    WidgetInfo button = getObjectByName("button");
    //
    canvas.select(button);
    // prepare figure
    AbstractPopupFigure alignFigure = getAlignFigure(16, 8);
    assertNotNull(alignFigure);
    assertNotNull(getAlignFigureImage(alignFigure));
    // test menu
    IMenuManager menu = getAlignFigureMenu(alignFigure);
    assertNotNull(findChildAction(menu, "none"));
View Full Code Here

        "</ui:UiBinder>");
    WidgetInfo button = getObjectByName("button");
    //
    canvas.select(button);
    // prepare figure
    AbstractPopupFigure alignFigure = getAlignFigure(8, 16);
    assertNotNull(alignFigure);
    assertNotNull(getAlignFigureImage(alignFigure));
    // test menu
    IMenuManager menu = getAlignFigureMenu(alignFigure);
    assertNotNull(findChildAction(menu, "none"));
View Full Code Here

TOP

Related Classes of org.eclipse.wb.core.gef.policy.layout.generic.AbstractPopupFigure

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.