private void updateFigure(Text text, TextInputModel model) {
   text.setToolTip(new Label(model.toString()));
   text.setText(model.getAttributeToString(TextInputModel.TEXT));
   VisualEditorPlugin.getDefault().getFontManager().setFont(model, text);
   setTextDecoration(model, text);
   text.repaint();
 }
Beispiel #2
0
  public ComboBox() {
    super();
    setOpaque(true);
    setLayoutManager(new BorderLayout());
    setBackgroundColor(VisualEditorPlugin.getDefault().getColorManager().getAirColor());

    label = new Label();
    label.setBackgroundColor(ColorConstants.white);
    label.setVisible(false);
    add(label, BorderLayout.CENTER);
    label.setText("         ");

    button = new ArrowButton(Orientable.SOUTH);
    button.setBorder(null);
    button.setOpaque(false);
    button.setEnabled(false);
    button.setPreferredSize(15, 13);
    add(button, BorderLayout.RIGHT);

    setBorder(
        new SchemeBorder(
            new ButtonScheme(
                new Color[] {buttonLightest}, new Color[] {buttonDarkest, buttonDarker})));
  }