Package org.eclipse.wb.internal.core.utils.execution

Examples of org.eclipse.wb.internal.core.utils.execution.RunnableEx


      }

      @Override
      public void setValue(Object value) throws Exception {
        final int newSpan = value instanceof Integer ? (Integer) value : 1;
        ExecutionUtils.run(widget, new RunnableEx() {
          public void run() throws Exception {
            m_panel.setComponentColSpan(widget, 1);
            m_panel.setComponentColSpan(widget, newSpan);
          }
        });
      }
    };
    Property rowSpanProperty = new JavaProperty(widget, "rowSpan", IntegerPropertyEditor.INSTANCE) {
      @Override
      public boolean isModified() throws Exception {
        return (Integer) getValue() != 1;
      }

      @Override
      public Object getValue() throws Exception {
        return HTMLTableInfo.getConstraints(widget).getHeight();
      }

      @Override
      public void setValue(Object value) throws Exception {
        final int newSpan = value instanceof Integer ? (Integer) value : 1;
        ExecutionUtils.run(widget, new RunnableEx() {
          public void run() throws Exception {
            m_panel.setComponentRowSpan(widget, 1);
            m_panel.setComponentRowSpan(widget, newSpan);
          }
        });
View Full Code Here


      T alignment = value == Property.UNKNOWN_VALUE ? m_defaultValue : (T) value;
      setAlignment(alignment);
    }

    private void setAlignment(final T alignment) {
      ExecutionUtils.run(m_widget, new RunnableEx() {
        public void run() throws Exception {
          CellConstraintsSupport constraints = HTMLTableInfo.getConstraints(m_widget);
          setAlignmentEx(constraints, alignment);
        }
      });
View Full Code Here

  /**
   * Sets the horizontal alignment.
   */
  private void setHorizontalAlignment(final ColumnInfo.Alignment alignment) {
    ExecutionUtils.run(m_layout, new RunnableEx() {
      public void run() throws Exception {
        CellConstraintsSupport constraints = HTMLTableInfo.getConstraints(m_component);
        constraints.setHorizontalAlignment(alignment);
      }
    });
View Full Code Here

  /**
   * Sets the vertical alignment.
   */
  private void setVerticalAlignment(final RowInfo.Alignment alignment) {
    ExecutionUtils.run(m_layout, new RunnableEx() {
      public void run() throws Exception {
        CellConstraintsSupport constraints = HTMLTableInfo.getConstraints(m_component);
        constraints.setVerticalAlignment(alignment);
      }
    });
View Full Code Here

    // check for existing invocation
    {
      final Expression expression = getExpression(javaInfo);
      if (expression != null) {
        if (source != null) {
          ExecutionUtils.run(javaInfo, new RunnableEx() {
            public void run() throws Exception {
              editor.replaceExpression(expression, source);
            }
          });
        } else {
          ExecutionUtils.run(javaInfo, new RunnableEx() {
            public void run() throws Exception {
              editor.removeEnclosingStatement(expression);
            }
          });
        }
        return true;
      }
    }
    // add new invocation
    if (source != null) {
      ExecutionUtils.run(javaInfo, new RunnableEx() {
        public void run() throws Exception {
          StatementTarget target = getTarget();
          Point location = getLocation(javaInfo);
          String argumentsSource =
              TemplateUtils.format("{0}, {1}, {2}", location.y, location.x, source);
View Full Code Here

            "}");
    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        panel.getRows().get(0).setAlignment(alignment);
      }
    });
    String expectedSource =
View Full Code Here

            "}");
    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        panel.getRows().get(0).setAlignment(RowInfo.Alignment.TOP);
      }
    });
    String expectedSource =
View Full Code Here

    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    assertThat(panel.getColumns()).hasSize(2);
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        panel.getColumns().get(0).setAlignment(alignment);
      }
    });
    //
View Full Code Here

    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    assertThat(panel.getColumns()).hasSize(1);
    assertThat(panel.getRows()).hasSize(2);
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        panel.getColumns().get(0).setAlignment(Alignment.RIGHT);
      }
    });
    assertEditor(
View Full Code Here

    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    assertThat(panel.getColumns()).hasSize(2);
    assertThat(panel.getRows()).hasSize(3);
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        panel.getColumns().get(0).setAlignment(Alignment.RIGHT);
      }
    });
    assertEditor(
View Full Code Here

TOP

Related Classes of org.eclipse.wb.internal.core.utils.execution.RunnableEx

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.