示例#1
0
 public void show() {
   draw_font_ =
       new DrawSWFFont(
           text_field_.getFont(), effect_, text_field_.getText(), color_button_.getColor());
   color_button_.addChangeListener(self_);
   super.show();
 }
示例#2
0
 // ----------------------------------------------------------------------------
 public void setDrawSWFFont(DrawSWFFont font) {
   font_names_.setSelected(font.getAWTFont().getFontName());
   font_sizes_.setSelected(Integer.toString(font.getAWTFont().getSize()));
   effect_buttons_[font.getEffect()].setSelected(true);
   draw_font_ = font;
   text_field_.setText(font.getText());
   color_button_.setColor(font.getColor());
   updatePreview();
 }
示例#3
0
  // ----------------------------------------------------------------------------
  protected void updatePreview() {
    // FontContainer font = ((at.bestsolution.drawswf.fontdialog.FontContainer)
    // font_names_.getSelectedObject());

    // System.out.println("FONT:" + font_names_.getSelected() );

    String name = font_names_.getSelected();
    int size = font_sizes_.getSelectedInt();

    if (size > 0 && name != null) {
      Font real_font = FontLoader.getInstance().getFont(name, Font.PLAIN, size);
      text_field_.setFont(real_font);
      text_field_.repaint();
    }

    draw_font_ =
        new DrawSWFFont(
            text_field_.getFont(), effect_, text_field_.getText(), color_button_.getColor());
    fireStateChanged();
  }