Package org.eclipse.wb.core.gef.command

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


  @Override
  protected void updateTooltipCommand() {
    // EAST
    if (m_resizeDirection == IPositionConstants.EAST) {
      final double newWidth = getNewWidth();
      m_command = new EditCommand(m_portal) {
        @Override
        protected void executeEdit() throws Exception {
          m_widget.setWidth(newWidth);
        }
      };
View Full Code Here


  // 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_setCells(m_component, cells, true);
      }
    };
View Full Code Here

  @Override
  protected Command getCreateCommand(CreateRequest request) {
    Object newObject = request.getNewObject();
    if (newObject instanceof FormItemInfo) {
      final FormItemInfo item = (FormItemInfo) newObject;
      return new EditCommand(m_form) {
        @Override
        protected void executeEdit() throws Exception {
          placementsSupport.commitAdd();
          Rectangle widgetModelBounds = item.getModelBounds();
          m_form.command_CREATE(item, null);
          m_form.command_BOUNDS(item, widgetModelBounds.getLocation(), widgetModelBounds.getSize());
        }
      };
    }
    if (newObject instanceof CanvasInfo) {
      final CanvasInfo canvas = (CanvasInfo) newObject;
      return new EditCommand(m_form) {
        @Override
        protected void executeEdit() throws Exception {
          placementsSupport.commitAdd();
          Rectangle widgetModelBounds = canvas.getModelBounds();
          m_form.command_CREATE(canvas, null);
View Full Code Here

  }

  @Override
  protected Command getMoveCommand(ChangeBoundsRequest request) {
    final List<EditPart> editParts = request.getEditParts();
    return new EditCommand(m_form) {
      @Override
      protected void executeEdit() throws Exception {
        ArrayList<IAbstractComponentInfo> models = Lists.newArrayList();
        for (EditPart editPart : editParts) {
          models.add((IAbstractComponentInfo) editPart.getModel());
View Full Code Here

  }

  @Override
  protected Command getAddCommand(ChangeBoundsRequest request) {
    final List<EditPart> editParts = request.getEditParts();
    return new EditCommand(m_form) {
      @Override
      protected void executeEdit() throws Exception {
        ArrayList<IAbstractComponentInfo> models = Lists.newArrayList();
        for (EditPart editPart : editParts) {
          models.add((IAbstractComponentInfo) editPart.getModel());
View Full Code Here

    };
  }

  @Override
  protected Command getResizeCommand(final ChangeBoundsRequest request) {
    return new EditCommand(m_form) {
      @Override
      protected void executeEdit() throws Exception {
        for (EditPart editPart : request.getEditParts()) {
          IAbstractComponentInfo widget = (IAbstractComponentInfo) editPart.getModel();
          Rectangle bounds = widget.getModelBounds();
View Full Code Here

  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected Command getCreateCommand(CreateRequest request) {
    final WidgetInfo component = (WidgetInfo) request.getNewObject();
    return new EditCommand(m_layout) {
      @Override
      protected void executeEdit() throws Exception {
        placementsSupport.commitAdd();
        Rectangle widgetModelBounds = component.getModelBounds();
        m_layout.command_CREATE(component, null);
View Full Code Here

  }

  @Override
  protected Command getMoveCommand(ChangeBoundsRequest request) {
    final List<EditPart> editParts = request.getEditParts();
    return new EditCommand(m_layout) {
      @Override
      protected void executeEdit() throws Exception {
        ArrayList<IAbstractComponentInfo> models = Lists.newArrayList();
        for (EditPart editPart : editParts) {
          models.add((IAbstractComponentInfo) editPart.getModel());
View Full Code Here

  }

  @Override
  protected Command getAddCommand(ChangeBoundsRequest request) {
    final List<EditPart> editParts = request.getEditParts();
    return new EditCommand(m_layout) {
      @Override
      protected void executeEdit() throws Exception {
        ArrayList<IAbstractComponentInfo> models = Lists.newArrayList();
        for (EditPart editPart : editParts) {
          models.add((IAbstractComponentInfo) editPart.getModel());
View Full Code Here

    };
  }

  @Override
  protected Command getResizeCommand(final ChangeBoundsRequest request) {
    return new EditCommand(m_layout) {
      @Override
      protected void executeEdit() throws Exception {
        for (EditPart editPart : request.getEditParts()) {
          IAbstractComponentInfo widget = (IAbstractComponentInfo) editPart.getModel();
          Rectangle bounds = widget.getModelBounds();
View Full Code Here

TOP

Related Classes of org.eclipse.wb.core.gef.command.EditCommand

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.