コード例 #1
0
  public ExpressionComposite(Composite parent, int style) {

    super(parent, style);
    setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

    setLayout(new GridLayout(2, false));

    this.variableLabel = new Label(this, SWT.NONE);
    variableLabel.setText("Variable Name");

    this.variableName = new TextWrapper(this, SWT.NONE);
    variableName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    variableName.setTextLimit(64);

    final Label expressionLabel = new Label(this, SWT.NONE);
    expressionLabel.setText("Expression");

    this.expression = new TextWrapper(this, SWT.NONE);
    expression.setTextType(TextWrapper.TEXT_TYPE.EXPRESSION);
    expression.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
  }
コード例 #2
0
 protected void setExpressionVariables(final Map<String, Object> vars) {
   expression.setExpressionVariables(vars);
 }