Examples of EditCommand


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

  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected Command getCreateCommand(Object newObject, Object referenceObject) {
    final LayoutInfo newLayout = (LayoutInfo) newObject;
    return new EditCommand(m_container) {
      @Override
      protected void executeEdit() throws Exception {
        m_container.setLayout(newLayout);
      }
    };
View Full Code Here

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

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 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

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 {
        List<T> models = toWidgets(editParts);
        placementsSupport.commit();
        for (T widget : models) {
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 {
        List<T> models = toWidgets(editParts);
        placementsSupport.commitAdd();
        for (T widget : models) {
View Full Code Here

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

  }

  @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

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

    {
      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

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

  //
  ////////////////////////////////////////////////////////////////////////////
  @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
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.