Examples of EditCommand


Examples of org.eclipse.wb.core.gef.command.EditCommand

  }

  @Override
  protected Command getMoveCommand(ChangeBoundsRequest request) {
    final List<EditPart> editParts = request.getEditParts();
    return new EditCommand(m_panel) {
      @Override
      protected void executeEdit() throws Exception {
        placementsSupport.commit();
        for (W widget : toWidgets(editParts)) {
          Point location = widget.getModelBounds().getLocation();
View Full Code Here

Examples of org.eclipse.wb.core.gef.command.EditCommand

  }

  @Override
  protected Command getAddCommand(ChangeBoundsRequest request) {
    final List<EditPart> editParts = request.getEditParts();
    return new EditCommand(m_panel) {
      @Override
      protected void executeEdit() throws Exception {
        placementsSupport.commitAdd();
        for (W widget : toWidgets(editParts)) {
          Rectangle bounds = widget.getModelBounds();
View Full Code Here

Examples of org.eclipse.wb.core.gef.command.EditCommand

  }

  @Override
  protected Command getResizeCommand(final ChangeBoundsRequest request) {
    final List<EditPart> editParts = request.getEditParts();
    return new EditCommand(m_panel) {
      @Override
      protected void executeEdit() throws Exception {
        List<W> widgets = toWidgets(editParts);
        for (W widget : widgets) {
          Rectangle bounds = widget.getModelBounds();
View Full Code Here

Examples of org.eclipse.wb.core.gef.command.EditCommand

      m_tooltip += "\nRelease Ctrl to set size in pixels";
    } else {
      m_tooltip += "\nPress Ctrl to set size in percents";
    }
    // command
    m_command = new EditCommand(m_object) {
      @Override
      protected void executeEdit() throws Exception {
        IUIObjectSizeSupport sizeSupport = m_object.getSizeSupport();
        if (m_resizeDirection == IPositionConstants.EAST) {
          sizeSupport.setSize(newWidth, null);
View Full Code Here

Examples of org.eclipse.wb.core.gef.command.EditCommand

  private Figure m_resizeFeedback;
  private TextFeedback m_textFeedback;

  private Command getResizeCommand(ChangeBoundsRequest request) {
    final Rectangle newBounds = request.getTransformedRectangle(getHostFigure().getBounds());
    return new EditCommand(m_column) {
      @Override
      protected void executeEdit() throws Exception {
        Property widthProperty = m_column.getWidthProperty();
        if (widthProperty != null) {
          widthProperty.setValue(newBounds.width + "px");
View Full Code Here

Examples of org.eclipse.wb.core.gef.command.EditCommand

  // Span
  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected Command createSpanCommand(final boolean horizontal, final Rectangle cells) {
    return new EditCommand(m_layout) {
      @Override
      protected void executeEdit() throws Exception {
        m_layout.command_CELLS(m_component, cells);
      }
    };
View Full Code Here

Examples of org.eclipse.wb.core.gef.command.EditCommand

  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected Command getMoveCommand(Object moveObject, Object referenceObject) {
    final W component = getWidget(moveObject);
    final W reference = getWidget(referenceObject);
    return new EditCommand(m_panel) {
      @Override
      protected void executeEdit() throws Exception {
        m_panel.command_MOVE2(component, reference);
      }
    };
View Full Code Here

Examples of org.eclipse.wb.core.gef.command.EditCommand

  protected Command getMoveCommand(ChangeBoundsRequest request) {
    if (m_target.m_valid && request.getEditParts().size() == 1) {
      EditPart moveEditPart = request.getEditParts().get(0);
      if (moveEditPart.getModel() instanceof WidgetInfo) {
        final WidgetInfo component = (WidgetInfo) moveEditPart.getModel();
        return new EditCommand(m_layout) {
          @Override
          protected void executeEdit() throws Exception {
            m_layout.command_MOVE(
                component,
                m_target.m_column,
View Full Code Here

Examples of org.eclipse.wb.core.gef.command.EditCommand

  protected Command getAddCommand(ChangeBoundsRequest request) {
    if (m_target.m_valid && request.getEditParts().size() == 1) {
      EditPart moveEditPart = request.getEditParts().get(0);
      if (moveEditPart.getModel() instanceof WidgetInfo) {
        final WidgetInfo component = (WidgetInfo) moveEditPart.getModel();
        return new EditCommand(m_layout) {
          @Override
          protected void executeEdit() throws Exception {
            m_layout.command_MOVE(
                component,
                m_target.m_column,
View Full Code Here

Examples of org.eclipse.wb.core.gef.command.EditCommand

  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected Command getCreateCommand(CreateRequest request) {
    final WidgetInfo component = (WidgetInfo) request.getNewObject();
    return new EditCommand(m_canvas) {
      @Override
      protected void executeEdit() throws Exception {
        placementsSupport.commitAdd();
        Rectangle widgetModelBounds = component.getModelBounds();
        m_canvas.command_absolute_CREATE(component, null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.