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

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


  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected Command getCreateCommand(CreateRequest request) {
    if (m_target.m_valid) {
      final WidgetInfo component = (WidgetInfo) request.getNewObject();
      return new EditCommand(m_layout) {
        @Override
        protected void executeEdit() throws Exception {
          m_layout.command_CREATE(
              component,
              m_target.m_column,
View Full Code Here


  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

  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

  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected Command getCreateCommand(CreateRequest request) {
    final T widget = toWidget(request.getNewObject());
    return new EditCommand(m_panel) {
      @Override
      protected void executeEdit() throws Exception {
        placementsSupport.commitAdd();
        Rectangle widgetModelBounds = widget.getModelBounds();
        m_panel.command_CREATE2(widget, null);
View Full Code Here

  }

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

  }

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

  }

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

    {
      int pixels = horizontal ? m_newSize.width : m_newSize.height;
      m_newUnitSize = m_panel.getSizeInUnits(pixels, !horizontal);
      m_tooltip = "size: " + m_panel.getUnitSizeTooltip(m_newUnitSize);
    }
    m_command = new EditCommand(m_widget) {
      @Override
      protected void executeEdit() throws Exception {
        m_panel.setSize(m_widget, m_newUnitSize);
      }
    };
View Full Code Here

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

  }

  @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

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.