Exemplo n.º 1
0
  public void initLayout() {
    final TableWrapLayout tableWrapLayout = new TableWrapLayout();
    tableWrapLayout.numColumns = 5;

    setLayout(tableWrapLayout);

    fontLabel = new Label(this, SWT.NONE);
    fontLabel.setLayoutData(new TableWrapData(TableWrapData.RIGHT));
    fontLabel.setText("font-family:");

    TableWrapData twd_combo_font_family = new TableWrapData(TableWrapData.FILL);
    twd_combo_font_family.colspan = 4;
    combo_font_family = new Combo(this, SWT.NONE);
    combo_font_family.setVisibleItemCount(15);
    combo_font_family.setLayoutData(twd_combo_font_family);

    fontsizeLabel = new Label(this, SWT.NONE);
    fontsizeLabel.setLayoutData(new TableWrapData(TableWrapData.RIGHT));
    fontsizeLabel.setText("font-size:");

    combo_font_size = new Combo(this, SWT.NONE);
    combo_font_size.setVisibleItemCount(StyleCommonPropertyValue.COMBO_VISIBLEITEM_COUNT);
    combo_font_size.setLayoutData(new TableWrapData(TableWrapData.FILL));

    slider_font_size = new Slider(this, SWT.VERTICAL);
    final TableWrapData twd_slider_font_size =
        new TableWrapData(TableWrapData.LEFT, TableWrapData.TOP);
    twd_slider_font_size.heightHint = 20;
    slider_font_size.setLayoutData(twd_slider_font_size);

    StyleCommonPropertyValue.initSlide(slider_font_size);

    combo_font_sizeUnit = new Combo(this, SWT.NONE);
    combo_font_sizeUnit.setVisibleItemCount(StyleCommonPropertyValue.COMBO_VISIBLEITEM_COUNT);

    textdesLabel = new Label(this, SWT.NONE);
    textdesLabel.setText("text-decoration:");

    fontweightLabel = new Label(this, SWT.NONE);
    fontweightLabel.setLayoutData(new TableWrapData(TableWrapData.RIGHT));
    fontweightLabel.setText("font-weight:");

    combo_font_weight = new Combo(this, SWT.NONE);
    combo_font_weight.setVisibleItemCount(StyleCommonPropertyValue.COMBO_VISIBLEITEM_COUNT);
    combo_font_weight.setLayoutData(new TableWrapData(TableWrapData.FILL));
    new Label(this, SWT.NONE);
    new Label(this, SWT.NONE);

    check_underline = new Button(this, SWT.CHECK);
    check_underline.setText("underline");

    fontstyleLabel = new Label(this, SWT.NONE);
    fontstyleLabel.setLayoutData(new TableWrapData(TableWrapData.RIGHT));
    fontstyleLabel.setText("font-style:");

    combo_font_style = new Combo(this, SWT.NONE);
    combo_font_style.setVisibleItemCount(StyleCommonPropertyValue.COMBO_VISIBLEITEM_COUNT);
    combo_font_style.setLayoutData(new TableWrapData(TableWrapData.FILL));

    new Label(this, SWT.NONE);
    new Label(this, SWT.NONE);

    check_overline = new Button(this, SWT.CHECK);
    check_overline.setText("overline");

    fontLabel_1 = new Label(this, SWT.NONE);
    fontLabel_1.setLayoutData(new TableWrapData(TableWrapData.RIGHT));
    fontLabel_1.setText("font-variant:");

    combo_font_variant = new Combo(this, SWT.NONE);
    combo_font_variant.setVisibleItemCount(StyleCommonPropertyValue.COMBO_VISIBLEITEM_COUNT);
    combo_font_variant.setLayoutData(new TableWrapData(TableWrapData.FILL));
    new Label(this, SWT.NONE);
    new Label(this, SWT.NONE);

    check_line = new Button(this, SWT.CHECK);
    check_line.setText("line-through");

    textLabel = new Label(this, SWT.NONE);
    textLabel.setLayoutData(new TableWrapData(TableWrapData.RIGHT));
    textLabel.setText("text-transform:");

    combo_text_transform = new Combo(this, SWT.NONE);
    combo_text_transform.setVisibleItemCount(StyleCommonPropertyValue.COMBO_VISIBLEITEM_COUNT);
    combo_text_transform.setLayoutData(new TableWrapData(TableWrapData.FILL));
    new Label(this, SWT.NONE);
    new Label(this, SWT.NONE);

    check_blink = new Button(this, SWT.CHECK);
    check_blink.setText("blink");

    colorLabel = new Label(this, SWT.NONE);
    colorLabel.setLayoutData(new TableWrapData(TableWrapData.RIGHT));
    colorLabel.setText("color:");

    text_color = new Combo(this, SWT.NONE);
    text_color.setLayoutData(new TableWrapData(TableWrapData.FILL));

    composite_color = new Composite(this, SWT.BORDER);
    composite_color.setBackground(StyleCommonPropertyValue.DEFAULT_COLOR);
    final TableWrapData twd_composite_color =
        new TableWrapData(TableWrapData.LEFT, TableWrapData.TOP);
    twd_composite_color.heightHint = 20;
    twd_composite_color.maxWidth = 20;
    composite_color.setLayoutData(twd_composite_color);

    new Label(this, SWT.NONE);

    check_none = new Button(this, SWT.CHECK);
    check_none.setText("none");
  }